#
✕ nick:rqou_
#asahi-re · 2022-10-07 10:11
rqou_it might be a firmware bug?
#asahi-re · 2022-10-07 10:10
rqou_(it's a mess, sorry)
#asahi-re · 2022-10-07 10:10
rqou_i.e. https://github.com/rqou/m1n1/blob/d438b8038868d5d343b2d6ef6d727ce67e9a6458/proxyclient/experiments/avd.py
#asahi-re · 2022-10-07 10:10
rqou_but i have a hardware test of the piodma, so ???
#asahi-re · 2022-10-07 10:09
rqou_yeah, uh, i noticed that too
#asahi-re · 2022-10-07 09:36
rqou_*codec
#asahi-re · 2022-10-07 09:36
rqou_i am guessing (once again based on insufficient evidence) that coded "10" is the fairplay engine
#asahi-re · 2022-10-07 08:50
rqou_https://gist.github.com/rqou/00ed58867bff78936e24e757d15934a0
#asahi-re · 2022-10-07 08:48
rqou_(it spits this out once i actually plug in piodma emulation into my emulator)
#asahi-re · 2022-10-07 08:48
rqou_which should be the "real" hardware decoder commands
#asahi-re · 2022-10-07 08:48
rqou_afaict the firmware generates a command stream (of unknown format) that it then writes into a fifo at addresses around 0x4010001c
#asahi-re · 2022-10-07 08:47
rqou_pieces seem to really be falling together a bit wrt my understanding of AVD
#asahi-re · 2022-10-06 10:22
rqou_good night, good luck
#asahi-re · 2022-10-06 10:22
rqou_https://twitter.com/rqou_/status/1577967077955993600
#asahi-re · 2022-10-06 10:14
rqou_next i would need to dump some frame params, and actually implement the piodma copy
#asahi-re · 2022-10-06 10:14
rqou_this actually gets all the way through to enabling the codec hardware IRQs
#asahi-re · 2022-10-06 10:14
rqou_i need to sleep, but here you go: https://github.com/rqou/m1-avd-reverse-engineering/blob/main/avd_emu.py
#asahi-re · 2022-10-06 10:13
rqou_anyways
#asahi-re · 2022-10-06 10:13
rqou_although we _might_ be able to play SD trailers etc. that don't require a secure boot chain
#asahi-re · 2022-10-06 10:13
rqou_i was going to ignore anything related to fairplay for now
#asahi-re · 2022-10-06 10:09
rqou_might be less confusing than apple's
#asahi-re · 2022-10-06 10:09
rqou_maybe
#asahi-re · 2022-10-06 10:01
rqou_i think you have it wrong
#asahi-re · 2022-10-06 10:01
rqou_ok, all except RUN_CONTROL
#asahi-re · 2022-10-06 10:00
rqou_https://github.com/rqou/m1n1/blob/avd/proxyclient/m1n1/hw/avd.py#L214
#asahi-re · 2022-10-06 10:00
rqou_as well as all of mailbox (which has been there for... quite a while)
#asahi-re · 2022-10-06 10:00
rqou_https://github.com/rqou/m1n1/blob/avd/proxyclient/m1n1/hw/avd.py#L95
#asahi-re · 2022-10-06 10:00
rqou_but yeah, PIODMA has been pushed for a few days now
#asahi-re · 2022-10-06 09:59
rqou_no idea about any of the other actually-video-related DMA
#asahi-re · 2022-10-06 09:59
rqou_the "PIODMA" block itself is used only in the dumbest possible way by the firmware
#asahi-re · 2022-10-06 09:57
rqou_the emulated firmware gets all the way to trying to poke the PIODMA peripheral now
#asahi-re · 2022-10-06 09:57
rqou_oh right now i'm doing something slightly different of "feed captured commands into an emulated firmware and see what it spits out"
#asahi-re · 2022-10-06 09:45
rqou_https://i.imgur.com/BT6MZqN.png
#asahi-re · 2022-10-06 09:42
rqou_fake mailbox
#asahi-re · 2022-10-06 09:42
rqou_100% software right now
#asahi-re · 2022-10-06 09:42
rqou_no i'm not
#asahi-re · 2022-10-06 09:40
rqou_with a hack-tastic fake NVIC
#asahi-re · 2022-10-06 09:40
rqou_well, i've just hooked up the firmware in unicorn engine and i can successfully send the start session command and get its reply
#asahi-re · 2022-10-06 09:05
rqou_epic fail time
#asahi-re · 2022-10-06 09:05
rqou_so something is just broken in Unicorn on some combination of macOS/aarch64/m1
#asahi-re · 2022-10-06 09:05
rqou_Unicorn Engine is working fine on my x86_64 laptop
#asahi-re · 2022-10-06 09:05
rqou_wtf, of course
#asahi-re · 2022-10-06 09:00
rqou_a different address range works correctly
#asahi-re · 2022-10-06 09:00
rqou_my hook for emulating MMIO triggers only once, but only for one of the address ranges
#asahi-re · 2022-10-06 08:57
rqou_but it's flaking out in a way that doesn't make sense
#asahi-re · 2022-10-06 08:57
rqou_well, Unicorn Engine wraps qemu
#asahi-re · 2022-10-06 08:54
rqou_Jamie[m]: got any good cortex-m3 emulators?
#asahi-re · 2022-10-06 08:53
rqou_except Unicorn Engine is behaving like the flaky pile of hacks it is
#asahi-re · 2022-10-06 08:53
rqou_Jamie[m]: i'm literally trying that right this moment
#asahi-re · 2022-10-05 09:21
rqou_not clear what that is or how it works yet

plus ›