| Mode | Name | Size | |
|---|---|---|---|
| -rw-r--r-- | README.md | 2827 | logstatsplainblame |
| -rw-r--r-- | REVERSING.md | 3990 | logstatsplainblame |
| -rw-r--r-- | smu_13_0_0_runtime_body.bin | 261632 | logstatsplainblame |
| -rw-r--r-- | smu_13_0_0_xtensa.elf | 265728 | logstatsplainblame |
| -rw-r--r-- | smu_flash_code.bin | 108672 | logstatsplainblame |
| -rw-r--r-- | smu_flash_xtensa.elf | 112768 | logstatsplainblame |
Navi31 SMU (MP1 13.0.0) firmware — Tensilica Xtensa — for reversing
Architecture (CORRECTED — it is NOT RISC-V/RS64)
The Navi31 / gfx1100 SMU (MP1, "PMFW") runs on a Tensilica Xtensa core
(little-endian, windowed ABI). Verified on smu_13_0_0.bin:
ENTRY(0x36) = 1305 andRETW.N(0x1df0) = 1543 — windowed functions start withENTRY, end withRETW.N(~1400 functions).RET.N= 3 (windowed ABI).- Not RISC-V: pure RV64 needs every insn low-2-bits=
11(~100%); this maxes at 33% (LE) / 58% (BE). RV64C decode is incoherent garbage.
Only the MEC/MES on this GPU are RS64/RISC-V. The SMU is Xtensa (as it has been on prior AMD GPUs). The tinygrad/7900xtx repo lists the SMU as "(RS64?)" — that question mark was correct; it's Xtensa.
Files
| file | what |
|---|---|
smu_13_0_0_xtensa.elf |
runtime image (smu_13_0_0.bin, ucode v78.131.0 ≈ live 78.133.0). EM_XTENSA(94), ELF32 LE, base 0. Start here. |
smu_13_0_0_runtime_body.bin |
raw body inside the ELF |
smu_flash_xtensa.elf |
SMU copy from board SPI (spiflash.bin@0xb6c00), boot/older version, for diffing |
smu_flash_code.bin |
raw SPI SMU body |
How to load
- Ghidra: recognizes
EM_XTENSAand offers the Xtensa language (Xtensa:LE:32:default). Use that. (The tinygrad repo already uses Ghidra for RS64 —mec/make_ghidra_script.py.) - IDA: stock IDA has no Xtensa module — the current riscv session on port
13343 will NOT decode this. Load with a community Xtensa processor plugin, or
reverse in Ghidra. (The
.elf.id0/.id1/...files here are the stale riscv DB.)
Layout (offsets = addresses at base 0)
0x000..0x100SHA +$PS1signed header0x100..0x1000version/descriptor (version word repeated + a small table)0x1000..0x3800code block 1 (boot/init) — dense ENTRY/RETW.N0x4000..0x1c000data tables (~96 KB: DPM / PPTable / AVFS) — sparse0x1c000..0x40000main code (~145 KB) — dense ENTRY/RETW.N The PSP loader strips$PS1and loads the Xtensa image to MP1 IMEM (real base unknown; header load-addr field = 0). Base 0 works for PC-relative flow; rebase if L32R literal pointers need it.
Reversing hooks
- Xtensa
L32R(PC-relative backward literal loads) reveal absolute data/register addresses — follow them to find the SMU MMIO map. - Message dispatcher: the mailbox is
C2PMSG_66=MSG /_82=ARG /_90=RESP (79PPSMC_MSG_*, seetinygrad/runtime/autogen/am/smu_13_0_0.py). Find the poll of the MSG register and the switch on the message id — that gates the whole host-reachable surface we probed (e.g.GetVoltageByDpm's AVFS formula, theTransferTable*DMA path,SetDriverDramAddr). - Hardware oracle for correlating code↔behavior:
probe_smu_*.pyin...
