Five-version diagnostic chain landing on a state where every IP block
initializes on hardware (IPDiscovery → SDMAInit). The decisive fixes:
v0.1.21 — port minimal smu_smc_hw_setup
PMFW must enable DPM before the IMU autoload state machine fires.
GetDriverIfVersion + SetDriverDramAddrHigh/Low (64KB VRAM slot via
fwBuf bump) + RunDcBtc + EnableAllSmuFeatures. PMFW returns
UnknownCmd for SetAllowedFeaturesMaskLow/High on this build, so the
mask-set is non-fatal — EnableAllSmuFeatures with the IFWI-baked
default mask is what trips the gate. running_features = 0x488f19e_
0x38fffcfb (DPM_GFXCLK + DPM_FCLK + DPM_UCLK + …) and BOOTLOAD_STATUS
transitions 0 → 0x8000003f within < 1 ms.
v0.1.22 — pin VRAM bump allocator to LOW BAR0-mapped region
BAR0 on R9700 + Apple Silicon + TB5 maps the BOTTOM 256 MB of VRAM
(FB_LOCATION_BASE = vram_start), not the top like most desktops. The
bump allocator was initialised with visible_base = vram_start +
(real_vram_size - visible_vram_size) which produced gpu_va near
vram_start + 32 GB — far outside BAR0. CSB write through
bar0_memcpy_to_vram page-faulted and killed the dext immediately
after autoload printed success. Fix: visible_base = vram_start, with
the first 24 MB reserved for PSP's hardcoded slots.
Also in this commit (work since v0.0.63):
- PSP TA bin parser + psp_asd_initialize (LOAD_ASD cmd_id 0x4) wired
between AUTOLOAD_RLC and psp_rl_load (v0.1.19)
- PSP ring KM=2, rb_frame 5-field-only, HDP flush+readback,
fw_pri-memset-before-memcpy (v0.1.14–0.1.18)
- Per-IP firmware extractors (RLC v2.x, MES uni_mes, GFX RS64,
SDMA v7), bump-allocated fwBuf slots per LOAD_IP_FW frame
- GMC + MMHUB + GFXHUB gart_enable port (mmhub_v4_1_0 / gfxhub_v12_0),
GART PT in VRAM at vram_start + 0x700000, CONTEXT0 enable
- RLC autoload wait + CSB content fill + SRM enable + CSIB program
- CP / MES / SDMA / GFX stage handlers (microcode signed off, no
live PM4 yet)
README updated to reflect v0.1.22 state. Deleted stale WORKLIST.md,
ROADMAP.md, and docs/PORTING_NOTES.md / docs/*PLAN*.md per session
cleanup; docs/ is gitignored going forward (audit-2026-05-22/ lives
there locally with the synthesis + per-agent reports + v0.1.19/0.1.20
plans).
Next frontier: first PM4 packet on a live ring (KIQ NOP smoke test) or
SDMA VRAM→VRAM copy. Bringup itself is solved.
extract_rlc now emits sub-bins first and RLC_G last, matching the
AMDGPU_UCODE_ID_* enum order at amdgpu_ucode.h:515-529. Host load
sequence reordered to SDMA → CP_RS64 → MES → IMU → RLC, mirroring
psp_load_non_psp_fw's iteration of firmware.ucode[].
Added psp_rlc_autoload_start (GFX_CMD_ID_AUTOLOAD_RLC = 0x21) and
called it right after RLC_G's LOAD_IP_FW returns success, same place
upstream amdgpu_psp.c:3113-3121 fires it.
psp_load_toc (GFX_CMD_ID_LOAD_TOC = 0x20) ported as well, but the
host doesn't call it: gc_<v>_toc.bin is only used by the
AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO path, not AMDGPU_FW_LOAD_PSP. The
implementation is kept for the backdoor-autoload mode we may want
later (and because it's needed regardless on psp_v14_0_5).
Bumped to 0.0.67.
Open: SDMA / CP_RS64 / MES still return TEE_BAD_PARAMETERS (0xFFFF0006)
on real hardware. SMU and IMU pass. Same firmware load path, same
fw_pri staging address, different acceptance — strongly suggests a
signature/version mismatch between the bundled gc_12_0_1_* / sdma_7_0_1
blobs and the psp_14_0_3 SOS we're using. RLC sub-bins return PSP
status 0x5, a distinct error.