#asahi-re · 2022-06-05 10:23
phirewhoops#asahi-re · 2022-06-05 10:20
phireit certianlly wouldn't be pretty#asahi-re · 2022-06-05 10:18
phiretechnially we could do a version 0 dirver as just the m1n1 codebase accessing kmem#asahi-re · 2022-06-05 10:17
phirepoor lina#asahi-re · 2022-06-05 10:12
phireI'm not sure if that's an old feature that's disabled on the M1 gpu, or a new feature that's not yet enabled#asahi-re · 2022-06-05 10:11
phirehey, maybe they will enable the firmware-managed memory allocations feature#asahi-re · 2022-06-05 07:38
phireor more, I expect them to use the same agx firmware version across multiple GPU revisions, but that agx firmware might get a version bump#asahi-re · 2022-06-05 07:36
phirethere's a good chance the new gpu won't require any major changes to the kernel code. Except it will probally come with a new macos version that rearranges all the structs#asahi-re · 2022-04-10 05:00
phireshould work if the thing you are tracing is page aligned. It only runs into issues if a read/store starts on a previous non-traced page, and overflows into the page you are tracing#asahi-re · 2022-04-10 04:38
phireImplemented the 256bit reads/writes, then ran into a pathological problem with reads split across pages. So not pushed#asahi-re · 2022-04-10 04:36
phirerqou_ Lina was actually working on this problem on yesterday's stream.#asahi-re · 2022-02-09 13:06
phirethanks#asahi-re · 2022-02-09 13:06
phireand it does seem to generate quite a lot of 0x83000000000000 without bits 2 or 3 set#asahi-re · 2022-02-09 13:04
phire?#asahi-re · 2022-02-09 13:04
phireany mention of 0x84000000000000 and 0x85000000000000 #asahi-re · 2022-02-09 13:04
phireit does a lot of "kick firmware" then.#asahi-re · 2022-02-09 12:58
phirethat could be helpful#asahi-re · 2022-02-08 01:03
phireI've seen no reason to suspect that (yet). Other than the fact I can't find out how it's communicating#asahi-re · 2022-02-08 00:05
phireI think my next step is to list out every IO range that gets mapped into the UAT iommu, and see if the CPU is writing to any of them#asahi-re · 2022-02-08 00:03
phirethat, and I shouldn't need to#asahi-re · 2022-02-08 00:03
phirepart of the reason I'm really not wanting to go down that route#asahi-re · 2022-02-07 08:13
phireThe handoff region seems to deal exclusively with page tables from PPL#asahi-re · 2022-02-07 08:12
phireWhat I can't find is work submission#asahi-re · 2022-02-07 08:11
phireI think I actually understand enough about the PPL stuff (for now)#asahi-re · 2022-02-06 04:51
phire(spotted it looking at kernel strings)#asahi-re · 2022-02-06 04:50
phirethere is a iouat_debug kernel argument#asahi-re · 2022-02-06 04:50
phireah... useful#asahi-re · 2022-02-05 13:11
phireI confirmed that the 0x1500000000 pointers match the range of gpu VAs that I see from userspace#asahi-re · 2022-02-05 13:10
phireYeah, progress. Just got to understand how these page tables work and then I can trace them correctly.#asahi-re · 2022-02-05 07:29
phireyeah, makes sense#asahi-re · 2022-02-05 05:02
phireI think this might be a page table: https://gist.github.com/phire/00ddb0d6ffa021d5a1676561928ea8cc#asahi-re · 2022-02-05 02:48
phirelots of mentions about UAT (IOUAT) which seems to be directly related to how these gfx-shared/gpu-shared/gfx-handoff regions get mapped#asahi-re · 2022-02-05 02:38
phireOh, there are more gpu related strings in the actual kernel#asahi-re · 2022-02-05 01:41
phirebut the AGXG13X.kext strings don't support that theory#asahi-re · 2022-02-05 01:35
phireI suspect it's just a smaller DART-like thing that only does simple block translations, and enables the AGX firmware to access those shared regions#asahi-re · 2022-02-05 01:34
phirethe other one belongs to admac-sio, which is audio#asahi-re · 2022-02-05 01:33
phirethree of which are these shared memory regions in sgx#asahi-re · 2022-02-05 01:33
phire I found mention of GUAT in the device tree. It the name for four memory carvouts#asahi-re · 2022-02-05 01:02
phireIs this just another name for GART? Or is there more than one address translator that I can't find#asahi-re · 2022-02-05 01:01
phireThe strings also mention AGXUnifiedAddressTranslator#asahi-re · 2022-02-04 16:03
phiremight need to RE the kext#asahi-re · 2022-02-04 16:02
phireso I need to work out where GART is. though I probally should sleep at some point#asahi-re · 2022-02-04 16:00
phireyes, that's the leading theory#asahi-re · 2022-02-04 15:59
phirereading it actually crashes m1n1#asahi-re · 2022-02-04 15:58
phireits' not valid#asahi-re · 2022-02-04 15:57
phireor pointers to some kind of task structure that has all the deatils#asahi-re · 2022-02-04 15:56
phiremy theory is that these are command buffer pointers#asahi-re · 2022-02-04 15:55
phireI see it following a pattern of writing what looks like a pointer (like 0x1506f90000), then a size (0x14000), then setting a flag (to signal work is ready)#asahi-re · 2022-02-04 15:46
phireI think the cpu only ever writes into gfx-handoff#asahi-re · 2022-02-04 15:42
phireI think it's data belonging to the firmware