#
✕ nick:phire
#asahi-gpu · 2022-02-14 10:34
phirethey all share the same L0[1] ptr
#asahi-gpu · 2022-02-14 10:34
phireyeah, there is an L0 table for every context
#asahi-gpu · 2022-02-14 10:33
phireit lives at VA 0x1100018000
#asahi-gpu · 2022-02-14 10:33
phireAh... found the Pipeline data I was missing
#asahi-gpu · 2022-02-14 10:32
phireinteresting. I get the feeling we are going to have to RE this blob just so we know it's security model
#asahi-gpu · 2022-02-14 10:32
phiresome of the log messages I've seen talk about a "microPPL"
#asahi-gpu · 2022-02-14 10:15
phireinitdata is at 0xfa0000b0000
#asahi-gpu · 2022-02-14 10:12
phireHere is a pagetable dump of context 0: https://gist.github.com/phire/13c92abd5462d2ea9f3b7d6a6af19c14
#asahi-gpu · 2022-02-14 10:12
phireL0[1][3]
#asahi-gpu · 2022-02-14 10:11
phireand I think it's just a regular physical memory address
#asahi-gpu · 2022-02-14 10:11
phireit's in the 0xfa0_00000000 vaddr range (everything the macos kernel passes into it is in that range)
#asahi-gpu · 2022-02-14 10:09
phireit's a virtual address, after the pagetables are already initilized
#asahi-gpu · 2022-02-14 10:09
phireI haven't fully investiated the permission bits. It's possible the pagetables are setup in such a way that the firmware can't modify them once booted
#asahi-gpu · 2022-02-14 10:08
phirethe gpu uses gfx-shared-region-base for it's page tables
#asahi-gpu · 2022-02-14 10:07
phiremain ram. The L0 page is at gpu-region-base, kernel points L0[1] at gfx-shared-region-base
#asahi-gpu · 2022-02-14 10:05
phireThey cover the agx-asc firmware blob that iboot put in main ram, and the IO range for agx-asc's registers
#asahi-gpu · 2022-02-14 10:03
phireWell, it populates it's own pagetables for the 0xf8000000000 range when you boot it
#asahi-gpu · 2022-02-14 09:38
phireit's only the pipeline defintion. That references straight back to regular gpu VAs
#asahi-gpu · 2022-02-14 09:26
phireso there is this weird, extra address space? that apparently only pipeline defintions live in?
#asahi-gpu · 2022-02-14 09:25
phirehowever, userspace tracing shows a region is mapped with the the VA of 0x18000
#asahi-gpu · 2022-02-14 09:23
phirebut there is nothing actually mapped at 0x18000 in the gpu VA
#asahi-gpu · 2022-02-14 09:22
phireI've got the launch command: 00001002 00018000 00000020 00000001 00000001 00000020 00000001 00000001 6000217c
#asahi-gpu · 2022-02-14 09:21
phirethe pipeline bind uses a weird address space: https://cgit.freedesktop.org/mesa/mesa/tree/src/asahi/lib/cmdbuf.xml#n495
#asahi-gpu · 2022-02-12 15:03
phirewell, compute shaders that are submitted to a compute command encoder. Because you can also submit them as a per-tile dispatch to a render command encoder
#asahi-gpu · 2022-02-12 14:59
phireturns out I had a bug in my code, and compute shaders do actually go to the CL queue
#asahi-gpu · 2022-02-11 03:13
phiremaybe agx only has two command processors? one for Tile Acclerator stuff, and one for everything else?
#asahi-gpu · 2022-02-11 03:05
phireok, weird. compute commands go over the Submit3D
#asahi-gpu · 2022-02-11 01:33
phireI'm a little annoyed that metal support is missing from the command line tools install, and you have to install the full version of xcode from appstore
#asahi-gpu · 2022-02-11 01:31
phireI installed a seperate version of osx for running under m1n1
#asahi-gpu · 2022-02-11 01:30
phirewas on the osx install
#asahi-gpu · 2022-02-11 01:30
phirefirst I need to install xcode
#asahi-gpu · 2022-02-11 01:28
phireI need to try with the simplist possible metal compute example
#asahi-gpu · 2022-02-11 01:24
phire3d work submission endpoints typically get two commands per frame (an 0x1 and an 0x4), while TA gets one (an 0x0)
#asahi-gpu · 2022-02-11 01:23
phireyeah... it is a second level of ringbuffers, one for each work submission info (endpoint?). Data is a single pointer.
#asahi-gpu · 2022-02-10 16:35
phireyeah
#asahi-gpu · 2022-02-10 16:34
phirethanks
#asahi-gpu · 2022-02-10 16:33
phirebtw alyssa, can you send me the wrap output for a sample app?
#asahi-gpu · 2022-02-10 16:20
phireright now I'm filtering by work submission pointer, which changes every boot
#asahi-gpu · 2022-02-10 16:17
phireI'd really like to find where the context id is specified so I can ignore anything other than my test app
#asahi-gpu · 2022-02-10 15:49
phirethere is also submitCL, but I haven't seen it yet
#asahi-gpu · 2022-02-10 15:48
phirewell, apple do 3D then TA
#asahi-gpu · 2022-02-10 15:45
phirefrom memory, videocore 4 had a single command submittion that did both
#asahi-gpu · 2022-02-10 15:44
phirenow that I think about it, videocore 6 does the same thing
#asahi-gpu · 2022-02-10 15:42
phireso would that be seperate work items for the binning and and tile resolve?
#asahi-gpu · 2022-02-10 15:37
phirecould be. Each frame of the boot logo appears to get one Submit3D and one SubmitTA
#asahi-gpu · 2022-02-10 15:24
phire(I assume SubmitTAs are transfer work items, mapping to metal's BlitCommands
#asahi-gpu · 2022-02-10 15:21
phirechannel13 is some kind of return channel. It receives a message after each SubmitTA
#asahi-gpu · 2022-02-10 14:40
phireif I follow pointers far enough, I eventually get to userspace gpu VA pointers
#asahi-gpu · 2022-02-10 14:27
phireand an offset into it that increases each Submit
#asahi-gpu · 2022-02-10 14:27
phireno, it's actually a list of pointers which grows by two each Submit3D

plus ›