marcan changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics stack black-box RE and development (NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
DanB91 has joined #asahi-gpu
DanB91 has quit [Remote host closed the connection]
* bloom
gave in and started doing development on the mac
<bloom>
Also, I'm not sure what /System/PrivateFrameworks/IOGPU.framework/Versions/A/Resources/IOGPUCommonSignposts.plist is but it might be interesting.
<bloom>
A quick Google search indicates "signposts" are a macOS tracing thing?
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-gpu
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-gpu
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-gpu
<bloom>
I like Instruments :'o
aquijoule_ has joined #asahi-gpu
<bloom>
Interesting columns '[resource] ID' and '[parent] IDs', explains so much of the weirdness.
DanB91 has quit [Ping timeout: 240 seconds]
richbridger has quit [Ping timeout: 252 seconds]
odmir has quit [Remote host closed the connection]
odmir has joined #asahi-gpu
odmir has quit [Ping timeout: 250 seconds]
<bloom>
Ah ah!
<bloom>
matched up an ID in the command stream to what instrmuents calls "Encoder ID"
<bloom>
this is getting.. more complicated
<bloom>
Looks like a _lot_ of these magic numbers solely exist to support profiling...
<bloom>
metal-io-surface-access shows WindowServer making use of a "83b&" pixel format for the display (4k if it matters) .. guessing that's compressed tiled something or other
odmir has joined #asahi-gpu
<bloom>
Curiously Instruments at the low level involes a ton of S-expressions
<bloom>
Anyway, the big take aways are:
<bloom>
- the word at offset 0x28 of the response to ALLOCATE_MEM is the resource ID
<bloom>
- unk6 grabs a LOT of IDs (as returned), within the massive interval I think userspace allocates the IDs it actually needs for things like command buffers?
<bloom>
- the thing at offset 0xe4 of my compute trace is the Encoder ID... probably just used to match up with Instruments, buy it's much too late here to test that now.
<marcan>
bloom: that firmware should be loaded by iBoot2, before m1n1 runs
<bloom>
marcan: noted.
<marcan>
it should get copied into ./Firmware/Preboot/C1EB0F38-C67D-43AB-BA6F-3CFA88FC9E6F/restore/Firmware/agx/armfw_g13g.im4p for installation/recovery purposes
DanB91 has joined #asahi-gpu
<bloom>
see 2 lines later :p
<marcan>
and then on boot provisioning that should end up in AGX.img4 next to iBoot2
<marcan>
or something like that
<marcan>
and yes, RTKit is their RTOS
<marcan>
oh actually GFX.img4 I believe
<marcan>
so the trick is to look for pre-loaded: 1 in the ADT
<marcan>
firmware-name: GFX
<marcan>
that's under iop-gfx-nub
<marcan>
which is under sgx (yes, sgx, hi powervr)
<marcan>
all those pre-loaded: 1 nodes are things iBoot2 loads firmware for us for
<marcan>
either way, we can assume 1TR will be there, deleting 1TR is not a supported use case for us
<marcan>
and 1TR *is* a full macOS install with all necessary firmware (currently, wifi as far as we know)
<marcan>
so I do not expect us to ever have any redistribution issues, unless Apple starts having some hardware that 1TR lacks drivers for but needs firmware
<bloom>
marcan: Hmm, so, the GNU/Linux side doesn't need to know about firmware blobs, so it's like they're not really there.
<marcan>
yup, exactly
<bloom>
We can apply for RYF for the Mac Mini, then?
<marcan>
I guess!
<marcan>
except for the wifi
<bloom>
Well, as long as we pull out the wifi chi
<bloom>
--ninja'd
<marcan>
*registers a company to re-sell Apple M1 laptops with the wifi chip nerfed
<marcan>
wonder if there's a way to destroy it with e.g. firmware misconfiguring power, then we wouldn't even need to take the things apart
<marcan>
:-)
<bloom>
oh, that's a good question
<bloom>
definitely worth an engineering investigation
<bloom>
for your freedom
<marcan>
yup
<marcan>
will prioritize it
odmir has quit [Ping timeout: 258 seconds]
DanB91 has quit [Remote host closed the connection]