#asahi-re · 2022-10-07 13:49
Jamie[m]dottedmag: nice#asahi-re · 2022-10-07 13:48
Jamie[m]oh if i get rid of all the newlines i can paste it into the hypervisor repl haha#asahi-re · 2022-10-07 13:42
Jamie[m]*optimal#asahi-re · 2022-10-07 13:42
Jamie[m]what's the process for reloading a tracer? i get the impression my current "hard shutdown the mac, pick an alternate boot option, re-chainload, reboot macos" workflow isn't quite optional haha#asahi-re · 2022-10-07 13:12
Jamie[m]guess i should test this one on real hardware before going further#asahi-re · 2022-10-07 13:10
Jamie[m]and then i guess poll it from a second thread in m1n1, a la the i2c logic analyzer#asahi-re · 2022-10-07 13:10
Jamie[m]could just append to the existing log ringbuffer, as long as macos doesn't choke seeing unexpected stuff there#asahi-re · 2022-10-07 13:09
Jamie[m]s#asahi-re · 2022-10-07 13:09
Jamie[m]to trace peripheral acces#asahi-re · 2022-10-07 13:08
Jamie[m]and add in a debug exception handler#asahi-re · 2022-10-07 13:07
Jamie[m]but i'll make it write to demcr to enable monitor debugging#asahi-re · 2022-10-07 13:07
Jamie[m]currently it writes to the log buffer, it's working correctly under your emulator#asahi-re · 2022-10-07 13:06
Jamie[m]alright i built a firmware patcher that tacks on an extra function that runs before start#asahi-re · 2022-10-07 12:28
Jamie[m]oh duh of course it counts as under software control, i misread how the function was implemented, thought you had found mem read/write functionality in cm3_ctrl lmao#asahi-re · 2022-10-07 11:49
Jamie[m]and handle things that way#asahi-re · 2022-10-07 11:49
Jamie[m]however we should still be able to patch the firmware to add in a DebugMonitor exception handler#asahi-re · 2022-10-07 11:48
Jamie[m](I am writing it alongside DBGKEY, don't think that's the issue)#asahi-re · 2022-10-07 11:48
Jamie[m]and writes to it don't stick using m3_write, so i guess that counts as software control#asahi-re · 2022-10-07 11:47
Jamie[m]C_DEBUGEN "can only be set to 1 from the DAP, it cannot be set to 1 under software control"#asahi-re · 2022-10-07 11:47
Jamie[m]ah dang#asahi-re · 2022-10-07 11:27
Jamie[m]a BPU too#asahi-re · 2022-10-07 11:23
Jamie[m]so maybe no need for emulation if we want to trace firmware's peripheral access#asahi-re · 2022-10-07 11:22
Jamie[m]("0x4F000000 if four comparators for watchpoints only are present")#asahi-re · 2022-10-07 11:21
Jamie[m]we have a watchpoint unit :3#asahi-re · 2022-10-07 11:21
Jamie[m]rqou_: i recommend you m3_read(0xe0001000)#asahi-re · 2022-10-07 11:21
Jamie[m]hahahaha#asahi-re · 2022-10-07 10:14
Jamie[m](in my dumps at least)#asahi-re · 2022-10-07 10:14
Jamie[m]in both cases the extra word is all zeros so no big deal either way i guess#asahi-re · 2022-10-07 10:12
Jamie[m]weird haha#asahi-re · 2022-10-07 10:07
Jamie[m](as with the copy of 236 words of per-slice stuff, when it repeats every 237)#asahi-re · 2022-10-07 10:07
Jamie[m]rqou_: think the word count in your understanding of piodma could be off by one? the things at 0x8b504 repeat every 11 words and are loaded into an array of 11-word structs, while your log says it's copying 10 words#asahi-re · 2022-10-07 09:38
Jamie[m]ah nice#asahi-re · 2022-10-07 09:33
Jamie[m]so maybe the ones before that ARE 9, one for each codec#asahi-re · 2022-10-07 09:33
Jamie[m]hmm although data_40100030 is special actually, it's accessed from way more places#asahi-re · 2022-10-07 09:18
Jamie[m]ah nice the copy of 236 words (0x3b0 bytes) from 0x00000724 lines up with the fact that i saw a repeating block every 0x3b4 bytes starting 0x00000724, once for each slice in the frame#asahi-re · 2022-10-07 09:08
Jamie[m]oh yeah nah that doesn't add up, all those 401000xx regs are accessed by isrs for all the different codcs#asahi-re · 2022-10-07 09:07
Jamie[m]which the code around the pc implies there is#asahi-re · 2022-10-07 09:06
Jamie[m]is it avc video? it'd make sense that there's a block of 9 fifos there starting at 401000c and you're writing to the one at [4], following the general pattern of 4 HEVC then 4 AVC then 1 longhorn, but it'd be odd then that there's a 10th one at 40100030#asahi-re · 2022-10-07 08:52
Jamie[m]oo awesome#asahi-re · 2022-10-06 10:23
Jamie[m]gotta finish this driver before the next apple hardware cycle when the term M3 becomes too ambiguous :P#asahi-re · 2022-10-06 10:22
Jamie[m]ty#asahi-re · 2022-10-06 10:16
Jamie[m]"mum can we have m1n1 hv" "we have m1n1 hv at home" m1n1 hv at home:" etc etc#asahi-re · 2022-10-06 10:16
Jamie[m]i might see if i can implement my proxy-to-actual-hardware thing tonight#asahi-re · 2022-10-06 10:16
Jamie[m]cool#asahi-re · 2022-10-06 10:11
Jamie[m]if it lets us do fairplay then fairplay is broken#asahi-re · 2022-10-06 10:09
Jamie[m]if this works out we can outdo lina by writing not just the kernel module in rust but also the firmware :P#asahi-re · 2022-10-06 10:05
Jamie[m]yeah i just put MEMSRC at +4 directly after CFG instead of leaving a gap haha#asahi-re · 2022-10-06 10:04
Jamie[m]that would explain some mistakes :P#asahi-re · 2022-10-06 10:04
Jamie[m]oh i think i typed all these peripheral names from tunables into binaryninja by hand lmao#asahi-re · 2022-10-06 10:03
Jamie[m]hmm yep i sure do