ROGUE_CR_MIPS_WRAPPER_CONFIG, offset 0x0810, field BOOT_ISA_MODE).EM_MIPS (ELF flags 0x72001001: noreorder, o32, micromips, mips32r2).mipsel-elf GCC or Clang with
soft-float microMIPS runtime helpers) works with standard freestanding ABI flags:
-O2 -std=gnu99 -march=mips32r2 -mmicromips -msoft-float -mno-abicalls -fno-pic -G0 \
-ffreestanding
0xCF800000 / 0xCFA00000) must be volatile so the
compiler never merges, reorders, or drops register writes and read-backs.jalr) must have bit 0
set (addr | 1) per the microMIPS ISA to remain in microMIPS mode.CACHE instructions must iterate over the virtual address range
covering newly written host data (such as Client CCB ranges) in 16-byte cache-line
steps.The image is delivered as an ELF with code/data sections, packed into a .fw container
(see memory-model for the header and layout table the host reads).
rogue_fwif_sysinit.firmware_started = false, and releases the MIPS core from reset.0xBFC00000 (KSEG1, uncached). Early
boot:
PerfCtl0/1) from
rogue_fwif_sysinit.firmware_perf;rogue_fwif_sysinit.fault_phys_addr);ROGUE_CR_MIPS_WRAPPER_IRQ_ENABLE, 0x08A0);sysinit/osinit and the initial core clock
from rogue_fwif_sysinit.initial_core_clock_speed;rogue_fwif_sysinit.firmware_started = true (and
firmware_started_timestamp). The mainline host polls this flag and treats the boot
as failed if it is not set within 5 s (P);WAIT.Important: reset/NMI is also the warm-boot path. During power management (see power-management) the host may restart the firmware, which re-enters at
0xBFC00000. On an NMI the firmware first saves the MIPS state into its private BOOT_DATA area, for diagnosis.
After WAIT, all work happens in three interrupt sources:
| Source | Vector | Responsibility |
|---|---|---|
| HW0 — timer | 0x9FC02400 |
CP0 Count/Compare expiry. Sets a “tick pending” flag and schedules a background task. Does no work in the ISR. |
| HW1 — BG task (MTS) | 0x9FC02500 |
Processes all Kernel CCB commands; HWR watchdogs; expired timers; re-evaluates the contexts on each DM’s wait list; SPM list. |
| HW2 — IRQ task (MTS) | 0x9FC02600 |
Reads ROGUE_CR_EVENT_STATUS: MMU faults, per-DM completion (geometry/3D/compute/USC), multicore XPU events; runs the scheduler; triggers HWR and power management; updates utilisation. |
“MTS” is the RGX hardware’s Micro Task Scheduler, which delivers the BG and IRQ tasks to
the MIPS as interrupts. The firmware schedules a BG task by writing
ROGUE_CR_MTS_SCHEDULE = 0.
Cause.IV = 1 (separate interrupt vectors), IntCtl.VS = 256 (256-byte spacing between
vectors — hence the vectors at …400/…500/…600).Status.IM2..IM4 enabled (mask 0x1C00): HW0 (timer), HW1 (BG), HW2 (IRQ).Status.IE and
restores the previous value on exit. Each Kernel CCB command is processed with IE
cleared.0x0B08 (0 = end of BG, 2 = end of IRQ; no
public name) and reads it back to enforce ordering.ROGUE_CR_TIMER (the GPU’s global 48-bit clock, ~2.4 MHz
on the reference board).CP0 Compare = (deadline − now) · 0x80 and
clears CP0 Count. The MIPS Count runs 128× faster than ROGUE_CR_TIMER (core
clock/2 against core clock/256), hence the factor 0x80.Timers are used for: the context-switch watchdog (HCS), the power deadline (APM latency), health checks, and operation timeouts.
0x9FC02000), which reads the physical PFN from the host page table and puts it into
the remap entry.EntryLo0/1 = 0, and its pair of remap entries (slot and slot+16) is disabled.CACHE operations over the whole cache, used in
the power teardown and before publishing data.CACHE operations) over freshly written
host data, e.g. new Client CCB bytes (see kernel-ccb).Before publishing data to the host or raising an interrupt to the host, the firmware runs a deterministic barrier:
1 to an uncached word reserved for this purpose (in the private part of the
BOOT_DATA page, see memory-model);EHB (execution hazard barrier);SYNC;ROGUE_CR_CORE_REVISION (offset 0x20) — a register read that forces ordering on
the bus.Only then does it write the host-visible offset/value or raise
ROGUE_CR_MIPS_WRAPPER_IRQ_STATUS (0x08A8).
CP0 PerfCnt0/1 (configured through PerfCtl0/1 from sysinit.firmware_perf) can be
sampled into HWPerf data. HWPerf is optional for the mainline target (see
hwperf-trace).
Firmware-only registers, programmed through XPU broadcast, allow breakpoints in USC
shaders: 0x4030 address, 0x4038 handler, 0x4040 control (bits 2:0 slot/DM, bit 3
enable), 0x4050/0x06D8 temporaries (D, no public names). They are enabled per
memory context (rogue_fwif_fwmemcontext.breakpoint_addr, bp_handler_addr,
breakpoint_ctl) through the KCCB BP command. See kernel-ccb.