#
…

2021-08-21

01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-re
02:07DarkShadow44 has joined #asahi-re
02:09DarkShadow4444 has quit [Ping timeout: 480 seconds]
02:19alyssaI'm staring at the device tree and trying to make sense of how GPU memory works
02:19alyssaAll the dart mappers have `reg` blocks for the dart.
02:19alyssathe gpu is special, no registers specified on its mapper.
02:19alyssaindeed the GPU doesn't use a DART, it uses a GART. whatever the heck that is.
02:27hanetzer has joined #asahi-re
02:34alyssaI guess that's what AGXArmFirmwareMapper is for.
02:35alyssaso, on boot I see macOS reading from a bunch of GPU (`sgx`) registers
02:35alyssaright after adding endpoints, but before starting the syslog
02:36alyssapossibly reading config registers? it reads twce and values are consistent
02:37alyssaTypeError: unsupported format string passed to NoneType.__format__
02:40* alyssapatches m1n1
02:58PhilippvK has joined #asahi-re
03:01phiologe has quit [Ping timeout: 480 seconds]
03:14alyssaI suspect somebody will want to pop those kexts into ghidra before trying to make sense of the i/o traces
03:15alyssathe IOP interface (`gfx-asc`) is totally standard, m1n1's existing infrastructure handles it fine
03:15alyssathe GPU registers themselves though (`sgx`) are novel, as is the GART mapper
03:16alyssaand here's the kicker-- IOP is all based on shared memory. No DART, no clue where it is.
03:17alyssathe good news is that GART seems to be organized like a normal MMU
03:17alyssa(like the Arm CPU MMU)
03:18alyssathree layers of translation tables-- as I understand this is much more complex than DART, which makes sense as the memory requirements of a CPU/GPU are far more complicated than an ordinary peripheral
03:19alyssa16k pages -- unsurprising.
03:22alyssaGART comes in ordinary, "legacy" and "secure" flavour
03:23alyssaPresumably the complexity is for supporting process isolation, hardware backed DRM, etc.
03:24alyssanot sure it warrants yet another IOMMU but here we are
03:48Graypup_apple soc designers: "oops! all iommu"
03:49alyssayo, I heard you like IOMMU
03:49alyssa16k pages and aligned pointers means 14 bits are free at the bottom of pointers.
03:50alyssaPresumably the GART format takes good advantage of that.
06:05svenfwiw, DART is technically three levels as well (first one in MMIO and then two levels of pagestables)
06:05svenAGXArmFirmwareMapper sounds like it just maps the firmware though
06:06svenand huh... mapper-gfx-asc is strange
06:06sveni *really* hope you can implement that iommu inside the gfx driver and not inside the iommu framework
06:07svenbecause that iommu framework only supports a single iommu type per bus and i'm not keen on changing that
09:24riker77 has quit [Quit: Quitting IRC - gone for good...]
09:35riker77 has joined #asahi-re
11:32Stary has quit [Quit: ZNC - http://znc.in]
11:40Stary has joined #asahi-re
13:17alyssasven: Ohv boy.
13:41svenalyssa: so that AGXArmFirmwareMapper is just a small wrapper around the actual IOMMU
13:42sveni think they built it because they also need the normal RTKit shared memory buffers to go through GART
13:43sveni.e. that whole node in the ADT is essentially an Apple hack :D
13:56zopieux has quit [Ping timeout: 480 seconds]
13:58zopieux has joined #asahi-re
14:21alyssasven: understood, I guess I suspected as much
14:22alyssaI mean, I imagine the capabilities of GART are a strict superset of DART?
14:22digitalfx[m] has joined #asahi-re
14:22alyssamarcan: Do we know what's happening on all the other DCP endpoints?
14:22alyssae.g. mcdp29xx which apparently is the DP->HDMI chip
14:27svenor maybe it's an entirely different thing
14:29alyssasven: I mean correct me if I'm wrong but DART is made to be simple
14:30svenbut afaik DART has stuff like subpage-protection. no idea if GART has that as well
14:30alyssa not much point for graphics ...
14:30svenit'll certainly be capable of creating IOVA -> physaddr mappings just like DART can
14:30alyssa(for 16k pages. certainly there's a point for 2MB pages ha)
14:31svenand i suspect the pagetable format is going to be very similar
14:45marcanalyssa: those are driven by different drivers
14:45marcansemi-autonomously afaik
14:45marcanI'm not sure how much we have to care at this point
15:02alyssamarcan: Woof
15:31svenhm, might only be important to decide how to handle all the common rtkit stuff for the kernel
15:39nafod has quit [Quit: The Lounge - https://thelounge.chat]
16:01jeffmiw has joined #asahi-re
16:08nafod has joined #asahi-re
16:14jeffmiw has quit [Ping timeout: 480 seconds]
16:28jeffmiw has joined #asahi-re
17:08jeffmiw has quit [Ping timeout: 480 seconds]
18:39krbtgt has quit [Ping timeout: 480 seconds]
20:00jeffmiw has joined #asahi-re
20:26krbtgt has joined #asahi-re
21:04jeffmiw has quit [Ping timeout: 480 seconds]
21:10jeffmiw has joined #asahi-re
22:00jeffmiw has quit [Ping timeout: 480 seconds]
…