#
✕ nick:marcan
#asahi-re · 2021-01-05 10:23
marcanthey use 16-bit tokens, so that looks like 0x385,0x103 for the first, and 0x103,0x501,0x385 for the second
#asahi-re · 2021-01-05 10:22
marcanI think that might include things like what pins it can be muxed on
#asahi-re · 2021-01-05 10:22
marcanyeah, I suspected that too
#asahi-re · 2021-01-05 09:36
marcan(if we need to I will)
#asahi-re · 2021-01-05 09:36
marcanit's not hard to dump the ROM, you can use SWD on the chip pins or just flash some firmware that dumps the ROM out, but I haven't bothered to go there yet
#asahi-re · 2021-01-05 09:35
marcanbasically the SPI code gets loaded at a (hieously unaligned) SRAM offset, called, and it overrides function pointer table entries that the ROM uses. The ROM has thunks that call through those pointers to itself (initially), and the SRAM code has more thunks that call back into the ROM functions.
#asahi-re · 2021-01-05 09:35
marcanTI's documentation is horrible on this whole thing, but that's how it actually works
#asahi-re · 2021-01-05 09:34
marcanrwhitby: the PD controller firmware on those TI devices is actually an internal OTP/ROM thing; the external SPI flash only loads *overrides* for the internal ROM code
#asahi-re · 2021-01-05 09:06
marcanI have the flash area decompiled, but it only overrides some hookable ROM functions, so it's hard to see the overall code flow, you only get what they added/redid
#asahi-re · 2021-01-05 09:05
marcanfor machines with the same chip I mean
#asahi-re · 2021-01-05 09:05
marcankeep in mind those controllers have a flashed firmware that overrides ROM methods, but I *think* Apple uses the same exact firmware for all Intel macs and probably the M1 ones too? only the parameter area varies for each Intel one
#asahi-re · 2021-01-05 09:05
marcanI am not familiar with the MIPI thing, thanks, I'll take a look :)
#asahi-re · 2021-01-05 09:04
marcanrwhitby: that came from the t8021 guys, and they said it works on the Intel ones maybe? but I'm not sure tbh
#asahi-re · 2021-01-05 07:40
marcan(writing some website docs now, will get back to hardware in a bit)
#asahi-re · 2021-01-05 07:39
marcanthanks!