This document defines the isolation protocol (clean-room) under which this specification was written and under which the clean team must produce the reimplementation of the SpacemiT K3 (36.56.104.183) GPU firmware.
Development follows the classic two-team model separated by a documentation firewall:
docsClean/.GPL-2.0-only OR MIT), public MIPS32r2/microMIPS documentation, and the SpacemiT K3 Device Tree.drivers/gpu/drm/imagination/):
ROGUE_CR_* registers, masks, shifts, and MMIO offsets.rogue_fwif_*, rogue_mips_*, pvr_fw_info_header, pvr_fw_layout_entry, pvr_fw_device_info_header.ROGUE_FWIF_*, PVR_FWIF_DM_*, ROGUE_FW_GROUP_*, ROGUE_FW_LOG_*.36.56.104.183 silicon is required to operate the hardware (e.g., 0x0038, 0x0B08, 0x3970), it is described by its numeric offset, width, direction (R/W), observed value/bitmask, and observable hardware effect, explicitly marked as “no public name in mainline header”..text, .rodata, .data, .bss addresses, offsets relative to the internal $gp of the proprietary binary).img-rogue) that are not part of the public mainline contract.In case of doubt or apparent divergence between sources, apply the following precedence:
[P] Public mainline Linux kernel headers (drivers/gpu/drm/imagination/)
pvr_rogue_fwif_check.h, pvr_rogue_fwif_client_check.h, pvr_rogue_fwif_shared_check.h, pvr_rogue_mips_check.h), .fw container format (pvr_fw_info.h), MIPS definitions (pvr_rogue_mips.h), MMU (pvr_rogue_mmu_defs.h), and register names (pvr_rogue_cr_defs.h).[O] Evidence measured on a real board (SpacemiT K3 Pico ITX)
36.56.104.183 silicon (register values read from hardware, clocks/OPPs, APM/boot/render timings, reset/power-cycle behavior, and hardware controller responses).[D] Specification derived from silicon interaction
36.56.104.183 silicon to satisfy [P] and [O].If during implementation the clean team encounters a gap or ambiguity:
MMU_PAGE_FAULT (EVENT_STATUS bit 9), which fault status registers must be read and which clear bit must be written to EVENT_CLEAR?”0x0468 = 1 (TA context store)?”0x3970), and TPU registers (0x1858) differ across BVNCs.A clean-room reimplementation is considered functionally complete for the SpacemiT K3 (36.56.104.183) when it passes the incremental milestones below against the mainline drm/imagination driver:
| Milestone | Verifiable Requirement |
|---|---|
| M1 — Boot and Handshake | Loads via .fw v3 container with device_info (29 parameters), configures MIPS_BOOT_DATA, executes boot-gpu-init, completes firmware_started = 1 with visibility barrier, and responds to KCCB_CMD_KICK / INIT without compchecks errors. |
| M2 — Ping/Sync and Power/APM | Processes KCCB_CMD_HEALTH_CHECK, KCCB_CMD_POW (OFF_REQ/FORCED_IDLE_REQ/FORCED_IDLE_CANCEL_REQ), transitions through APM (100 ms idle → POW_OFF → warm power-on without hanging). |
| M3 — Compute (CDM, DM4) | Executes an arbitrary compute shader with proper UFO / Sync Checkpoint updates and MMU/SLC cache invalidation. |
| M4 — Transfer (3D-TQ, DM3) | Executes 3D-TQ operations (readback / texture copy with up to 3 MRTs) producing bit-exact output. |
| M5 — Full 3D Render (TA DM2 + 3D DM3) | Loads HWRTData + Freelist, executes geometry (TA) and fragment (3D with 6 ISP pipes, PBE up to 8 MRTs, ZLS, and RTA), completing full frames in Vulkan/GLES. |
| M6 — Stress (CSW + SPM + HWR) | Supports cooperative preemption (CSW store/resume on TA, 3D, and CDM), PM Out-of-Memory recovery via Partial Render (SPM) + FREELIST_GROW, and hang detection/recovery (HWR + freelist reconstruction) without requiring an SoC reboot. |