#
✕ nick:phire
#asahi-gpu · 2022-02-06 02:06
phire(it's also located in physical memory)
#asahi-gpu · 2022-02-06 02:05
phireseems to be memory, it holds any writes
#asahi-gpu · 2022-02-06 02:01
phireI admit, things would make much more sense if gfx-handoff was an mmio region
#asahi-gpu · 2022-02-06 02:00
phirepanic(cpu 4 caller 0xfffffe0013c5d848): UAT PPL 0xfffffdf030af4160 (IOUAT): Invalid microPPL magic value found in the handoff region. Expected: 0x4b1d000000000002, Actual: 0x0
#asahi-gpu · 2022-02-06 02:00
phireif you clear the value at gfx-handoff+8, the kernel does the following panic:
#asahi-gpu · 2022-02-06 01:58
phirethe asc traffic itself is mostly just <ep:20 0042000000000000, >ep:21 0083000000000000
#asahi-gpu · 2022-02-06 01:58
phire(unknown, offset 0x10ffffb4nnn) are gfx-handoff
#asahi-gpu · 2022-02-06 01:56
phiremight be because this is a debug kernel
#asahi-gpu · 2022-02-06 01:56
phirebesides, I'm mostly talking about entropy wise
#asahi-gpu · 2022-02-06 01:55
phirethe stuff at the top is just re-initilization. I think it happens whenever the gpu is bought out of sleep
#asahi-gpu · 2022-02-06 01:51
phiremight be somewhere else?
#asahi-gpu · 2022-02-06 01:50
phireand the corrosponding wrap trace: https://gist.github.com/phire/adaa5fe1410678ae7d5f46cadeb8b259
#asahi-gpu · 2022-02-06 01:49
phirealso, this is the M1N1 trace acound the gpu allocation stuff: https://gist.github.com/phire/9cad6e6bbe4add5f8f9dcc55d5a03dbc
#asahi-gpu · 2022-02-06 01:48
phirehttps://gist.github.com/phire/12dde199dc0a7a36d9a563c69f016ef9
#asahi-gpu · 2022-02-06 01:47
phireha, I saved a copy of that
#asahi-gpu · 2022-02-06 01:46
phireI don't have names for them
#asahi-gpu · 2022-02-06 01:45
phirecpu sometimes sends 0x83 with a 8bit value on EP21
#asahi-gpu · 2022-02-06 01:45
phiregpu sometimes sends 0x43 on EP20
#asahi-gpu · 2022-02-06 01:43
phirebut I do think it's real memory
#asahi-gpu · 2022-02-06 01:43
phireIt's possible the firmware gets an interrupt every time there is a write to it
#asahi-gpu · 2022-02-06 01:41
phireand it's only reads
#asahi-gpu · 2022-02-06 01:41
phiresgx has even less register traffic than gfx-asc
#asahi-gpu · 2022-02-06 01:39
phireit's bugging me
#asahi-gpu · 2022-02-06 01:39
phirethere is very little traffic going across the gpu firmware's ASC
#asahi-gpu · 2022-02-06 01:25
phireI need to work out how to trace interrupts
#asahi-gpu · 2022-02-06 01:24
phirethen I think an interupt comes back and the cpu sets gfx-handoff+0x98 back to 0
#asahi-gpu · 2022-02-06 01:23
phirethen somehow the gpu firmware knows to read that shared memory
#asahi-gpu · 2022-02-06 01:23
phireit writes the VA to gfx-handoff+0xa0, the size to +0xa8 and then writes 2 to 0x98
#asahi-gpu · 2022-02-06 01:21
phirebut this communication protocol is a bit weird
#asahi-gpu · 2022-02-06 00:15
phireprobally a cache flush or memory clear command
#asahi-gpu · 2022-02-06 00:13
phireoh this is cool, I can see it sending the gpu_va and size of my userspace allocations to the gpu firmware
#asahi-gpu · 2022-02-05 13:26
phireDon't rush, I need to sleep
#asahi-gpu · 2022-02-05 13:26
phireFair enough. The wrap output should help me fix it no-matter the cause
#asahi-gpu · 2022-02-05 13:23
phireActually, I'm not 100% sure my issues are due to the AgxG13G vs AgxG13X mismatch. Is it possible they changed the IOKit interface in Mac OS 12?
#asahi-gpu · 2022-02-05 13:13
phireAlyssa could you send me a hello triangle binary and its wrap output on the M1. Then I can compare the result on my m1x.
#asahi-gpu · 2022-02-05 13:08
phireBut it didn't produce a triangle
#asahi-gpu · 2022-02-05 13:08
phireWell, I got it to the point where the demo would run without asserting
#asahi-gpu · 2022-02-05 13:07
phireHmm...
#asahi-gpu · 2022-02-05 08:57
phirethe "ioctls" are very slightly diffrent
#asahi-gpu · 2022-02-05 07:44
phirealyssa: you done any work on getting the m1 driver to work on the m1x?
#asahi-gpu · 2021-10-28 23:39
phireafter talking with me, they actually expermented with an optimsation pass that converted unform indirection of small arrays into if/else trees (which I was expermenting with manually to speed up Nvidia GPUs
#asahi-gpu · 2021-10-28 23:37
phireI was only using uniform indexing into the register file. When I was talking to an Apple driver engineer back in like 2015, it didn't support it
#asahi-gpu · 2021-10-28 22:28
phirebecause some shader ISAs simply don't support it, and their drivers will instead put the array you were dynamic indexing out into main memory, and preformance tanked
#asahi-gpu · 2021-10-28 22:26
phirethen again, the upershaders were more bound on indexing into the dynamic register file.
#asahi-gpu · 2021-10-28 22:22
phirealyssa: oh, I didn't know GPU/compilers had problems doing indirection on the constant/uniform file. I rely a lot on that in dolphin's ubershader
#asahi-gpu · 2021-10-18 19:52
phireno idea how it would handle mapping memory
#asahi-gpu · 2021-10-18 19:52
phireSo my original idea was to just modify qemu to bash-though the AGX interface.
#asahi-gpu · 2021-10-18 19:42
phirenot since the system 7.5 days
#asahi-gpu · 2021-10-18 19:42
phireI admit I haven't used macos in a long time
#asahi-gpu · 2021-10-18 19:38
phireif the hardware (and MacOS) actually support proper paravirtualization, might as well do it correctly.

plus ›