This directory contains the behavioral, hardware architecture, and ABI contract specification for a clean-room reimplementation of the firmware for the Imagination PowerVR Rogue BXM-4-64 MC1 GPU (BVNC 36.56.104.183) integrated into the SpacemiT K3 SoC.
The primary target of this specification is the open mainline Linux (drivers/gpu/drm/imagination) contract, FWIF ABI version 1.1 (v3 container, public identifier powervr/rogue_36.56.104.183_v1.fw). Where relevant for cross-validation on real hardware, the documentation also records surface-level differences relative to the legacy vendor (img-rogue / DDK 24.2) contract without mixing private layouts into the target specification.
Before starting any implementation, read clean-room-process.md.
Every technical statement in this specification follows three provenance levels:
[P] Public — Normative contract derived directly from open sources (GPL-2.0-only OR MIT headers from the mainline drivers/gpu/drm/imagination driver, SpacemiT K3 Device Tree, public MIPS32 Release 2 / microMIPS architecture, and public PowerVR Rogue documentation).[O] Observed on Hardware — Behavior or register value empirically verified on a SpacemiT K3 Pico ITX board during real operation (boot, 3D, Compute, 3D-TQ transfer, preemption, APM/DVFS, HWPerf, and HWR).[D] Derived Specification — Behavioral requirement or register programming sequence required for the 36.56.104.183 silicon to respond correctly to the [P] contract and reproduce the [O] behavior, described exclusively in terms of hardware and public ABI.| # | Document | Contents |
|---|---|---|
| 01 | clean-room-process.md | Clean-room firewall, what is allowed and what is prohibited, source hierarchy, and acceptance criteria |
| 02 | overview.md | BXM-4-64 (36.56.104.183) GPU architecture, SpacemiT K3 SoC integration, platform resources, and control loop |
| 03 | open-vs-closed.md | Relationship between the open mainline contract (drm/imagination 1.1) and the legacy vendor driver (DDK 24.2) |
| # | Document | Contents |
|---|---|---|
| 04 | execution-environment.md | MIPS32r2 / microMIPS core, boot/reset/NMI, CP0 vectors, interrupts (HW0/HW1/HW2), L1 caches, barriers, and stack |
| 05 | memory-model.md | MIPS virtual map, REMAP1..5, BRN 63553 workaround, 36-bit MIPS page table, TLB (16 entries), GPU MMU (3 levels, 40b→36b), and .fw v3 container |
| 06 | host-interface.md | Shared memory, MIPS_BOOT_DATA, boot handshake (FW_BOOT_STAGE + firmware_started), compchecks, Host↔FW IRQs, and start/stop |
| 07 | data-structures.md | Exact layouts and offsets of shared structures (connection_ctl, osinit, sysinit, sysdata, osdata, runtime_cfg, contexts, HWRTData, Freelist, HWR, GPU Util) |
| # | Document | Contents |
|---|---|---|
| 08 | kernel-ccb.md | KCCB ring (Host → FW), rogue_fwif_ccb_ctl, KCCB command catalog (0x2ABC....), and return slots |
| 09 | firmware-ccb.md | FWCCB ring (FW → Host), slot acquisition, and FWCCB command catalog (101..112) |
| 10 | client-ccb.md | Per-context cCCB ring (Woff/Roff/Doff/wrap_mask), 40 B header, TASK vs generic commands, UFOs, and Sync Checkpoints |
| 11 | command-structs.md | Kick payloads (cmd_geom, cmd_frag, cmd_compute, cmd_transfer) with verified sizes/offsets and active fields on K3 |
| 12 | scheduler.md | Per-DM queues (GP, GEOM, FRAG, CDM), scheduling, cooperative preemption (CSW store/resume), overlap matrix, and kick admission check |
| 13 | data-masters.md | Data Masters present/absent on K3, MemCtx activation/deactivation across the 8 BIF banks (BIF_CAT_BASE0..7), and per-DM completion flush |
| # | Document | Contents |
|---|---|---|
| 14 | boot-gpu-init.md | GPU unit initialization sequence on K3 BXM-4-64: dynamic SLC detection (0x3970), PDS/USC bases, BXM-4-64 unit defaults, polls, and MTS routing |
| 15 | kick-geometry-ta.md | Register programming for Geometry/TA kick (DM2), loading HWRTData and Freelist into PM, TE/PPP/VDM/RTA/RTC, CSW, and completion |
| 16 | kick-compute-and-3d.md | Register programming for Compute/CDM (DM4), Fragment/3D (DM3, 6 ISP pipes, 8 PBE MRTs, ZLS), and 3D-TQ Transfer (DM3, 3 MRTs) |
| 17 | partial-render-spm.md | Full PM Out-of-Memory flow (EVENT_STATUS b7), ready_pages, FREELIST_GROW, Partial Render (0x0338), and post-PR TA resume |
| 18 | power-management.md | Power state machine (POW_OFF/ON/FORCED_IDLE/IDLE), APM (100 ms), unit power control (0x0038), final power-off, DVFS, and CR_TIMER |
| 19 | hardware-recovery.md | HWR watchdog (deadline and 3 verification stages), MMU page fault, poll failure, full soft reset, DM recovery, and freelist reconstruction |
| # | Document | Contents |
|---|---|---|
| 20 | board-testing-oracle.md | On-board acceptance oracle: .fw container pre-flight, safe load/reload, and stages A–F (cold boot, per-DM sanity, vkfwtest, APM/DVFS, HWR, stress) |
| 21 | observed-sequences.md | Real sequences measured on a SpacemiT K3 Pico ITX board (boot, 3D, CDM, 3D-TQ, CSW, overlap, APM, DVFS, HWPerf), platform pitfalls, and open gaps |
| 22 | registers.md | Consolidated map of public ROGUE_CR_* and FW-only registers on K3 BXM-4-64, including per-DM flush, with active snapshot observed on board |
| 23 | hwperf-trace.md | HWPerf V2B stream, 6 BXM-4-64 mux blocks, FW Trace ring buffer (12,000 dwords), and operational constraints on K3 |
| 24 | trace-ids.md | Public pvr_rogue_fwif_sf.h contract, log groups (log_type), and key events per subsystem |
| 25 | glossary.md | Glossary of acronyms and technical terms for the PowerVR Rogue BXM-4-64 architecture and SpacemiT K3 SoC |
36.56.104.183, 1 cluster, 1 raster pipe, 6 ISP/IPP pipes, 128 KiB configurable SLC (1 bank, 512-bit line), 8 OSIDs, 36-bit physical bus, 40-bit virtual address space, MIPS32r2 / microMIPS firmware processor.GP (DM0), GEOM/TA (DM2), FRAG/3D + 3D-TQ (DM3), CDM (DM4). Absent: TDM (FASTRENDER_DM), TLA, RAY, CDM_USER_MODE_QUEUE.NUM_ISP_IPP_PIPES=6, cap in 0x0FD8 = 6, not 4).0x3970 (clears bypass bits in 0x3828/0x382C when >= 0x80).TPU_DM_GLOBAL_REGISTERS and TPU_CEM_DATAMASTER_GLOBAL_REGISTERS present — CDM explicitly programs 0x1858 (tpu_tag_cdm_ctrl).XE_TPU2 / PBE2_IN_XE-specific unit defaults during boot-gpu-init (distinct PDS/USC/TPU/TE/PBE register values documented in boot-gpu-init.md).MIPS_ADDR_REMAP5 mapping physical address 0x0 to the boot code buffer (documented in memory-model.md).pvr_fw_mips and pvr_fw_startstop require a cache coherency barrier + 0xBFC01800 before signaling firmware_started = 1 (documented in host-interface.md).This specification is distributed under the Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA-4.0) license. See the LICENSE file for the full terms.
(Note: public ABI definitions referenced from the Linux kernel drivers/gpu/drm/imagination/ remain under their original GPL-2.0-only OR MIT license.)