Details the geometry kick (DM 2/6) at register level: which registers must be programmed, with what data, and which ordering dependencies are mandatory. These are hardware/behaviour facts, not a routine to copy: the code organisation is free as long as the dependencies are respected. Complements data-masters and command-structs.
CR[off]: register at offset off in a core’s bank, in the window
0xCF800000 + core·0x80000 (see memory-model).BCAST[off]: broadcast write (all enabled cores, bank 0xCFA00000).On the
CR[set+off]notation used below (answers Q15). The geometry registers below are at fixed offsets (0xC00,0xC88,0x400, …) in the bank of the core that runs the geometry (the primary core for DM 2; the second core of the active list for DM 6). There is no extra per-“set” displacement or stride beyond the per-core bank stride (0x80000): on this single-core SoC every such write lands in the primary core’s bank. ReadCR[set+0xC00]below as “offset0xC00in the geometry core’s bank”. The traceSetup register set=Nreports the BIF page-catalogue slot chosen by the memory-context activation, not an addressing base for these registers. Observed (O): afterSetup register set=0 DM=2, the context’s page catalogue is inROGUE_CR_BIF_CAT_BASE1andROGUE_CR_BIF_CAT_BASE_INDEX = 0x101(TAandPIXELfields = 1). So trace set N means catalogue registerCAT_BASE{N+1}and index-field value N+1;CAT_BASE0belongs to the firmware. Compute and transfer bind the same way throughROGUE_CR_BIF_CAT_BASE_INDEXand do not use a separate addressing base either.
- Public names, where they exist, are from
pvr_rogue_cr_defs.h. The public header names only a subset of the registers; the others are given by offset.
Provenance. Offsets and dependencies: D (firmware analysis), confirmed by O (the milestones appear in the trace:
Activate MemCtx,Setup register set,Kick TA). Values come fromrogue_fwif_cmd_geom(public header) and from the context state.
The context (rogue_fwif_fwcommoncontext: memory context, register set), the geometry
command (rogue_fwif_cmd_geom, right after the 0x28-byte header in the cCCB) and the
command offset (used in the trace entry and on retirement).
The phases below have a mandatory order: each depends on the previous one.
rf_cmd_addr is
non-zero, the firmware first runs a compute job from it (see the transfer kick in
kick-compute-and-3d). The mainline host leaves it 0.ROGUE_CR_BIF_CAT_BASE slot (1–7), which selects
the register set to use. Trace: BIF id 14, Activate MemCtx=… DM=… secure=…. Must
happen before any write to the register set.Observation run (O) behind phases B, C and E. Black-box observation on the board of one first-kick geometry job (
FIRSTKICK | LASTKICK, fromdEQP-VK.draw.renderpass.simple_draw.simple_draw_triangle_list, 256×256 target). The method compares the values in the geometry command (read from the cCCB while the job was live) and the addresses printed by the public trace with a read-only snapshot of the geometry core’s registers, taken while the GPU was held powered. Firmware: the open image v1.1, build 6976702 (the one this spec describes); the same mapping was also observed with the open image v1.0, build 6734358. Board DRAM at 1066 MT/s.
The two PM contexts (O, public trace). Geometry uses PM context 0 (trace “HW context 0”, “PMDM0”). Fragment uses PM context 1 (“HW context 1”, “PMDM1”). The observed order is:
Load Freelist … type: 0 (0:local,1:global) for PMDM0: FL Total
Pages …, FL-addr = …, stacktop = …, Alloc Page Count = …, then the same for type 1.TA RTData … loaded on HW context 0.Store Freelist … for PMDM0). This is
where the freelist state left by the geometry is captured; the trace shows
stacktop 0x1F → 0x10 and Alloc Page Count 0 → 6.Load Freelist … for PMDM1).Loading stack-pointers for 1 (0:MidTA,1:3D) on
context 1, MLIST = …, ALIST = …).3D RTData … ready on HW context 1.Registers observed holding the loaded PM state (O):
| Register | Observed value | Matches |
|---|---|---|
0x0248/0x024C |
0x80_0013_A000 |
rogue_fwif_hwrtdata.vheap_table_dev_addr (trace “VHeap”) |
0x0210/0x0214 (PM ctx 0), 0x0218/0x021C (PM ctx 1) |
0x80_0013_9000 (both) |
local freelist freelist_dev_addr (trace “FL-addr”) |
0x0224 |
0x1F |
local freelist stack top at rest (32 pages, trace “stacktop”) |
0x0270, 0x0278, 0x0280 |
0x2 |
ALIST stack pointer (trace “ALIST = 0x2”) |
0x02C0, 0x02C8, 0x02D0 |
0x9 |
MLIST stack pointer (trace “MLIST = 0x9”) |
ROGUE_CR_BIF_PM_CAT_BASE_{VCE,TE,ALIST}0 and …1 |
the same three values in both banks | page-catalogue entries of the HWRTData, bank 0 = PM context 0, bank 1 = PM context 1 |
The global freelist’s address (0x80_0004_8900 in this run) was not found in the sampled
ranges. On this single-core GPU only entry [0] of vce_cat_base[4]/te_cat_base[4] is
loaded into the bank’s PM_CAT_BASE_* registers.
Two observation runs on the open v1.1 image:
bigpb: a 1024×1024 target with millions of triangles, out-of-memory, freelist grows and
partial renders.In both, register snapshots were compared with the values printed by the public
Load/Store Freelist trace lines. Results:
| Register | Holds | Evidence |
|---|---|---|
0x0210/0x0214 |
local freelist base (freelist_dev_addr) of PM context 0 |
changes at the geometry load; equals the trace “FL-addr” |
0x0218/0x021C |
the same for PM context 1 | changes only at the fragment load, to the same address |
0x0224 |
local freelist stack top | 0x1F at rest (32 pages → total − 1), 0 when exhausted; equals the trace “stacktop” |
0x0398 |
local freelist allocated page count as loaded for PM context 1 (corrected by Q16k; the live counts are 0x03A0/0x03A8) |
6 and 20 in the two runs = trace “Alloc Page Count” |
0x039C |
local freelist allocated MMU page count as loaded for PM context 1 (corrected by Q16k; the live counts are 0x2000/0x2008) |
9 and 11 = trace “Alloc MMU Page Count” |
0x02D8/0x02DC (PM context 0), 0x02E0/0x02E4 (PM context 1) |
rogue_fwif_hwrtdata.pm_mlist_dev_addr |
alternates between the two HWRTData of bigpb at each geometry kick, and is loaded into context 1 at the fragment kick (D/O) |
0x0270/0x0278/0x0280, 0x02C0/0x02C8/0x02D0 |
ALIST / MLIST stack pointers | the first register of each triple follows the geometry, the other two take its value at the fragment kick |
Other answers:
0x0220 read back as 0 in every snapshot of the original firmware, including
while freelists were loaded (the low field holds the total page count and 0x0224 holds
the stack top; see Q16e–Q16g and Q29 below).0x0200–0x043F holds a value of the global freelist (address, total,
stack top, counts), although these values changed many times during bigpb. The global
freelist’s PM registers are in the 0x2078/0x20B8 banks (see Q16e–Q16g below).PM_CAT_BASE_* on a first kick: bank 0 (…0) receives new, valid (bit 0 = 1)
entries at every geometry kick, including first kicks where the host left the
HWRTData catalogue bases at 0. Bank 1 (…1) takes the same values at the fragment kick.
The PM fills bank 0 itself during the geometry, from the local freelist (see Q16f
below). The second word of
VCE0/TE0 (0x124C/0x1254) becomes non-zero only around partial renders.ROGUE_CR_PM_PARTIAL_RENDER_ENABLE (0x0338) read 0 in every
snapshot, and 0x03E0 read 1 throughout. (The PM context-mode select registers are
CR[0x03D0]/CR[0x03D4] and the self-clearing stack-pointer load triggers are
CR[0x0190]/CR[0x0288]; see Q29/Q29b below.)A second bigpb run on the open v1.1 image sampled 0x0200–0x0800 and 0x2000–0x2200 at
every freelist, OOM, grow and kick event. The global freelist’s base, size and stack pointer
change hundreds of times in that run, which makes matching possible.
1. Global freelist registers. They are in the 0x2000 block, as two banks with a
stride of 0x40. The bank at 0x20B8 belongs to PM context 0 (geometry), the bank at
0x2078 to PM context 1 (fragment). This mapping was corrected by Q16g: register sampling
at the loads shows the geometry load writing 0x20B8 and the fragment load writing 0x2078.
The trace lines used are UFL-TA-Base/UFL-3D-Base, Freelist update completed and
OOM: Resumed TA.
| Bank offset | PM ctx 0 (geometry) | PM ctx 1 (fragment) | Holds | Evidence |
|---|---|---|---|---|
+0x00/+0x04 |
0x20B8/0x20BC |
0x2078/0x207C |
global freelist base (64-bit) | equals the trace base |
+0x08 |
0x20C0 |
0x2080 |
stack pointer to load | written at every load and freelist update; the live +0x10 takes the same value within ≤ 13 µs (Q16g, Q16h) |
+0x10 |
0x20C8 |
0x2088 |
live stack pointer (the trace SP = …), maintained by the PM, not writable |
see the identity below; 0xFFFF = 65535 with all 65536 pages free, 9 at the partial render where the trace prints SP = 9 |
+0x18 |
0x20D0 |
0x2090 |
PB page count at the last freelist update/store | equals the trace “4PB” at those points (11212 at a grow update), then holds its value |
+0x1C |
0x20D4 |
0x2094 |
MMU page count at the same points | equals the trace “4PT” (19, 26, 124…) |
+0x20 |
0x20D8 |
0x2098 |
allocated PB pages (live) | 65400 at the partial render where the trace prints 4PB = 65400 |
+0x28 |
0x20E0 |
0x20A0 |
allocated MMU pages (live) | 126 at the same point (4PT = 126) |
When both PM contexts use the same global freelist (geometry and fragment running from the same parameter buffer), both banks are updated together and their live values move together.
In every snapshot of two runs, for both banks:
stack pointer + allocated PB pages + allocated MMU pages + 1 = total pages of the
freelist (for example 0xAEA + 0x2102 + 0x13 + 1 = 11264). The stack pointer counts down as
the PM hands out pages.
The local freelist has no copy in the 0x2000 block. Its registers are the
0x0210/0x0218, 0x0224 and 0x0398/0x039C given above, and the registers of Q16k.
2. Starting the PM. PM_PAGE_MANAGEOP (0x02A0) read 0 in all 37 snapshots,
including while the geometry was running and allocating. It goes to 1 only briefly, around
freelist updates (PM pause/unpause TA ALLOC, see
partial-render-spm). Nothing indicates that the firmware writes it
to start allocation on a first kick: 0 means “not paused”.
The public trace prints CONTEXT_PB_BASE set to 0x… when freelists are loaded:
0x3 at the geometry load, together with FL different between TA/3D: local: 1, global: 1;0x0 at the fragment load, when TA and 3D freelists are the same.Register 0x02B0 held this same value in 73 of 75 snapshots across three runs. It is
therefore the register behind CONTEXT_PB_BASE: bit 1 = local freelists differ and
bit 0 = global freelists differ between PM context 0 and PM context 1 (confirmed D,
see scheduler).
3. 0x0D00. With the original firmware the values seen were 0x30, 0x34 and 0x35
while geometry was running, 0x3F after jobs, and 0/1/4/5 at other moments. 0x0F was
never observed: in the original, bits 4 and 5 are set while the geometry runs. Which units
these bits stand for is not established.
4. Write-ordered list. Not provided. The complete ordered sequence of the original’s
register writes would be a transcription of its kick routine, which the clean-room rules
exclude, and the observation cannot produce it anyway. What this spec gives is the
registers, their values and sources, and the ordering constraints the hardware imposes.
Registers that are written and then self-clear during the kick (such as 0x0190/0x0288
and 0x0258/0x0290/0x0198, documented in Q29/Q29b below) are invisible to these
snapshots.
A third bigpb run on the open v1.1 image read, at each geometry kick, the PM_CAT_BASE_*
registers, both freelists’ page stacks and the HWRTData. All reads were done from the host,
through the GPU page tables of the application’s memory context. Six geometry kicks were
examined; they include first kicks of both HWRTData.
1. Who fills PM_CAT_BASE_*0. The PM, during the geometry, with pages it takes from
the local freelist. Evidence:
vce_cat_base[], te_cat_base[] and alist_cat_base
are all 0 (the host leaves them at 0).PM_CAT_BASE_VCE0, TE0 and ALIST0 are valid (bit 0 = 1).
Their ADDR fields are pages of the local freelist’s stack: entries 29, 18 and 13,
with the stack top loaded at 31 (trace FL-TA-Base … SP = 31).Nothing was found that the firmware writes to make this happen besides the freelist and PM
context registers already described (local and global freelist, CONTEXT_PB_BASE, VHeap,
MLIST). On a first kick, PM_CAT_BASE_*0 is loaded from the HWRTData’s catalogue base
addresses after the PM-MMU invalidation (see Q29/Q29b below).
Two corrections to the reading of the earlier answers:
0x0224 does not move while the PM allocates. In the original it stays 0x1F during
geometry, even after the PM has taken all 32 local pages (stores report SP = 0). It holds
the stack top as loaded, not the live one. A stalled 0x0224 = 0x1F is therefore not
in itself the symptom. The live local stack pointer was not identified: it reaches 0
quickly, and the snapshots only list non-zero registers.…1) at a geometry kick still holds the previous HWRTData’s catalogue pages,
which may already have been freed and reused for other data.2. Relation to HWRTData and freelists. The catalogue pages come from the local
freelist, not from the HWRTData’s own buffers. In this run, pm_mlist_dev_addr,
vheap_table_dev_addr, macrotile_array_dev_addr and rgn_header_dev_addr translate to
bus pages 0x84E86000/0x84E87000, 0x84E83000, 0x84E84000 and
0x84E88000/0x84E89800. These are outside the freelist and differ from every
PM_CAT_BASE value.
Example from the first kick (bus addresses; freelist entries are page numbers = bus address
12, as the host writes them):
| Item | Value |
|---|---|
| local freelist base / stack top at load | 0x80_00AB_D000 / 31 |
| local freelist entries 0…31 | 0x84E63, 0x84E64, … 0x84E82 (consecutive at the first kick) |
| global freelist base / stack top at load | 0x80_0004_8900 / 447 |
PM_CAT_BASE_VCE0 |
0x0000_0000_84E8_0001 = entry 29 |
PM_CAT_BASE_TE0 |
0x0000_0000_84E7_5001 = entry 18 |
PM_CAT_BASE_ALIST0 |
0x0000_0000_84E7_0001 = entry 13 |
VCE1, TE1, ALIST1 |
0 (no fragment yet) |
What the catalogue pages contain. While the geometry runs:
(page number << 4) | 1. The page number is
another page of the local freelist: 0x0084E7F1 in the VCE0 page points to page
0x84E7F.bus address | 0x11, and point to pages
outside the local freelist (0x8F796011, 0x96F85011, …) — parameter-buffer pages
allocated from the global freelist.ALIST1 page holds a list of 64-bit bus address | 1 entries for local-freelist
pages.The high word of PM_CAT_BASE_*1 (the public INIT_PAGE field, bits 59:40) was non-zero
only after partial renders (0x3EF4, 0x7DE8 in VCE1; 0xDD, 0x1BA in TE1).
3. Global freelist stack pointer: the live one is 0x20C8 (PM context 0, geometry) and
0x2088 (PM context 1, fragment). It is loaded through +0x08 of the bank; see the table
under Q16e above and Q16g below.
4. 0x0D00 bits 4 and 5. Not established. Observation only shows the following:
0x0D00 read 0x04, with the catalogue bases already
valid; it then read 0x34/0x35 while the geometry kept running.Four more bigpb runs on the open v1.1 image, sampled with a tight host loop (one sample
every 15–60 µs) instead of event snapshots:
0x0210/0x0224, 0x0250/0x0258, 0x02A0, 0x02B0,
0x0D00 and PM_CAT_BASE_*0;0x0200–0x02FC;0x0300–0x03FC;Only changes of value are visible. A register written with the value it already holds, or written and cleared within one sample, leaves no trace.
1. What fills the live stack pointers.
+0x08 register of the bank. On every load and every freelist
update (hundreds per run), +0x08 and the live +0x10 change to the same value in the
same sample, together with the base. Examples:
0x20B8 0 → 0x48900, 0x20C0 0 → 0x1BF, 0x20C8 0 →
0x1BF (trace UFL-TA-Base … SP = 447);0x2078 → 0x3E000, 0x2080 → 0x20, 0x2088 → 0x20 (trace
SP = 32);0x02A0 0 → 1, then the base, +0x08 and the live +0x10
change together (0x20C8 7 → 0x47), then 0x02A0 1 → 0.The live register is read-only (writes to it have no effect). It takes the +0x08 value
shortly after +0x08 is written. Q16h shows that this copy is a separate step and needs
PM state that is set on the first load.
The bank of PM context 0 is at 0x20B8, not 0x2078. 0x2078/0x2080/0x2088 are
the fragment-side bank.
0x0348 (PM context 0) and 0x0350
(PM context 1):
0x1F → 0x1B within ~60 µs of the first
geometry kick, then 2, 1, 0.0xA, 0x10, 0x12, 0x1F.0x0224 (loaded stack top, context 0) stays 0x1F throughout. Correction (Q16i): after
the first load, 0x0348 does not get back to 0x1F through a reload. The fragment returns
the local pages one by one, so it already reads 0x1F when the next geometry load comes.
Only the first load of a boot shows a real copy (0x0348 0 → 0x1F, in the same sample as
the 0x0224 write; see Q16i). At one fragment load,
0x0350 went 0x1F → 0, matching the trace FL-3D-Base … SP = 0. The register that
holds the loaded top for context 1 was not identified.
0x0250/0x0258: never seen non-zero in any sample. If they are written, they clear
within one sample. No load was seen to depend on them.2. Memory reads at load time. None were found to be needed. The values above appear in
the registers in the same sample as the writes, and no header is involved: the freelist in
memory is only the host-written stack of page numbers (pvr_free_list.c). The PM reads that
stack when it takes pages (Q16f: catalogue pages are stack entries). It reads it through the
geometry’s memory context, since the freelist base is a GPU virtual address in the
application’s context (the PM fetches stack entries through the bound TA BIF slot).
3. State right after the geometry load, before the geometry starts (first kick, run 4; order in which values changed, not a list of writes):
| Sample (µs from the first change) | Change |
|---|---|
| 0 | 0x20B8 → 0x48900, 0x20C0 → 0x1BF, 0x20C8 → 0x1BF |
| +64 | 0x02B0 → 3, 0x02D8 → this HWRTData’s MLIST, PM_CAT_BASE_VCE0 → 0 |
| +121 | 0x0348 0x1F → 0x1B, PM_CAT_BASE_VCE0 → new valid page; geometry running |
In run 2, the first changes at a first load were:
0x0244 0 → 0x80 (0x0240/0x0244 = 0x80_0000_0000, the PM general heap base set at
units init; see boot-gpu-init);0x0210/0x0214/0x0224;0x0248/0x024C, 0x02B0 and 0x02D8/0x02DC;0x0270, 0x02C0) and 0x02F8 start counting.So, just before the geometry starts:
0x20C8 already equals the stack pointer printed by the trace;0x0348 equals the local top (0x1F);PM_CAT_BASE_VCE0 is 0.The live global value is the +0x08 value and the live local value the 0x0224 value; the
step that copies them is examined in Q16h.
Three bigpb runs on the open v1.1 image after fresh reboots, with register reads from the
host only:
0x0200–0x03FC, 0x2000–0x20FC and 0x1200–0x12FC after GPU init (module
loaded, GPU powered, no job yet), and again after the job;0x20C0, 0x20C8, 0x0250, 0x0258, 0x0224 and 0x0348
over a whole run.1. After GPU init, before any job. Every register in 0x0200–0x03FC and 0x2000–0x20FC
reads 0, except:
| Register | Value after init |
|---|---|
0x0358 |
0x5 |
0x0388 |
0x1 |
0x03C0, 0x03C8 |
0x7F |
0x03E0 |
0x1 |
0x03F8 |
0xFF |
They keep these values after the job. The host cannot tell whether they are reset defaults or values the firmware writes at init. An implementation can compare them with its own idle read.
The first geometry load after boot changed values in this order (samples ~12 µs apart; order of changes, not a list of writes):
| Sample | Change | Note |
|---|---|---|
| 0 | 0x20F8 0 → 1 |
changes only here; stays 1 for the rest of the boot (also 1 after the job) |
| +56 µs | 0x0240/0x0244 0 → 0x80_0000_0000 |
|
| +69 µs | 0x03D0 0 → 0x100, 0x03D4 0 → 0x1 |
|
| +82 µs | 0x0210 → local base, 0x0224 0 → 0x1F, live 0x0348 0 → 0x1F |
same sample |
| +93 µs | 0x20C0 0 → 0x1BF, live 0x20C8 0 → 0x1BF |
same sample |
| +105 µs | 0x02B0 0 → 3 |
The three registers in bold that are not freelist registers, 0x20F8, 0x03D0 and
0x03D4, are programmed at units init and PM load (see boot-gpu-init
and Q29/Q29b below): they all change before the first live copy.
They behave as follows over the rest of the run:
0x20F8: 1 from the first load on; never changes again.0x03D0: bit 8 set at every geometry load. Bit 16 is set at every fragment load
(0x100 → 0x10100) and cleared at the next geometry load (0x10100 → 0x100).0x03D4: the same pattern one byte lower: bit 0 at the geometry load, bit 8 added at
the fragment load (0x1 ↔ 0x101).
The pattern fits “PM context 0 / PM context 1 loaded” flags. Whether the firmware writes them or the PM sets them is not visible from the host.
0x03F0 and 0x20F0: 0 → 3 some time after each fragment kick, and 3 → 0 at the next
geometry load. They are status-like and change only after the fragment starts, so they are
not a precondition for the geometry.0x02F8: 0 until the geometry runs, then counts up with the ALIST stack pointer. It is
a consequence of allocation, not a precondition.2. The copy into the live registers is a separate step. Over a whole run with ~6 µs
sampling, 0x20C0 changed 136 times:
0x20C8 took the new value in the same sample;+0x08 with the old live value, and the live
register follows 5–13 µs later.So writing +0x08 does not by itself update the live register; a later step does, within
~13 µs. Which step it is was not identified.
PM_PAGE_MANAGEOP pause: 0x02A0 0 →
1 with 0x02A8 0 → 1 in the same sample, then base, +0x08 and live, then both back to 0.0x20F8 and 0x03D0/0x03D4 change
first.3. Handshakes and the fault requester.
0x0250 and 0x0258 read 0 in all ~296 000 samples of the 6 µs run, across about 140
loads and updates. If the original uses them, each pulse lasts less than one sample.
Nothing here supports a protocol that waits several polls on them.TAG_SB/TAG_ID requester encoding of BIF_FAULT_BANK*_REQ_STATUS is not in the
public sources (pvr_rogue_cr_defs.h gives only the field positions), and no fault with
that tag was observed with the original firmware.More bigpb runs on the open v1.1 image, each started right after a reboot so that the
first load of the boot is captured. Register reads were done from the host only, in
three forms:
0x0000–0x09FC, 0x0C00–0x40FC between the last idle read
and the first read after the load (one full read takes ~0.5 ms);0x2000–0x20FC, 0x0300–0x03FC, and every
register outside the PM ranges that the diff showed changing;0x20B8/0x20BC/0x20C0/0x20C8 with the public BIF, SLC, event
and multicore status registers.Not covered: 0x0A00–0x0BFF, and offsets above 0x40FC other than 0xF078–0xF338. A
write that does not change a value, or a pulse shorter than one sample, is invisible.
First load after boot, all ranges (one sample ≈ 37 µs; time from the 0x20F8 change):
| Time | Changes |
|---|---|
| −40 µs | 0x18C0/0x18C8/0x18D0 0x7FFFFF → 0x7FC000 |
| 0 | 0x20F8 0 → 1, together with 0x1498 → 1, 0x18E8 → 0xF, 0x17B8 → 0xA, 0x1500 → 0x80, 0x1780 0x40 → 0x21, 0x1788 → 0x20, 0x178C → 0x20, 0x0FA0 → 0x88, 0x0C78 → 0x88 |
| +37 µs | ROGUE_CR_BIF_CAT_BASE1 (0x1208) → the application’s page catalogue, ROGUE_CR_BIF_CAT_BASE_INDEX (0x1240) → 0x1, and the local live 0x0348 0 → 0x1F |
| +74 µs | global live 0x20C8 0 → 0x1BF |
| +111 µs | 0x0CE0 → 1, 0x17A0/0x17A4 (TPU border), 0x0C80/0x0C88, 0x3840 |
| +172 µs | the geometry starts: 0x0420 → 1, 0x0408 (VDM stream base), 0x0D00 0x3F → 0x05, PM_CAT_BASE_VCE0 valid, 0x2000 0 → 3, the unit clocks in ROGUE_CR_CLK_STATUS turn on |
How to read this:
0x20F8 belongs to the GPU unit initialisation, not to the freelist load. It changes
in the same sample as the unit defaults of boot-gpu-init (0x1498,
0x18E8, 0x18C0…, 0x17B8).
GPU idle (might be powered
down)), and GPU Units init printed again right before the first geometry load.0x20F8 at init time, as the spec’s init table says, is therefore equivalent.0x1500, 0x1780, 0x1788, 0x178C and 0x0FA0 are programmed during units
initialisation (see boot-gpu-init).CAT_BASE1 and
CAT_BASE_INDEX change in the same sample as 0x0348, and before 0x20C8. The public
trace gives the order at a first kick:
Load Freelist lines;CONTEXT_PB_BASE.Since a freelist base is a GPU virtual address in the application’s memory context, an
implementation must bind CAT_BASE{n} and CAT_BASE_INDEX (TA field) before it
writes the PM freelist registers.
ROGUE_CR_SOFT_RESET (0x0100/0x0104) and ROGUE_CR_CLK_CTRL (0x0000/0x0004) did
not change during the load. In ROGUE_CR_CLK_STATUS, the PM clock (bit 4) still reads
gated when 0x20C8 is copied; it turns on later, with the geometry.ROGUE_CR_MULTICORE_GEOMETRY_CTRL_COMMON (0xF320) stays 0 for the whole run
(MULTICORE_FRAGMENT_CTRL_COMMON = 1, MULTICORE_COMPUTE_CTRL_COMMON = 0x101).1. What changes with the late copies. With 5 µs sampling of the geometry bank (136 bank updates in one run):
+0x00) always changes first, then +0x08. The live +0x10 takes the
+0x08 value in the same sample as +0x08 or one sample (5 µs) later.+0x08 keeps its value, the live register still reloads to it in the same sample
as the base change or one sample later (91 + 34 cases).0x02A0/0x02A8, 0x12A0, 0x3820, 0x1350, 0x1358, 0x1330, 0x1338,
0x0130, 0x2000 and 0xF310–0xF330 sampled every ~11 µs, none of them changed between
the +0x08 write and the late live copy. At the first load of that run the gap was 61 µs,
with no change in any of them.0x02A0 = 1 and 0x02A8 = 1; at the first load
there is no pause.The copy is visible only as the live value changing. No other state change goes with it in the ranges read.
2. 0x03D0/0x03D4 vs 0x0348.
0x03D0/0x03D4 changed before
0x0348 (13 µs and 90 µs earlier), never in the same sample.0x0224 changed in the same sample as 0x0348.The order fits 0x03D0/0x03D4 being written before the freelist registers, not a status
set after the copy, but the host cannot tell a write from a hardware update.
3. Invalidations and flushes.
ROGUE_CR_BIF_CTRL_INVAL (0x12A0) was non-zero in one sample of a whole run, not
near any load.ROGUE_CR_SLC_STATUS0 (0x3820) showed FLUSH_INVAL_PENDING in 110 samples. None fell
between a +0x08 write and its live copy.ROGUE_CR_BIFPM_STATUS_MMU (0x1350, outstanding PM MMU requests) stayed 0 until
after the live copy. Its first non-zero values come when the PM starts taking pages.So the copy needs no PM memory access and no flush or invalidate visible at this resolution.
4. Trace at the first load of a boot (public strings; group id from
pvr_rogue_fwif_sf.h), in order, between the KCCB kick and Kick TA:
| Trace line | Group, id |
|---|---|
cCCB Woff update = 200, DM = 2, … |
— |
Ready-to-run debug OSid = 0, DM = 2, …, Client command header DM = 2, … |
— |
PM running primary config (Core 0) |
PM 30 |
GPU Units init (# mask: 0x1) |
MAIN 69 |
Cancel power off request … |
POW 18 |
Activate MemCtx=… DM=2 secure=0 |
BIF 1 |
Setup register set=-1 DM=2, PC address=…, NewPCRegRequired=1 |
BIF 19 |
Alloc PC set 0 as register range [1 - 1] |
BIF 20 |
Grab reg set 0 refcount now 1 |
BIF 4 |
Load Freelist … type: 0 … stacktop = 0x1f … (local) |
RTD 17 |
Load Freelist … type: 1 … stacktop = 0x1bf … (global) |
RTD 17 |
CONTEXT_PB_BASE set to 0x3, FL different between TA/3D: local: 1, global: 1 |
RTD 3 |
TA RTData … loaded on HW context 0 |
RTD 15 |
TA Buffers: …, TE Region headers base … (RGNHDR Init: 1) |
RTD 25, RTD 24 |
Is TA: 1, finished: 0 on HW 0 … |
PM 2 |
UFL-TA-Base: … (SP = 447 …), FL-TA-Base: … (SP = 31 …) |
PM 4 |
ALIST0 SP = 0, MLIST0 SP = 0 (VCE 0x0, TE 0x0, ALIST 0x0) |
— |
Kick TA: … First kick:1 … |
MAIN 7 |
PM running primary config (Core %d) is printed before every PM operation: here,
before each OOM handling, and between PM pause TA ALLOC and PM unpause TA ALLOC at every
freelist update. Its sibling is id 31, PM running secondary config (Core %d). This points
to a “select which PM configuration is being programmed” step before PM registers are
touched (handled via CR[0x03D0]/CR[0x03D4], see Q29/Q29b below).
Summary for an implementation still stuck at live = 0:
CAT_BASE{n} = page catalogue, CAT_BASE_INDEX) before the PM
writes.0x03D0/0x03D4 before the local freelist.+0x08. Write the local base and 0x0224.If it still does not copy, the remaining unobserved candidates are:
0x0A00–0x0BFF range;The ordered write list is not provided. Q16j asks for the original’s sequence of register
writes and polls between trace PM 30 and CONTEXT_PB_BASE, including writes of unchanged
values. Such a list can only come from the original’s code and would be a transcription of
its routine, which the clean-room rules exclude (see Q16e, item 4). What follows is what
black-box work and public sources give.
1. Decoding the fault at address 0 (P). The request-status layout and tag tables are in
the public vendor kernel driver for this SoC: the SpacemiT linux-6.6 tree, img-rogue,
dual MIT/GPLv2, files km/rgx_cr_defs_km.h, km/rgxmhdefs_km.h and the fault decoder in
rgxdebug.c.
36.V.52.182 enables the “XE memory hierarchy” feature,
so the __XE_MEM__ field layout of BIF_FAULT_BANK*_REQ_STATUS applies: TAG_SB = bits
51:46, TAG_ID = bits 45:40.0x0011B000_00000000 therefore decodes as TAG_ID = 0x30 and TAG_SB = 0x6. In that
driver’s tables this is the PM allocation unit (0x30; 0x31 is the PM deallocation
unit), side-band 0x6, labelled MAVP. The other PM allocation side-bands in the same
table are: 0 TA free stack, 1 TA MList, 2 3D free stack, 3 3D MList, 4 PM context 0,
7 UF stack, 8 TA MMU stack.MAVP
kind, made with a zero base. It is not a freelist (free-stack) read.2. A hardware probe on the original’s own state (O). The original firmware was loaded and the GPU powered, with no job submitted yet. The host then wrote PM registers directly:
0x20B8/0x20BC (base) and 0x20C0: the live 0x20C8 stayed 0, immediately and
1 ms later.0x0210/0x0214/0x0224: the live 0x0348 stayed 0.0x03D0 = 0x100, 0x03D4 = 1: still 0.PM_PAGE_MANAGEOP pause (0x02A0 1 … 0): still 0.So the hardware behaves exactly as the clean implementation reports. Writing the freelist registers does not load the live stack pointers, even on a GPU the original firmware has initialised. The missing action is real; it is not a difference in idle state.
This probe also produced two MMU faults with the same request status as the one reported for the handshake-around variant
(0x0001B000…/0x0011B000…, PM allocator, MAVP). The firmware ran its recovery each
time.
ROGUE_CR_BIF_FAULT_BANK0_MMU_STATUS read 0x21: fault bit set, catalogue field 0. The
access went through catalogue 0, because no application context was bound yet, at
address 0.MAVP
read, and it used a zero base because the probe had not written VHeap (0x0248) or MLIST
(0x02D8).This narrows the problem:
MAVP data first. With a valid base and a bound memory context
that read succeeds, and only then would it pop the free stacks.Also seen in the probe: 0x0250 written with 1 reads back 1 and returns to 0 by itself
within 1 ms, with no job present. The original never showed it non-zero at 5 µs sampling
(Q16h).
3. Resolved in Q29/Q29b below. The self-clearing writes that load the live stack pointers
and reset the PM catalogues (0x0190/0x0288, 0x0258, 0x0290/0x0198) are specified in
the Q29/Q29b section below.
Eight bigpb runs and one xfer run on the open v1.1 image, after a fresh reboot. All reads were done from the host, with no register writes (the write probes of
Q16j caused recoveries and were not repeated). No run had a recovery. Each experiment tested
one expected behaviour.
Experiment A: load-command pulses. Purpose: catch the command registers that would make the PM copy loaded values into its live state.
0x0190, 0x0200, 0x0208, 0x0288, 0x20A8, 0x20B0.0x20B0 and 0x0190 each alone in the
tightest host loop (≤ 3 µs per read, an upper bound measured with printing on).Experiment B: ALIST/MLIST stack pointers of PM context 1 (0x0268–0x02D0, 0x03D0,
0x03D4, 0x0388, EVENT_STATUS, 0x0348, 0x0350; ~10 µs per sample).
At every fragment load, in this order:
0x03D0 gets bit 16 (0x100 → 0x10100) and 0x03D4 gets bit 8 (0x1 → 0x101).
At every geometry load both bits are cleared again.0x0278 (ALIST, 64-bit with 0x027C) and 0x02C8 (MLIST) take the
values printed by the trace line Loading stack-pointers for 1 (0:MidTA,1:3D) on context
1, MLIST = …, ALIST = … (for example 0x5F14/0x68). In the same sample 0x0280
and 0x02D0 take the same values.So 0x0278/0x02C8 are the values to load for context 1, and 0x0280/0x02D0 are the live
copies.
Context 0 works the same way:
0x0270 (ALIST) and 0x02C0 (MLIST) drop to 0,
in the sample after the 0x03D0/0x03D4 bits are cleared.0x0268/0x026C and 0x02B8 read 0 for the whole run.This fits a context-0 load of zero stack pointers at each first geometry kick. The value registers hold 0, so their write is invisible.
Experiment C: what the store reads (0x0348, 0x0350, 0x03A0, 0x03A8, 0x2000,
0x2008, the global banks, 0x0390–0x039C, 0x0220–0x0234).
0x03A0 (context 0) and 0x03A8 (context 1) rise to 20;0x2000 (context 0) and 0x2008 (context 1) rise to 11;4PB = 20, 4PT = 11.0x2000 is the register seen going 0 → 3 → 9 at the first kick (Q16i): it is the live
local MMU-page count of context 0.0x0390/0x0394 = 0/0 (context-0 counts at a first kick);0x0398/0x039C = 20/11 (context-1 counts loaded at the fragment kick);0x0220/0x0224 = 0/0x1F (context-0 local top, in the high word);0x0230/0x0234 = 0/0. This matches the fragment loads in this workload, which carry a
local top of 0.Store Freelist trace lines (local and global, PM
contexts 0 and 1) printed stack tops 0x1F/0xFFFF with counts 0. These equal the live
registers at that time:
0x0348/0x0350 with 0x03A0/0x03A8 and 0x2000/0x2008;0x20C8/0x2088 with 0x20D8/0x2098 and 0x20E0/0x20A0.No register outside these changed at the stores, so no separate store command was seen.
Experiment D: 0x0388 around a transfer (xfer, then bigpb).
0x0388 stays 1 for a whole bigpb run.So the fragment kick sets 0x0388 back to 1 after a transfer cleared it.
Experiment E: the end-of-render events (EVENT_STATUS alone, tight loop). For every
render, 13 out of 13:
| Time | EVENT_STATUS |
|---|---|
| t | PIXELBE_END_RENDER (bit 3) set |
| t + 0.4 … 2.5 ms | PM_3D_MEM_FREE (bit 8) set |
| + 3–7 µs | bit 8 cleared |
| + ~35 µs | bit 3 cleared |
ZLS_FINISHED (bit 14) was also set in 6 of the 13 renders.
Experiment F: what happens between the two events (EVENT_STATUS, 0x0350, 0x2088).
At PIXELBE_END_RENDER:
0x10–0x12;0x2818).Both then climb back to the full stack: 0x0350 → 0x1F, and 0x2088 → 0x2BFF /
0xFFF7 / 0xFFFF, which is total − 1, minus the pages still held. They finish just
before PM_3D_MEM_FREE, 0.44–2.5 ms after the end of the render; the time grows with the
number of pages to return.
So, after the pixel back end finishes:
PM_3D_MEM_FREE;No register write by the firmware was visible during the freeing.
What this means for an implementation where 0x0350 stops at 0x10 after the render. The
PM did not free the pages. Experiments B and F together show that freeing follows from the
context-1 ALIST/MLIST stack pointers being live (0x0280/0x02D0 equal to the loaded
values) when the render ends. Writing 0x0278/0x02C8 alone is not enough. Experiment A
cannot see the step that makes them live.
First kick:0. dEQP-VK.api.image_clearing.core.clear_color_attachment.cube_layers.r8g8b8a8_unorm
on the open v1.1 image gives two geometry kicks on the same HWRTData, because Mesa splits
layered renders:
First kick:1, Last kick:0;First kick:0, Last kick:1.Trace and 5–10 µs register sampling of the PM set (freelist banks, live and load stack
pointers, 0x03D0/0x03D4, PM_CAT_BASE_*, 0x02B0, 0x02D8/0x02E0, 0x0388)
show the following.
At the first kick: the usual first load.
Load Freelist × 2 and CONTEXT_PB_BASE set to 0x3;0x0270/0x02C0 → 0, PM_CAT_BASE_*0 → 0 and then new pages.The TA finished of the first kick is not followed by Store Freelist.
At the second kick (First kick:0):
Activate MemCtx, CONTEXT_PB_BASE set to 0x3, TA RTData … loaded on
HW context 0, UFL-TA-Base/FL-TA-Base with the current stack pointers (local
SP = 16), ALIST0 SP = 2, MLIST0 SP = 9 with the first kick’s catalogue entries, then
Kick TA;Load Freelist lines;0x0348 = 0x10,
0x0270 = 2, 0x02C0 = 9), PM_CAT_BASE_*0, 0x03D0/0x03D4, 0x02B0 = 3 and the
freelist banks all keep the state the first kick left.PM context 0 simply continues. Anything rewritten at that point was rewritten with the value
it already held. The freelists are stored and loaded into context 1 only at the fragment
kick that follows Last kick:1.
A second HWRTData of the same render pass (two subpasses, from the input-attachment test of Q16m item 1).
At the second subpass’s geometry load:
CONTEXT_PB_BASE set to 0x0, FL different between TA/3D: local: 0,
global: 0 and no Load Freelist: context 0 and context 1 already hold the same
freelists;0x02B0 stays 0;0x02D8 (MLIST), 0x0C38 (region headers, +0x80 from the first HWRTData) and 0x0408
move to the second HWRTData’s values;PM_CAT_BASE_*0 and 0x0270/0x02C0 restart from 0.With 0x02B0 = 0, the two local live stack pointers 0x0348 and 0x0350 move together
(0x1F → 0x10 in the same sample). With 0x02B0 = 3 (first subpass), only 0x0348
moved and 0x0350 took the value at the fragment load. This supports the reading of
CONTEXT_PB_BASE (CR[0x02B0]) encodes whether the freelists of the two PM contexts are
separate (1) or shared (0), with bit 1 = local and bit 0 = global (D,
see scheduler).
OOM paths. The register side of the paths of partial-render-spm,
from bigpb with the same sampling:
EVENT_STATUS = 0x90 (PM_OUT_OF_MEMORY), then cleared;PM_PAGE_MANAGEOP (0x02A0) 0 → 1 with the acknowledge 0x02A8 0 → 1;0x20B8 (down by 4 bytes per added page) and 0x20C0, with
the live 0x20C8 following;0x02A0/0x02A8 → 0.No other sampled PM register changes.
EVENT_STATUS 0x90 cleared;0x03D0 bit 16 and 0x03D4 bit 8 set, PM_CAT_BASE_*1 ← the
geometry’s current catalogues, 0x02E0 ← this HWRTData’s MLIST base, 0x0278/0x0280
← the geometry’s current ALIST stack pointer (0x7FA3) and 0x02C8/0x02D0 ← its
MLIST stack pointer (0x87);ROGUE_CR_PM_PARTIAL_RENDER_ENABLE (0x0338) 0 → 1;0x0388 = 1.The context-1 freelist bank is not reloaded: the two contexts share the global freelist here.
0x0338 stays 1;ROGUE_CR_EVENT_STATUS shows ZLS_FINISHED | PIXELBE_END_RENDER (0x4018) at its
end;0x1F, 0xFFF7).0x0338 1 → 0;0x0270/0x02C0 → 0 and the 0x03D0/0x03D4 context bits cleared (a context-0
load of zero list stack pointers);PM_CAT_BASE_VCE0/TE0/ALIST0 get new pages, and PM_CAT_BASE_VCE0’s
high word becomes non-zero (0x124C = 0x003E_F400, the public INIT_PAGE field) on
the restarts.The geometry then continues without a new Kick TA.
Ten partial renders were seen, with the same pattern each time. The values written by the PM load commands cannot be seen (Q16k experiment A); the table gives what the registers hold.
CR[0x03D0] / CR[0x03D4]):
CR[0x03D0] = 0x100, CR[0x03D4] = 1.BCAST[0x03D0] = 0x10100, BCAST[0x03D4] = 1.PM_CAT_BASE_{VCE,TE,ALIST} and live ALIST/MLIST stack pointers (0x0270/0x0274,
0x02C0 for PM ctx 0; 0x0280/0x0284, 0x02D0 for PM ctx 1) back to that
previous rogue_fwif_hwrtdata.FIRSTKICK, every HWRTData
switch in PM context 0 or 1, and every 3D finished):
BCAST[ROGUE_CR_SLC_CTRL_FLUSH_INVAL] = 0x10 // poll ROGUE_CR_SLC_STATUS0 (0x3820) bit 2 == 0
BCAST[ROGUE_CR_BIF_CTRL_INVAL] = 4 // poll CR[0x12A0] bit 2 == 0
if GPU power domain is on:
BCAST[0x1348] = 1 // poll CR[0x1348] bit 0 == 0
Omitting this invalidation leaves PM context 0/1 with stale page-catalogue/TLB entries from the previous HWRTData, causing immediate BIF0/IPF page faults or TA stalls on the second HWRTData.
0x02D8/0x02DC for ctx 0, BCAST[0x02E0/0x02E4] for ctx 1) and
PM_CAT_BASE_{VCE,TE,ALIST} from rogue_fwif_hwrtdata.FIRSTKICK only: Mid-TA on ctx 0, 3D on ctx 1):
select the PM context in 0x03D0 bit 16 and 0x03D4 bit 8, write MLIST/ALIST stack
pointers (0x02B8 + 0x0268/0x026C for ctx 0; 0x02C8 + 0x0278/0x027C for ctx 1),
then pulse:
CR[0x0190] = 1, poll CR[0x0190] & 1 == 0;CR[0x0288] = 1, poll CR[0x0288] & 1 == 0.
These two pulses make the loaded stack pointers live in the PM (resolving Q16k
Experiment F). Do not run 0x0190/0x0288 on a FIRSTKICK.CR[0x0248/0x024C] = vheap_table_dev_addr):
FIRSTKICK:
hwrtdata.geom_caches_need_zeroing != 0 (see Phase E), then set
hwrtdata.geom_caches_need_zeroing = 1;CR[0x0258] = 1, poll CR[0x0258] & 1 == 0;CR[0x03D0] &= ~0x10000, CR[0x03D4] &= ~0x100)
and pulse CR[0x0290] = 1, then CR[0x0198] = 1.
On a freshly reset GPU, Render 1 (HWRTData 0) can pass without 0x0290/0x0198
because internal PM state starts at 0; Render 2 (HWRTData 1) stalls without them.FIRSTKICK (Mid-TA):
CR[0x0250] = 1, poll CR[0x0250] & 1 == 0.All polls must complete before phase C.
HWRTData0State/HWRTData1State (answers Q29b items 1 & 2, D/O):
hwrtdata_common
or region-header memory (hardware initialises region headers via CR[0x0C68] = 1 + poll
bit 0 == 0). geom_caches_need_zeroing (+0x114) lives in each rogue_fwif_hwrtdata
instance, not in hwrtdata_common.te_psg, 0x0D20, or any PM register. Each command simply passes its own
hwrtdata_fw_addr (cmd + 0x2C).HWRTData0State and HWRTData1State in the 3D finished trace line are simply the
.state (+0xAC) of the firmware’s PM context 0 active-HWRTData slot and PM
context 1 active-HWRTData slot (0x7fffffff when a slot is empty — e.g.
HWRTData0State=7fffffff, HWRTData1State=4 because PM ctx 0 was cleared when the 3D kick
loaded that HWRTData into PM ctx 1).pre-3d sequence from Render 1 3D finished to Render 2 Kick TA (answers Q29b item 3, O/D):
Observed trace on the open v1.1 reference firmware (RTD 0xc0143000 → RTD 0xc0144000):
[115296] : 3D finished, HWRTData0State=7fffffff, HWRTData1State=4
[115347] : UFO Updates for FWCtx 0xc0085098 @ 1136
[115359] : UFO Update: [0xc0084000] = 0x00000002
[115386] : Deactivate MemCtx=0xc002c000
[115396] : Ungrab reg set 4 refcount now 0
[117522] : cCCB Woff update = 400, DM = 2, FWCtx = 0xc0085000
[117564] : cCCB Woff update = 1800, DM = 3, FWCtx = 0xc0085098
[117591] : UFO Checks for FWCtx 0xc0085098 @ 1184
[117603] : UFO PR-Check: [0xc0079000] is 0x00000001 requires >= 0x00000002
[117667] : Activate MemCtx=0xc002c000 DM=2 secure=0
[117681] : Setup register set=4 DM=2, PC address=0x0000000083399000, OSid=0, NewPCRegRequired=0
[117696] : Grab reg set 4 refcount now 1
[117786] : Kick TA: FWCtx 0xc0085000 @ 200, RTD 0xc0144000, First kick:1, Last kick:1, CSW resume:0.
Hardware register transitions between those two milestones (D):
3D finished (Render 1): EVENT_CLEAR = 8 (or 0x4008 with ZLS) → DM 3 cache flush →
RTD0.state 4 → 5 → PM-MMU invalidation (SLC_CTRL_FLUSH_INVAL = 0x10,
BIF_CTRL_INVAL = 4, 0x1348 = 1) → retire 3D command → deactivate MemCtx.Kick TA (Render 2, RTD1, FIRSTKICK | LASTKICK): activate MemCtx DM 2 →
CR[0x03D0] = 0x100, CR[0x03D4] = 1 → freelists already match PM ctx 1 so
CR[0x02B0] = 0 (no freelist reload) → PM-MMU invalidation (0x10 / 4 / 0x1348)
→ CR[0x02D8/0x02DC] = RTD1.pm_mlist_dev_addr → PM_CAT_BASE_{VCE,TE,ALIST}0 = 0 →
CR[0x0248/0x024C] = RTD1.vheap_table_dev_addr → CR[0x0258] = 1 (poll 0) →
CR[0x03D0] &= ~0x10000, CR[0x03D4] &= ~0x100, CR[0x0290] = 1, CR[0x0198] = 1
→ TE/VDM/RTC registers → CR[0x40A8] = 0 → CR[0x0C68] = 1 (poll 0) →
CR[0x0400] = 1.Observed (O), for a first kick. Each command field is matched by value with the register that held the same value:
| Register (geometry core bank) | Observed value | Source |
|---|---|---|
0x0C88 |
0x202 |
rogue_fwif_geom_regs.ppp_ctrl |
0x0C28 |
0x0002_0000 |
rogue_fwif_geom_regs.te_psg |
0x0C38/0x0C3C |
0x80_0013_E000 |
rogue_fwif_hwrtdata.rgn_header_dev_addr (trace “TE Region headers base”) |
0x0C40/0x0C44 |
0x80_0013_B000 |
rogue_fwif_hwrtdata.tail_ptrs_dev_addr (trace “TPC”) |
0x0408/0x040C |
0x80_0013_F000 |
rogue_fwif_geom_regs.vdm_ctrl_stream_base |
0x17A0/0x17A4 |
0x20_0001_C400 |
rogue_fwif_geom_regs.tpu_border_colour_table (the fragment kick writes the same register) |
The other non-zero values in the geometry bank are analysed in “Unmatched geometry
registers” below. 0x0410/0x0414 held vdm_ctrl_stream_base plus a small offset (+0x40,
+0x3C) after each job: the VDM’s current position in the control stream (saved into
geom_ctx_state.vdm_context_resume_addr on TA context store; see scheduler).
The bigpb run renders to a 1024×1024 target, against 256×256 for the draw. Comparing the
two separates the values that depend on the target size from the constant ones:
| Register | 256×256 | 1024×1024 | Reading |
|---|---|---|---|
0x0C98 |
0x00FF_00FF |
0x03FF_03FF |
hwrtdata_common.screen_pixel_max (+0x04) — x/y maximum in pixels (D/O) |
0x0C18 |
0x0000_F00F |
0x0003_F03F |
hwrtdata_common.te_screen (+0x20) — x/y maximum in 16×16 tiles (D/O) |
0x0C08, 0x0C10 |
0x0010_0000 |
0x0040_0000 |
hwrtdata_common.te_mtile1 (+0x2C), te_mtile2 (+0x30) (D/O) |
0x0C20 |
0x10 |
0x100 |
hwrtdata_common.mtile_stride (+0x24) (D/O) |
0x0C00 |
0 |
0 |
hwrtdata_common.te_aa (+0x28) (D) |
0x0C80/0x0C84 |
0x88 |
same | hwrtdata_common.multi_sample_ctl (+0x08), or flipped_multi_sample_ctl (+0x10) when te_aa != 0 && (cmd.flags & 4) (D) |
0x0C30, 0x0C34 |
2, 3 |
same | constant |
0x0C48 |
8 |
same | hwrtdata_common.tpc_stride (+0x18, written when rtc_dev_addr != 0) (D/O) |
0x0C70 |
3 |
same | constant |
0x0C78 |
0x88 |
same | boot default (boot-gpu-init.md step 9) |
0x0C90/0x0C94 |
0x3089_705F ×2 |
same | boot default (boot-gpu-init.md step 9) |
0x4098 (8-bit) |
0 |
same | cmd_geom.pds_ctrl (byte at cmd_geom + 0x6C) (D) |
0x0CA0 |
0x10 |
same | constant |
0x0CE0 |
1 |
same | constant |
0x0D00 |
0x3F |
0…0x3F, varying |
hardware status that changes during the job, not configuration |
0x0420 |
1 |
2, 3, … 9 | increments by one at each geometry kick (a running count) |
0x0418/0x041C |
0x80_0006_D000 |
same | rogue_fwif_geom_ctx_state_per_geom.geom_reg_vdm_call_stack_pointer_init of the context’s context_state_addr buffer (equal by value) |
“Constant” means the value did not change across the two targets. The analysis does not show whether the firmware writes it as a constant or copies it from a field that happened to be equal in both runs.
vdm_context_resume_task0_size (0x2001_0000 in this job) is OR’d into CR[0x0450] only
when starting a TA context store (see scheduler).
tpu, pds_ctrl and view_idx were 0 in this job, so their registers could not be
identified by value.
Correction. Earlier versions of this phase had a table derived from firmware analysis that placed
te_psgat0xC18,tpuat0xC20,pds_ctrlat0xC10, the resume sizes at0xC00/0xC08,tpu_border_colour_tableat0xC80, the VDM control-stream base at0xC88…0xC98, and listed0xC28,0xC38and0xC40as context state or polls. Where that table and the observation disagree, the observation above wins:0xC28iste_psg,0xC38/0xC40are the region-header and TPC addresses,0xC88isppp_ctrl, and the VDM control-stream base is at0x0408. Rows that are neither confirmed nor contradicted are dropped. Trace: BIF id 19Setup register set=… DM=…, RTD id 25/33TA Buffers: …, RTD id 24TE Region headers base ….
CR[set+0xCE0], CR[set+0xCB0] (poll),
CR[set+0xCB8] = 1, CR[set+0xC48], and CR[0xD20] = state buffer address (0 if
none).rogue_fwif_hwrtdata.geom_caches_need_zeroing).CR[0x40A8] = (primary core) & 1 (core/TE selection).Context-state registers (Q16d, O — partial). For the draw and bigpb runs, the
render context’s static_render_context_state.ctxswitch_regs[0] (at render-context offset
0x130, public layout) held:
geom_reg_vdm_context_state_base_addr = 0x80_0006_E000;geom_reg_ta_context_state_base_addr = 0x80_0006_F000;geom_state[] store/resume task words.None of these values was found in any register sampled after a job. 0x0CB0, 0x0CB8,
0x0428 and 0x0D20 read 0, and 0x0CE0 read 1. So the observation neither confirms nor
contradicts 0x0CB0 = geom_reg_ta_context_state_base_addr or 0x0428 =
geom_reg_vdm_context_state_base_addr: either these registers are only meaningful during the
job, or they are cleared at its end (the exact register writes are documented in Q29/Q29b
below).
CR[set+0xC68] = 1 (FIRSTKICK only), then poll CR[set+0xC68] until bit 0 == 0
(correction to earlier Q16l note, D/O): the register is self-clearing — hardware
clears bit 0 back to 0 once region-header initialisation completes. Polling for bit 0
== 1 races with hardware clearing it and fails on later kicks.FIRSTKICK (answers Q19b item 3 & Q29, D/O):
when hwrtdata.geom_caches_need_zeroing (+0x114) is non-zero on a FIRSTKICK, the
firmware does not zero them through a hardware register; it temporarily maps GPU
memory and zeroes it with the MIPS CPU:
hwrtdata.tail_ptrs_dev_addr (+0xF0), size
hwrtdata_common.tpc_size (+0x1C) bytes;hwrtdata.rtc_dev_addr (+0x108), size 0x300 bytes (when
rtc_dev_addr != 0).
It then sets hwrtdata.geom_caches_need_zeroing = 1, writes CR[0x0258] = 1 and
polls CR[0x0258] & 1 == 0. (On a non-FIRSTKICK, it writes CR[0x0250] = 1 and
polls CR[0x0250] & 1 == 0 instead.)macrotile_array_dev_addr programming (answers Q16n item 2, D):
hwrtdata.macrotile_array_dev_addr (+0xF8) is not written to any register by the
geometry or fragment kick on this GPU.hwrtdata.rtc_dev_addr (+0x108):
0: CR[0x0CE0] = 1 on FIRSTKICK (with CR[0x0D20] = 0) or 3 on
subsequent kicks; CR[0x0CB0..0x0CB4] = 0; CR[0x0CB8] = 1;
CR[0x0D20] = rta_ctl.active_render_targets.CR[0x0CB0..0x0CB4] = rtc_dev_addr; CR[0x0C48] = hwrtdata_common.tpc_stride;
CR[0x0CE0] = 0; CR[0x0CB8] = 1; CR[0x0D20] = rta_ctl.active_render_targets.0x0408/0x040C receive the VDM control-stream base (vdm_ctrl_stream_base, observed
in phase C), not a freelist/ALIST configuration as earlier versions said. The pair
0x0418/0x041C holds geom_reg_vdm_call_stack_pointer_init (see Q16c above).Kick TA: FWCtx … @ …, RTD …, First kick:…, Last kick:…, CSW
resume:…. (PID:…, prio:…, frame:…, ext:…, int:…).ROGUE_CR_TIMER (0x0160), arm the DM’s deadline watchdog (see
hardware-recovery) and record the DM’s execution state
(context, offset, kick time, deadline).CR[set+0x400] = 1: the TA run register. It is the last write: everything
above must be programmed and accepted before it.The GPU signals in ROGUE_CR_EVENT_STATUS (HW2/IRQ). Geometry completion handling (trace
MAIN id 8, TA finished) updates the HWRTData and freelist, flushes the TPC, retires the
command and processes the updates (see client-ccb and
scheduler).
Which events reach the firmware (part of Q19). The boot routing for DM 2
(ROGUE_CR_MTS_DM2_INTERRUPT_ENABLE = 0xA0, see boot-gpu-init) enables
only TA_FINISHED (bit 5) and PM_OUT_OF_MEMORY (bit 7). TA_TERMINATE (bit 6, public
name) is not routed to the IRQ task, so a firmware that follows this routing completes
geometry on TA_FINISHED alone. When the hardware raises TA_TERMINATE is not
established by this spec.
TPC flush, VHEAP store, and completion sequence (answers Q19b item 1 & Q29, D/O).
At every TA finished (EVENT_CLEAR = 0x20, primary core bank):
LASTKICK or context store only):
write CR[0x0260] = 1 and poll CR[0x0260] & 1 == 0.TA finished):
write CR[0x0C50] = 0x40000000 (bit 30).CR[0x0CB0..0x0CB4] != 0):
write CR[0x0CB8] = 2 and poll CR[0x0CB8] & 2 == 0.CR[0x0C50] & 0x40000000 == 0.geom_caches_need_zeroing on normal LASTKICK:
if cmd.flags & 2 (LASTKICK) and no context store occurred, write
hwrtdata.geom_caches_need_zeroing = 0 (+0x114).Omitting the TPC flush (CR[0x0C50] = 0x40000000 + poll) leaves tail pointers unflushed
in hardware and stalls or faults subsequent renders (including the second render of
vkfwtest pre-3d and input-attachment second subpasses).
Freelist write-back (part of Q19, O). The freelist state reached by the geometry is
captured when the freelists are stored from PM context 0 at the fragment kick of the same
HWRTData (phase B, step 3), not at TA finished. The fields involved are the ones the trace
prints: stack top, current pages, allocated page count. Geometry completion itself is traced
as TA finished then TA RTData … finished on HW context 0.
rogue_fwif_geom_regs field → register mapping in Phase C (Q4) is resolved
above.CR[set+0xC88]…+0xC98) mixes the host vdm_ctrl_stream_base
with firmware context state; the exact split of the 64-bit base across +0xC90/+0xC98
is a detail the implementer can finish from the public field widths.The 3D, transfer and compute kicks follow the same skeleton. See kick-compute-and-3d.