freedreno: (Mostly) finish afuc decoding for a6xx, add tests
With this, we now decode every instruction in a630_sqe.fw
, except for things that are actually data. The only things I know of that we're currently missing are:
- Flags on
cwrite
/cread
/load
/store
. Currently we only know what one of them (0x4
) does, but the firmware uses all 4, so this needs more RE. - Printing pipe registers, like how we print control registers. This is complicated a bit by how the firmware frequently does
mov $addr, 0xa204 << 16
which is actually something likemov $addr, ((NRT_DATA << 8) | 0x4) << 16
where the extra| 0x4
probably makes sure that successive writes to$data
write to the same register (i.e.NRT_DATA
). Getting the disassembler to spit out the decoded version of that, and properly assembling it, seems tricky.
Finally, now that we're more-or-less feature complete, add a mock a6xx firmware to test the assembly/disassembly.