[raspi-internals] Re: VideoCore VI VPU/PPU

  • From: michael bishop <cleverca22@xxxxxxxxx>
  • To: raspi-internals@xxxxxxxxxxxxx
  • Date: Fri, 19 Mar 2021 23:11:44 -0300

the 4gig mirroring is still in place
the VPU can only access the lower 1gig of the address space

on VC6, the V3D (opengl/shaders) now has a private mmu, mapping its 32bit
space into the real ram
there are also some new 64bit capable dma channels, that can access the
whole ram

uint64_t do_test(uint64_t a, uint64_t b) {
  return a+b;
}

c140e4dc <do_test>:

uint64_t do_test(uint64_t a, uint64_t b) {
c140e4dc:       a1 02                   stm r6-r7,(--sp)
c140e4de:       59 c0 70 cf             add sp,sp,-16
c140e4e2:       46 c0 40 cf             add r6,sp,0
c140e4e6:       60 09                   st r0,(r6)
c140e4e8:       61 31                   st r1,(r6+0x4)
c140e4ea:       62 32                   st r2,(r6+0x8)
c140e4ec:       63 33                   st r3,(r6+0xc)
  return a+b;
c140e4ee:       62 08                   ld r2,(r6)
c140e4f0:       63 21                   ld r3,(r6+0x4)
c140e4f2:       64 22                   ld r4,(r6+0x8)
c140e4f4:       65 23                   ld r5,(r6+0xc)
c140e4f6:       40 c0 04 17             add r0,r2,r4
c140e4fa:       17 60                   mov r7,0x1
c140e4fc:       20 4a                   cmp r0,r2
c140e4fe:       02 19                   bcs c140e502 <do_test+0x26>
c140e500:       07 60                   mov r7,0x0
c140e502:       41 c0 05 1f             add r1,r3,r5
c140e506:       42 c0 01 3f             add r2,r7,r1
c140e50a:       21 40                   mov r1,r2
c140e50c:       03 40                   mov r3,r0
c140e50e:       14 40                   mov r4,r1
c140e510:       31 40                   mov r1,r3
c140e512:       42 40                   mov r2,r4
}
c140e514:       10 40                   mov r0,r1
c140e516:       21 40                   mov r1,r2
c140e518:       59 c0 50 37             add sp,r6,16
c140e51c:       21 02                   ldm r6-r7,(sp++)
c140e51e:       5a 00                   rts

this ASM was generated with https://github.com/itszor/vc4-toolchain

it looks like its using "bcs" to branch if carry set, and then do a mix of
32bit adds
ive not checked how accurate it is, but ive not run into any bugs that
indicate it has ever had issues



On Fri, Mar 19, 2021 at 8:02 AM David Given <dg@xxxxxxxxxxx> wrote:

IIRC the 1GB memory limit on the VideoCore IV was because the RAM was
mirrored in four blocks in the 32-bit address space. How is this done on
the VC6, which has more RAM?

Also, and this is the really important question, is there an
add-with-carry instruction yet? (Without which 64-bit arithmetic is really
hard!)

On Fri, 19 Mar 2021 at 05:42, michael bishop <cleverca22@xxxxxxxxx> wrote:

VC6 uses the identical instruction set, and most of the mmio is at the
same address

recovery.bin must be signed with an hmac-1 key, but start4.elf can be
unsigned

On Fri, Mar 5, 2021 at 4:29 PM Felipe Magno de Almeida <
felipe.m.almeida@xxxxxxxxx> wrote:

Hello,

Does anyone know about VPU/PPU on VideoCore VI? Does it have the same
instruction set? Is it faster?

Kind regards,
--
Felipe Magno de Almeida
Owner @ Expertise Solutions
www: https://expertise.dev
phone: +55 48 9 9681.0157
LinkedIn: in/felipealmeida



--
┌─── http://www.cowlark.com ───
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup

Other related posts: