Files
nvdriver/analysis/closed-driver-580/pmu-implementation-notes.md
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

41 KiB

PMU light-secure start and framebuffer queues: implementation record

Target: NVIDIA 580.178.04 nv-kernel.o_binary (SHA-256 5269a23f...6f4b), GV100, chip HAL 0x23, RM HAL 2. Evidence labels: [A] assembly read, [D] pseudocode only, [T] physical transcript (target/trace/b3-bar0.txt, b3-bar12-rle.txt), [E] original instructions executed in the Unicorn harnesses (tools/check_gpu_pmu_ls_start_binary.py, tools/check_gpu_pmu_fbq_binary.py, shared setup tools/pmu_original_environment.py), [I] inference. Reports: reports/gpu-pmu-ls-start-validation.json, reports/gpu-pmu-fbq-validation.json. Rust: src/nvidia/src/gpu/pmu_ls_start.rs, pmu_fbq.rs.

1. Objects

Object Where Facts
Pmu class object GPU+0x2120 = base+8; base+0x1830 points back to it; vtable +0x580 = Load _nv051860rm [E]
Falcon *(PMU+0x200)+0x18; +0x3a7 = 1 (light secure), +0x3a4 = 0 (set by OBJLSFM Load _nv043238rm, [D]+[E]), +0x650 = 1, +0x583 ready, +0x5d0 INIT value, +0x610 queue information [E]
Reset/boot helper PMU+0xa00, binder _nv006032rm, created by _nv006737rm [E]
Kernel-side object *(PMU+0xb08) - 8; +0x80 state: 1 boot begun, 2 started, 4 INIT done, 3 INIT failed (+0x84 status) [E]
Address-space object PMU+0xc20; +0x84 instance target (0 = framebuffer), +0x88 instance memory [E]
Transport *(PMU+0xf68) - 8; vtable +0x60 post _nv052441rm, +0x68 message function _nv052433rm; PMU+0x58c = 1 selects queues in the surface (constructor _nv051986rm) [E]
Surface manager PMU+0xe88; PMU vtable +0x410 gives the surface object (+0x30 memory, +0x40 CPU mapping) [E]

2. Stage order and allocations (placement order)

  1. Class constructor _nv051986rm and ConstructEngine _nv051982rm (attach). [E]
  2. InitLocked _nv051858rm, in this order [E]: address space (_nv052645rm -> _nv052643rm; create flags 0x90f1, limit 0x1fffffff, word 0x4000810); instance block: 0x1000 bytes, contiguous, framebuffer, tag 0xe, zero-filled (traced address 0x7fdf7e000 [T]); surface: 0x207a00 bytes, not contiguous, framebuffer, tag 0xe, page size 0x1000, zero-filled through CPU mappings of 1 MiB (traced address 0x7fdb98000 [T]); buffer: 0x19d0 bytes, system memory, tag 0xe. The 4 KiB "owner not identified" page of the FIFO report is the PMU instance block [E]+[T].
  3. OBJLSFM Load, OBJACR Load (existing work), then Pmu Load _nv051860rm.

3. Load register sequence (transcript 147279-147456, reproduced 105 of 105 accesses [E][T])

Step Accesses
prefix (GCX present) VBIOS+238(6); R 0x10a100
reset(0) R 0x10a3c0; if bit 0 clear W 0x10a014 = 0xffff
reset(1) R 0x1221fc; R 0x10a3c4 (bit 4 required, else 0x1b); W 0x10a3c0 = 0; 10 x R 0x10a3c0; R/W 0x10a040 (same value); wait 0x10a10c & 6 == 0 (line 0x56); gating: 0x10a134 = 0x20008, 0x10aa74 = 0, 0x10ae74 = 0 (feature 0x13 not yet on; 0x3fffe, 0x7ffe, 0xf when its state is 1), 0x10aa70 = 0x45 (feature 7; 0 when its state is 1); wait 0x10a04c idle (bits 0-15 clear, line 0x16b); R 0x0; W 0x10a014 = 0xffff, 0x10a01c = 0xff81ff52, 0x10a010 = 0xf3
order reset(0), reset(1) (results ignored); idle wait; reset(0), reset(1) (checked)
surface mapping page size, map into the PMU address space (virtual 0x4000000 [T]); instance block initialisation; bus flush; bind
bind R/W 0x10a048
surface CPU map; store the surface framebuffer address (two words) at +0x10600
buffer page size, map (results ignored)
transfer indices W 0x10ae00..0x10ae10 = 4, 0, 4, 5, 6
boot R 0x10a108; bind again; clock domain 0x13; OBJFUSE+150; R 0x10a108; R 0x10a268; W 0x10a1c0 = 0x1000000 | (DMEM bytes - 0x30) (bit 28 when the block ends above the boundary); 12 x W 0x10a1c4; W 0x10a104 = 0x5e00; R/W 0x10a100 |= 2; R/W 0x10a130 |= 2; W 0x10a080 = 0x2498436
Lpwr child present gating again (four writes)

Argument block (0x30 bytes): +0x00 frequency in Hz (540000000), +0x1c 64-bit surface address in the PMU address space, +0x24 1 << 29 | bytes, +0x28 flags (bit 0 GPU+90c, bit 2 fuse, bit 3 GPU+916, bit 5 GPU+6d59), +0x2c PMU+cb0; rest zero. [E][T]

Load does not wait for INIT on this configuration (GPU+4de2 and GPU+90e clear) [E]; INIT is consumed by the first interrupt service pass that sees the PMU interrupt (transcript 147603-147608) [T].

4. Queues

Geometry is constant in _nv052416rm [E]: HPQ 16 x 0x800 at surface 0x200 (head 0x10a800), LPQ 16 x 0x800 at 0x8200 (head 0x10a804), MSGQ 16 x 0x40 at 0x10200 (head 0x10a4c8 written by the PMU, tail 0x10a4cc written by the driver). The surface is CPU-mapped once at Load; on the traced board at BAR2 0x8000 [T].

INIT (first message, element 0): tail must read 0; 0x3c bytes copied; byte 0 = 0x0f, byte 6 = 0; tail = 1; +0x20/+0x22 command memory offset and bytes, +0x24 Falcon value, +0x26 status. Then 0x10 bytes each at surface 0x10624 and 0x10634 are read. [E]; register order and extents [T].

Command element: see reports/gpu-pmu-fbq-validation.json (command_element). Post: 3 x R head, 0x800-byte copy, KernelBus+4a8(3), W head + 1 mod 16. [E][T]

Reply: R head, R tail (equal: nothing), R tail, R head, 0x40-byte copy, R head, W tail + 1 mod 16, copy of the request back from command element + 0x14 (request bytes, or 0x10 when flags bit 1), R LPQ head, then the loop repeats until head == tail. Message number (+0xc, first reply 1) and checksum are reported, not enforced. [E][T]

Wait: polling under the caller's locks. Each iteration is one interrupt service pass (_nv052478rm -> _nv037739rm), then the time check (line 0x3d7); after expiry one more pass. [E]; the passes are visible in the transcript as reads of 0x0, 0x100, 0x9100, 0x100a20 [T].

5. Requests of first open

Request Bytes Evidence
region (unit 0x0a, function 0): +0x10 region 1, +0x14 offset 0 0x18 [E]; sent once before the first bootstrap
bootstrap (unit 0x0a, function 2): +0x10 Falcon (7, 2, 3), +0x14 = 1 0x18 [E]

Traced: two exchanges inside SEC2 start (164966-165083), one each for FECS and GPCCS [T]. Entry: _nv043191rm(gpu, lsfm, falcon, flags, 0) -> _nv016743rm. Before SEC2 Load the original sends 239 low-priority and 2 high-priority commands, 19 + 1 more before FECS; their identities were not determined (no data in the trace; client code not read). At least two event messages arrive in the traced run.

6. What kernel wiring needs

  • Before Load: instance block (4 KiB, framebuffer, zero), surface (0x207a00 bytes, framebuffer, 4 KiB pages, zero), PMU address space with page tables mapping the surface at 0x4000000, a CPU mapping of the surface (BAR2). pmu_ls_start::Io lists the services; Inputs::traced_v100() the traced values.
  • Boot vector 0x5e00 and OS word 0x2498436 come from the PMU image descriptor (+0x60, +0xc). [E]
  • After Load: poll the PMU interrupt; call Transport::receive_init; then Transport::falcon_request for Falcons 7, 2, 3 with region (1, 0). The PMU interrupt entry (IRQSTAT read, IRQSCLR 0x40) is not part of the core modules.
  • State left on hardware: PMU running from the authenticated image with its instance bound and interrupts routed (IRQDEST 0xff81ff52, IRQMSET 0xf3); queue positions advanced.

7. Not done / open

  • PMU teardown at unload: not studied.
  • Classification of the other pre-graphics commands: not done (section 5).
  • Event messages, the PMU interrupt entry, resume, non-light-secure start: not implemented.
  • Real firmware message bytes are unknown; the harness firmware side is a fixture.
  • Line 147278 (R 0x1598) and the clock reads 147426-147431 belong to services, not to the PMU code.
  • InitLocked's devinit test was bypassed in the harness (VBIOS+2d6 = 1); its real input is in lost trace events.

8. Addendum 2026-11-19: interrupt service, events, both command queues, unload

New evidence: tools/check_gpu_pmu_service_binary.py (599 rows of original instructions, oracle target/gpu-stage/original-pmu-service.txt, SHA-256 5b117e30...ec48e5b4; kinds S 111 service entry and reader checks, I 6 INIT through the service, K 432 event keys, P 35 requests, R 4 Falcon requests, U 11 unload). Rust: gpu/pmu_irq_service.rs, gpu/pmu_events.rs, gpu/pmu_unload.rs, changes in gpu/pmu_fbq.rs; all 599 rows match. The two earlier oracles regenerate byte-identically (83998b9a..., f73abeb8...). Labels as above; [A] here is objdump -d -r of the symbol.

8.1 Interrupt service entry

_nv052477rm (class vtable +408; record engine 0xe; returns 0 when the kernel-side state word is 0, _nv051829rm) -> PMU+290 _nv052485rm (GPU+917, word GPU+918, GPU+926 clear and GPU+915 set, else nothing; passes ecx = 1) -> PMU+288 _nv052510rm [A][E]:

Step Accesses
pending word _nv028663rm R 0x10a008, R 0x10a018, R 0x10a01c; pending = AND of the three; 0 ends the pass
bit 5 _nv052467rm state dump (vtable +508); R 0x10a16c; W 0x10a16c = value & 0x7fffffff
bit 6 R 0x10a094; 0xfeedfeed: W 0x10a094 = 0, no message read; else _nv052479rm -> message function _nv052433rm (PMU+438 is 0 on GV100: never deferred [E])
PMU+b58 _nv052008rm constant 0 on this chip [E]
bit 4 PMU+2a0 _nv052476rm (halt; fixture, left to the provider in Rust)
PMU+ac0 _nv052215rm W 0x10a004 = pending
after a message function call R 0x10a4c8, R 0x10a4cc; if different W 0x10a000 = 0x40
result the pending word again (three reads)

Equal to the transcript: empty pass = lines 147617-147628, INIT pass = 147603-147608 followed (after the client traffic the INIT handler starts) by the IRQSCLR write [T]. On this board IRQMASK reads 0x387d and IRQDEST 0x10072, so only bits 4, 5 and 6 can be pending.

The service passes -1 as the awaited sequence (it reads transport+8+9b0; the waiter stores its sequence in another object), so the message function always drains the queue [E: rows reply-then-event].

Hazards of the original, reproduced as refusals: (a) a first message that is not an accepted INIT (wrong unit or type, nonzero status, tail not 0) leaves the message queue unbuilt and the service then calls a null function pointer (queue table +1a8) [E rows fault]; (b) see 8.3.

8.2 Events

A message is a reply iff byte 5 = 0x0f and byte 6 = 0x04; anything else is an event. _nv052036rm walks the handler list at PMU+d98 by byte 0: the list is always empty in this build ([A] the only stores to +0xd98 in class functions are the clears in _nv051982rm and _nv051999rm and the unlink in _nv052037rm; no insert exists). _nv052457rm then updates statistics (_nv052459rm: timer _nv059599rm minus the stamp at message +0x10; count, sum, min, max at transport +188/+198/+1a0/+1a4) and calls one of 40 functions selected by byte 5 << 8 | byte 6; any other pair is recorded as a diagnostic and dropped (result byte 2 of the message, ignored). All 432 pairs unit 0..0x23, type 0..0xb executed [E].

Unit Types -> function Owner
0x03 0 _nv043072rm, 1 _nv043075rm, 2 _nv043073rm, 3 _nv043074rm, 4 _nv043070rm, 5 _nv043071rm, 6 _nv043069rm, 7 _nv043076rm Lpwr (GPU+22c8) [D]
0x08 0 _nv056653rm not established
0x09 0 _nv029236rm, 1 _nv029235rm, 2 _nv029234rm GCX range [I]
0x0d 0 _nv020703rm, 1 _nv020704rm Clk range [I]
0x0f 0 _nv021461rm (INIT as an event, only with PMU+56c; else 0x56), 1 _nv021459rm (clears PMU+f70: detach done), 2 _nv021460rm, 3 _nv021463rm, 4 _nv021464rm (unreachable: that pair is a reply) Pmu class [D]
0x11 0 _nv051095rm, 1 _nv051096rm Perf range [I]
0x13 0 _nv050826rm, 1 _nv050835rm, 2 _nv050836rm, 3 _nv050834rm, 4 _nv050831rm, 5 _nv050832rm, 6 _nv050827rm, 7 _nv050833rm, 8 _nv050828rm, 9 _nv050830rm Perf (GPU+2068) [D]
0x14 0 _nv059137rm, 1 _nv059136rm Therm range [I]
0x16 0 _nv024042rm not established
0x18 0 _nv051625rm, 1 _nv051624rm Pmgr range [I]
0x1b 0 _nv017675rm, 1 _nv017674rm, 2 _nv017673rm not established
0x1c 0 _nv051084rm Perf range [I]

Events of the traced first open [T]: (1) message element 15, lines 148782-148787, while the replies to two back-to-back commands (#15, #16 below) are outstanding; its handler reads the timer (0x810084, 0x810080, 0x810084 = the statistics) and then repeats the idle-counter programme of lines 147672-147703 (0x10a504 + 16n, 0x10a50c + 16n, 0x10aa4c, 0x10a84c), whose writers are Perf HAL functions (_nv050376rm, _nv050379rm) [A constants]. So event 1 belongs to a Perf handler [I]; unit and type are not readable from the trace (no data). (2) one more in PostLoad (lines 165442-166379; a 0x80-byte copy covers two adjacent elements). No event occurs between a unit-0x0a request and its reply in the trace. In Rust an event is counted and handed to pmu_fbq::Io::event(handler, message); (0x0f, 1) also clears Transport::detach_pending. The client functions are not implemented.

8.3 Message reader: what the original checks (replaces "constrained, not observed")

Element 0x40 bytes; header bytes 0-3 = unit, size, control, sequence. [E] for every line (S rows):

Field Check Outcome when it fails
number +0xc (16 bit) equals expected (previous + 1) reported only
16-bit sum over (length + 7) & ~3 bytes zero reported only
length +0xa length + 4 < 0x40 rejected: status 0xffff, tail unchanged, IRQSSET raised again each pass
unit (byte 0) < 0x22 rejected, same
unit 0 taken as a rewind mark; the header is re-read from bytes 4-7 the same element is read without end (refused in Rust)
size (byte 1) <= 0x30 rejected, same
size < 5 header only; bytes 4.. keep the PREVIOUS message, and the classification uses them accepted
length vs size tail advances only if length + 4 <= max(size, 4) else the element is read (and dispatched) without end (refused in Rust)
length 0 with size > 4 element finished after the header the body is copied from the next element (refused in Rust)
control (byte 2), byte 4, byte 7, +8/+9, +0x16.. not examined
reply: sequence +0x14 must name a waiting request else the queue dump path (refused in Rust)
reply: flags +0x15 bit 1 0x10 bytes copied to a private buffer; the caller's request keeps what was posted
reply status byte 5 of the request read back from the command element, through _nv028473rm request result

INIT (first message, 0x3c bytes): tail register must read 0; byte 0 = 0x0f; byte 6 = 0; +0x26 status through _nv028473rm; +0x20/+0x22 command memory; +0x24 Falcon value. Bytes 1-5, 7-0x1f, 0x27-0x3b are not examined [E I rows and the 13 earlier ones]. What real firmware puts in the unexamined bytes remains unknown.

8.4 First-open exchange sequence as far as established

Request sizes are the read-back lengths in the BAR2 extract; surface offsets are where a board-object group was written before the command (data visible in the extract); constructor = the function holding that offset as a constant [D]; engine by its InitLocked call chain (relocation graph) [A/D].

# BAR0 line Queue Request bytes Surface member Constructor Engine
INIT 147603-147608 message 0x3c 0x10200 PMU
1-4 147612-147981 LPQ 0x14 each 0x1d1130, 0x1c0200, 0x1a23b0, 0x15a2a0 _nv050927rm/_nv050923rm, _nv051081rm, _nv060328rm, _nv060263rm Perf (_nv050986rm chain)
5 148157 LPQ 0x14 0x1b6e0 _nv060134rm not established
6-9 148220-148449 LPQ 0x14 each 0x1b0d0, 0x132b0, 0x203b0, 0x1bcf0 _nv053467rm, _nv053437rm, _nv051697rm, _nv053485rm Pmgr (_nv051782rm)
10 148585 LPQ 0x14 0x43a60 _nv059935rm not established
11 148637 LPQ 0x1c none not identified
12, 13 148688, 148692 HPQ, back to back 0x10, 0x1c none not identified
14 148726 LPQ 0x40 none not identified
15, 16 148769, 148773 LPQ, back to back 0x10, 0xd4 none not identified
event 1 148782-148822 message handler runs the Perf idle-counter programme Perf [I]
17-19 148848-148974 LPQ 0x14 each 0x1e4b50, 0x1e5770, 0x1e5360 _nv060941rm, _nv060968rm, _nv060945rm OBJVOLT (_nv060808rm; the second by symbol range [I])
20-23 149025-149174 LPQ 0x10, 0x18, 0x1c, 0x14 none not identified
24-27 149217-149426 LPQ 0x14 each 0x3c8c0, 0x3c4b0, 0x394b0, 0x3cae0 _nv059442rm, _nv059036rm, _nv058901rm, _nv059151rm Therm (_nv059396rm)
28, 29 149481, 149528 LPQ 0x14, 0x14 none not identified
30-34 149571-150007 LPQ 0x14 each 0x79d30, 0x7f3f0, 0x79500, 0x7ebc0, 0x8a370 _nv020295rm, _nv020005rm, _nv020139rm, _nv020625rm, _nv020041rm ClockManager (_nv021153rm)
35, 36 150064, 150115 LPQ 0x20, 0x20 none not identified
37 150162 LPQ 0x14 0x7cfa0 _nv019994rm ClockManager
38 150257 LPQ 0x14 none not identified
39-45 156048-158399 LPQ 0x14, 0x214, 0x54, 0x14, 0x14, 0x14, 0x1c group headers and status reads at 0x1d9540, 0xb8c50, 0x3dd30 _nv060328rm, _nv020041rm, _nv058901rm groups Perf, ClockManager, Therm status queries [I]
46-241 158426-164939 LPQ 196 x 0x1c each followed by a 0x70-byte read at 0x43e70 _nv057346rm/_nv057344rm polling loop, owner not established
242, 243 164970, 165024 LPQ 0x18, 0x18 _nv016743rm region, bootstrap SEC2 OBJLSFM for OBJSEC2 Load
244 165479 HPQ 0xb0 none not identified (PostLoad)
245-263 165560-166275 LPQ 0x20, 3 x 0xd8, back-to-back groups (0x10, 0x10, 0x20) and (0x10, 0x20), 2 x 0x14, 0x20, 3 x 0xd8, (0x10, 0x10, 0x20) none not identified (PostLoad); event 2 here
264, 265 166391, 166434 LPQ 0x18, 0x18 bootstrap FECS, GPCCS OBJLSFM for KernelGraphics PostLoad

Counts: 239 LPQ + 2 HPQ before SEC2 Load, 19 LPQ + 1 HPQ before FECS: equal to the earlier tally [T]. Commands 1-38 run inside the INIT interrupt pass: there is no IRQSCLR write between the INIT tail write (147608) and the first post (147612), i.e. they come from the client loop of the INIT handler (_nv051847rm -> _nv051824rm: _nv053004rm(…, 0x2d), then vtable +68 of every object on the list at Pmu base +18d8, linked by _nv051960rm, caller _nv050781rm) [D for the loop, T for the position]. Every group was constructed in an Init stage; none of the group constructors is reached from a Load. PMU PostLoad _nv051861rm [D]: waits for INIT when the state word is still 2 (line 0x32c), and with PMU+570 set sends unit 0x0f function 0 (flags byte 2, 0x10 bytes, LPQ).

Not done: unit, function and call site of the commands marked "not identified" (the static table of the 235 direct callers of _nv052461rm could be extracted from pseudocode for only 67 call sites; it is not reproduced here because it is incomplete).

8.5 Required or optional

Driver side [A][E]: the unit-0x0a requests depend on nothing the other commands produce. _nv016743rm tests OBJACR+391, a byte +513, OBJACR+37d (region already sent) and the Falcon byte +3ac; _nv052461rm tests GPU+917, GPU+926, GPU+c98, GPU+d78, the kernel-side byte +48, transport +9b4/+9b5 and the Falcon ready byte. No flag set by a reply or an event of another unit is tested. In emulation the original posts region and bootstrap directly after INIT with an empty client list and completes (rows R plain, first-open). Firmware side: not knowable from the driver. The LS PMU image may refuse or mis-serve unit 0x0a before some unit's initialisation (for example the 0x0f/0x13 exchanges); nothing in the driver waits for such a thing. Declared deviation for a compute-only bring-up: omit all 239 + 2 + 19 + 1 client commands (Perf, Pmgr, OBJVOLT, Therm, ClockManager groups, the status queries, the 196-command poll, the PostLoad traffic). Consequences to expect and watch: no events (they answer client commands) or events for which Io::event has no client; PMU-side power, clock and thermal policy stays at firmware defaults. The experiment that settles it: on hardware, after INIT send only region + bootstrap(7) and read the reply status and the SEC2 state; a rejection status (reply byte 5) or a timeout names the missing prerequisite. HPQ: no required first-open command uses it; the unload's detach command does, so execute_on exists.

8.6 Unload and how it fits the ACR unload

_nv052517rm(gpu, pmu, flags) (engine-state Unload, vtable +380) [E 11 rows, D]: Falcon +3a7/+3aa/+3af = 0; OBJBIF+b9c = flags; _nv052000rm: MemorySystem _nv044310rm(…, 0); PMU+f70 = 1; detach command unit 0x0f function 1, 0x14 bytes, on the HPQ (head 0x10a800, element at surface 0x200); if reply byte +0x10 is set, wait (line 0x7b8) for event (0x0f, 1); W 0x10a014 = 0x40; kernel-side state word = 0 (_nv051831rm); transport teardown (_nv052443rm). Detach failed (timeout, nonzero status, event never came): no IRQMCLR, the reset sequence _nv052253rm instead. PMU never initialised (state 2): engine reset asserted and released (W 0x10a3c0 = 1, ten reads, W 0x10a3c0 = 0, ten reads), no command. Then the surface CPU unmapping, the address-space unmapping of the surface (0x4000000) and of the buffer (0x5000000). Result 0 on every path. The queues' registers are left as they are; the instance block stays bound; memory is freed by Destroy _nv051856rm (client list +a0 calls, _nv052293rm for the address space, _nv052622rm, _nv052641rm) [D, not executed]. PostUnload is the HAL slot PMU+3a0 [D, not read].

Fit with reports/gpu-acr-unload-validation.json: the ACR unload launcher PMU+2e0 _nv052043rm returns 99 while the kernel-side state word is above 1 (_nv051835rm). The Pmu Unload stores 0 there, and it runs before OBJACR Unload (unload order is the reverse of load order: Pmu is load position 28, OBJACR 27 [I from the spine dossier]). The launcher then resets the PMU itself (hold with halt request, release) and runs the image from system memory; it needs none of the queue state. So: Pmu Unload (detach, mask, state 0) -> OBJACR Unload (reset, HS image) -> Destroy.

PMU+42b (set to 1 by _nv005852rm(object, RM, chip) on GV100; the harness environment calls it with that argument order and reads 1) gates, together with PMU+5c7, the 0x19d0-byte system-memory buffer: its allocation in InitLocked, its mapping in Load, its unmapping in Unload and its release in Destroy [A: cmpb 0x42b in _nv051858rm, _nv051860rm, _nv052517rm, _nv051856rm]. With it clear the vu:5000000 step and the second mapping would be absent.

8.7 Kernel wiring

  • Interrupt: when the dispatcher finds the PMU engine pending call pmu_irq_service::service(io, transport, &Gate, reply); the caller keeps the state word (2 after Load, 4 when Pass::init == Some(OK), 3 on any other INIT outcome) and must stop servicing after an Err.
  • Set Transport::interrupt_entry = Some(Gate::running(4)) so that request waits run the same service.
  • Provider functions to add: event_time (timer), event (may return OK without clients), state_dump, halted (treat as fatal), and for the unload pmu_unload::Io (MemorySystem quiesce, reset after a failed detach = the PMU reset of acr_unload, three unmappings).
  • Order at shutdown: pmu_unload::unload -> acr_unload::unload -> release of surface, buffer, instance block and address space.
Step State left on hardware Undone by
Load PMU running, instance bound, IRQDEST 0xff81ff52, IRQMSET 0xf3, surface mapped Unload (mask bit 6, unmap), ACR unload (reset)
INIT pass MSGQ tail 1, IRQSTAT bit 6 cleared nothing needed
each request queue heads and tail advance, IRQSCLR 0x40 per pass, IRQSSET 0x40 if messages remain nothing needed
unit-0x0a requests SEC2, FECS, GPCCS started from WPR images their own unloads
Unload detach acknowledged, IRQMCLR 0x40, PMU still running ACR unload's PMU reset

8.8 Open

Question Settled by
Does the LS PMU honour unit 0x0a without the client commands? the hardware experiment of 8.5 (needs the user's yes for that level)
Unit and type of the two traced events; bytes of real INIT and replies a trace with data (the copies are rep movsb; an instrumented read of BAR2 at 0x18200-0x185ff after first open), or reading the Perf handlers _nv0508xxrm for which one reaches the idle-counter HAL
Units, functions and call sites of the commands marked not identified read each client's post-INIT function (vtable +68) from the list builders (_nv050781rm callers), and the 196-command poll around _nv057346rm
Halt handler _nv052476rm, PostUnload PMU+3a0, Destroy _nv051856rm bodies execute them in the service harness (Destroy needs the memory-service fixtures of the start harness)
_nv052253rm with a running Falcon after a failed detach already executed by the ACR unload harness; call that reset from the provider
The GC6/suspend branches of the Unload (GPU+954, GPU+997/+998 with GPU+69e4 = 1) not needed for shutdown; _nv029196rm, _nv029201rm

9. Addendum 2026-11-19: bring-up level 9 (LS PMU start, bootstrap of SEC2/FECS/GPCCS, FECS ready, teardown)

Appended; nothing above was changed. Nothing in this section ran on hardware. The level is bringup=9: src/nvidia/kernel/pmu_bringup.rs, nested in levels 6, 8 and 7 through their hooks (fifo_bringup::Between, acr_bringup::WhileLoaded, gr_bringup::WhileLoaded). Like level 8 it needs the user's explicit yes for the specific experiment (CLAUDE.md). Report: reports/gpu-pmu-level9-validation.json. Labels as above; [E] here also means the five new harnesses:

Harness Oracle (target/gpu-stage/) Rows SHA-256 Rust
tools/check_gpu_falcon_ls_start_binary.py original-falcon-ls-start.txt 693 ea45b2f9...8f1e729e gpu/falcon_ls_start.rs (678 equal, 15 refused)
tools/check_gpu_graphics_fecs_start_binary.py original-graphics-fecs-start.txt 243 8c32c5dd...902ac734 gpu/gr_fecs_start.rs
tools/check_gpu_pmu_level_binary.py original-pmu-level.txt 495 e88ee1fb...1dc8a3577 gpu/pmu_level.rs
tools/check_gpu_pmu_vaspace_binary.py original-pmu-vaspace.txt 41 cases, 52,172 events 11ebf2cf...00697633 gpu/pmu_bar2.rs
tools/check_gpu_pmu_unbind_binary.py original-pmu-unbind.txt 69 0933b486...be5b7fda pmu_ls_start::unbind

The three earlier PMU oracles regenerate and compare unchanged (83998b9a..., f73abeb8..., 5b117e30...). The kernel glue itself is compiled and reviewed only; nothing executes it.

9.1 What REA and emulation settled (corrections to sections 1 to 8 first)

Topic Result Evidence
Bind position The bind is inside the surface mapping: root directory, instance block words, flush, bind _nv052272rm, and only then the three directories, the page tables and the entries (walker root update _nv013511rm -> _nv052399rm -> _nv052304rm). So pmu_ls_start::Io::address_space_map(Surface) is pmu_bar2::Space::map_begin and surface_store_address is map_finish + CPU mapping + store E, T 147335-147376
Mappings of the traced Load Three, none at 0x5000000 (a fixture value of the earlier harnesses): surface at 0x4000000, the 0x19d0-byte buffer at 0x4208000 (2 system-memory pages), and after the transfer index writes 32 system-memory pages at 0x420a000: the 0x1f5b0-byte surface of PMU+e88, _nv052625rm -> _nv052621rm, _nv052610rm. pmu_ls_start::Inputs::second_surface adds that step; it has no oracle row (the harness environment has no such surface) T (BAR2 extract at 147407-147416), D for the call chain
Instance block after Unload Not left bound: removing the last mapping releases the levels, rewrites the instance block and runs the unbind _nv052303rm: 0x10a0a4 |= 1, the bind wait (0x10ac0c, 0x10a0dc, 0x10a058, 0x10a004 = 8), 0x10a050 = 0. Section 8.6 ("the instance block stays bound") is wrong E 41 cases; unbind E 69 rows
Unload order of the mappings _nv052598rm is the surface (CPU mapping and address space), _nv052624rm the PMU+e88 surface, _nv052322rm the buffer. pmu_unload::Io::surface_unmap is therefore the second surface, not the super surface D, E
Page levels Root 0x7fdf7d000, directories 0x7fdf7c000/7b000/7a000, page tables 0x7fdf79000/78000 from the placement model after the ACR load released its requests; framebuffer entry addr >> 12 << 8 | 1, system-memory entry | 0xf; instance words 0x208 = 0x23ffffff, 0x200 = root | 0xc00, 64 subcontext pairs, 0x298 = 1 E, T
Subcontext count KernelFifo+170 _nv040326rm: register 0x404030 bits 11:0, read once with PMC bit 12 set (0x40 at line 140981) E rows K, T
Clock domain 0x13 ClockManager+198 _nv021004rm: multiplexer 0x137190, divider 0x137280, PLL 0xe800/0xe804, 27000 kHz source; traced words give 540000 kHz E 266, T 147426-147429
OBJFUSE+150 _nv028946rm: 0x1373a0, 0x21c04; byte = bit 0 clear; traced: status 0, byte 0 E 41, T 147430-147431
Boot words Descriptor at Falcon+3e8 (not +3c8), fields +60 and +c of container record PMU_LOADER: 0x5e00, 0x2498436 E, T
Wait pass R 0x0, R 0x100; PMU pending = PMC bit of interrupt-table row 0xe (bit 24). 0x9100, 0x100a20, 0x8f0a20, 0x81008x and 0x9428 belong to the timer and MMU-fault augmenters. With an empty service registry (this path) the original services nothing D, T, E of stall_scope
KernelBus+4a8 Argument 1: one read of the BAR2 flush page; argument 3: mfence then that read; no BAR0 access A, E 119, T
_nv044310rm (Unload) W 0x17e26c = 1, then per LTC and slice a wait on bit 0 of LTC+0x46c+0x200*slice (16 x 4 on the traced board) E 30
PMU PostUnload HAL slot +3a8 _nv052515rm (not +3a0); acts only with OBJVBIOS+12d0 D; not reproduced
OBJSEC2 Load _nv055933rm -> _nv055814rm -> _nv028572rm: reset (0x87048 bits 1:0 clear, 0x87014 = 0xffffffff), _nv028391rm: request (7, 0, 0), 0x87010/0x8701c = 0xfff2, _nv028398rm: HWCFG, 0x87268, 21 descriptor words at DMEM 0 (the region image's SEC2 boot descriptor, argc 1, argv = DMEM bytes - 0x78), 0x87040 = 1, 0x87130 = 2, 0x87080 = 0x18e6cc3 (loader record SEC2_LOADER +c), 0x87294, 0x87048 |= 3, then the SLCG table of 0x87000. No wait for the SEC2 INIT message (OBJSEC2+50c clear) E 190 rows, T 164966-165083 (39 accesses)
FECS/GPCCS start Graphics+10e0 _nv031609rm: FECS+80 _nv027343rm (0x409048 read, 0x409014, 0x409840 = 0xffffffff, 0x40910c = 0, 0x409a20 = 0x80000002, request (2, 0, 0), 0x409010 = 0xffd2, 0x40901c = 0xfff2, 0x409130 = 2, 0x409294, 0x409048 |= 3), then GPCCS+98 _nv029620rm (request (3, 0, 0), same four) E 320 rows, T
_nv033633rm KernelGraphics+198 (0x409044), +10e0, _nv027644rm (mailbox 0 == 1, then FECS+90 reads 0x409818), _nv033527rm (method 0x21 data 0x3fffffff), 0x409c24 = 0xe0002, _nv045007rm (LTC reads), ten size calls of which four ask FECS (0x10, 0x16, 0x25, 0x1a) A, E 243, T 166380-167097 (71 accesses)
Unload of started Falcons FECS and GPCCS: the accesses of gr_level::falcon_unload (interface bits clear, all interrupts masked). SEC2 _nv055940rm: a command to the SEC2 firmware (not reproduced), then SEC2 disabled in PMC and its reset register pulsed E rows U
Graphics unload with FECS running Same accesses as without; shutdown passes flags 0; PostUnload _nv033666rm clears PMC bit 12 E 48 + 5, S
A failed request _nv028391rm only logs a failed _nv043191rm and starts the Falcon all the same D, E

Still [D] or [I]: the creation condition of the PMU+e88 surface, the content of the two system-memory allocations (zero here), the unload order (reverse load order: OBJFIFO 69, KernelFifo 68, OBJSEC2 67, Graphics 40, Pmu 28, OBJACR 27).

9.2 Sequence of the level

# Step Original Rust Evidence
1 Levels 1 to 6 up to the host load; placements WPR primary, shadow, PMU instance block, PMU surface before the runlist buffers as documented adapter_start::upper_levels ran on hardware up to level 7
2 Refusals of both levels, no write - acr_bringup::run, pmu_bringup::Inner::prepare -
3 OBJACR Load _nv016731rm.. (level 8) acr_load E, T; never run
4 PMU InitLocked fills: instance block, surface (1 MiB pieces), two system-memory allocations _nv051858rm pmu_bar2::Space::{instance_block_zero, surface_zero} E; made after the ACR load (deviation)
5 Graphics InitLocked and StateLoad _nv033663rm, _nv033665rm gr_bringup E, T; ran on hardware (level 7)
6 PMU Load _nv051860rm pmu_ls_start::load over pmu_bar2, pmu_level E 70 + 41, T 147279-147456
7 INIT through the class's interrupt service _nv052477rm -> _nv052510rm -> _nv052433rm pmu_level::interrupt_pass, pmu_irq_service::service, pmu_fbq::receive_init A, E, T 147603-147608
8 OBJSEC2 Load with region (1, 0) and bootstrap 7 _nv055933rm, _nv043191rm -> _nv016743rm falcon_ls_start::sec2_load, pmu_fbq::falcon_request E, T 164966-165083
9 FECS and GPCCS start (bootstrap 2, 3), FECS ready, method 0x21, 0x409c24, size queries _nv033633rm gr_fecs_start::discover, falcon_ls_start::{fecs_start, gpccs_start} A, E, T 166380-167097
10 One more service pass (events), read-back notes - pmu_bringup::drain level policy
11 OBJSEC2 Unload (without its command) _nv055940rm falcon_ls_start::sec2_unload E; no transcript
12 Graphics StateUnload (FECS and GPCCS unload functions) _nv033671rm gr_unload E; ran on hardware with halted Falcons
13 PMU Unload: _nv044310rm, detach on the HPQ, IRQMCLR 0x40, three unmappings, unbind _nv052517rm pmu_unload::unload, pmu_bar2::Space::unmap, pmu_ls_start::unbind E; no transcript
14 OBJACR Unload, region read-back, alarm note _nv016962rm acr_unload (level 8) E; never run
15 Host unload (level 6), Graphics PostUnload, BAR2 teardown, PMC enable and bus mask restore, PCI command as found _nv028312rm, _nv033666rm fifo_bringup, gr_fecs_start::post_unload, adapter_start hardware for level 6; E for PostUnload

Events: every message that is not a reply is consumed by pmu_fbq::Transport::receive, classified through the 40-entry table and handed to the provider, which logs unit, type, size, length and number (notes 504d0060/61) and drops it. (0x0f, 1) also ends the detach wait. The statistics of _nv052459rm are not kept.

9.3 Declared deviations

  1. None of the 241 client commands; after INIT only region + three bootstrap requests (section 8.5).
  2. Events with a function in the original's table are dropped like those without one.
  3. The PMU service is entered from polling loops on the PMC bit; the original's registry is empty on this path and would service nothing.
  4. PMU InitLocked fills after the ACR load; the BAR2 offsets are those of the trace (instance 0x1000).
  5. The two system-memory mappings are zeroed coherent allocations of a 32-bit DMA context.
  6. A Falcon whose bootstrap request failed is not started (the original starts it).
  7. SEC2 unload without the firmware command (the original's failed-command path); PMU PostUnload and the SEC2 INIT message are not handled.
  8. When the class's Unload cannot run (PMU never initialised beyond what pmu_unload reproduces, INIT failed, a request timed out, the PMU halted), the level runs _nv052253rm (acr_unload::pmu_reset_sequence) and then the unmappings: the Unload's own path after a failed detach.
  9. The host unload comes last (level 6's nesting); in the original OBJFIFO unloads first.
  10. Carried over from level 8: CPU shadow copy, zeros for undefined descriptor words, bus mastering only during the level.

9.4 State of the GPU at each failure point

"Next first open" is what the original driver meets; its PreInit unlock is [A]+[E] (acr notes 8.2), its first-open engine reset _nv043609rm with every engine listed ran on this board (level 3).

Point of failure State What the level does Next first open of the original
Refusal (504d0002) as after level 6's host load; no ACR load host unload, restores as after level 6 (ran on hardware)
ACR load fails the rows of acr notes 11.4 level 9 not called; unload if a region reads set acr notes 11.4
Fills or system memory fail regions set; own framebuffer pages partly zeroed Graphics level runs alone; ACR unload as level 8 after its unload [E]
Graphics refuses or fails regions set; PGRAPH as at a failed level 7 no PMU start; ACR unload as levels 7 and 8
PMU Load fails (reset status, scrub, idle, bind, mapping) PMU out of reset, maybe bound, CPU not started or just started state 2: reset asserted and released; otherwise reset sequence; unmappings; ACR unload PMU reset and halted by the HS unload image [E]; regions empty if the unload succeeded
INIT missing or failed LS PMU running in an unknown state as above same
Request rejected or timed out PMU running; the Falcon concerned only had its interface bits cleared and interrupts masked Falcon not started; SEC2 unload if SEC2 runs; Graphics unload; reset sequence; unmappings; ACR unload engines reset through PMC at first open [hardware level 3]; PMU as above
FECS never ready, size query times out SEC2, FECS, GPCCS running LS firmware SEC2 unload (PMC bit 14 off, reset pulse), Graphics unload (interfaces off, masked), PMU unload, ACR unload, PostUnload (PMC bit 12 off) same
Detach fails or PMU halted PMU running or halted, not detached reset sequence, unmappings, ACR unload same
Unbind times out instance block still bound to a released root cleanup bits incomplete, stage failed; the ACR unload resets the PMU same [I]
ACR unload: status 0xffff with regions reading empty regions clear; expected on hardware if the status check reads a non-zero SEC2 MAILBOX0 (SEC2 was started, then disabled in PMC) alarm note and passed: false as at level 8; regions_read_empty_after_unload and note 504d030a (0x87040) tell this case apart regions empty [E gate]
ACR unload fails, a region still set regions locked alarm note 414300ff dead0007 the original's PreInit unlock [A, E]; if that fails too, only a reboot is known to recover, and a failed first open of the original crashed its cleanup on this machine (incident 2026-11-19)
Complete run PMU halted after the unload image; SEC2 and Graphics disabled in PMC until the restore; regions empty stage 00090000 not observed; [E] for the gate

Outcomes that could leave a GPU the original cannot initialise: (a) an ACR unload that leaves a region set and a failing unlock at the original's PreInit (the level 8 hazard, unchanged); (b) not excluded by evidence: firmware state that survives the PMU reset of the ACR unload and the PMC engine resets of the next first open (none is known); (c) independent of the GPU: an oops in the never-executed kernel glue restarts the machine (panic_on_oops).

9.5 Expected notes of a complete run on the traced V100

Level 8's notes as in acr notes 11.5 (with 41430040 possibly 0000ffff, see 9.4), level 7's Graphics notes, and: 504d0007 00000000, 504d0008 00005e00, 504d0009 02498436, 504d000a 018e6cc3, 504d0010 00000040, 504d0011/12 00000000, 504d0015 00004000, 504d0018 007fdf7d, 504d0019 00008000, 504d0016 00004208, 504d0017 0000420a, 504d001b 00083d60, 504d001c 00000000, 504d0020 00000000, 504d0021 00000002, 504d0022 202fbf00, 504d0023 00000000, 504d0025 00000000, 504d0100..010e (INIT words, unknown), 504d0037 00000000, 504d0040 00000000, 504d0032 00000000, 504d0046 00000000, 504d0033 00000000, 504d0047 00000000, 504d0041 00000000, 504d0042 00000001, 504d0043 00000000, 504d0044 0000000f, 504d0045 00000410, 504d0050 00111800, 504d0051 000f0c00, 504d0052 0000b300, 504d0053 00140e00, 504d0070 00000000, 504d0071 00000000, 504d0073 00000000, 504d0072 00000003, 504d0076 00000000, 504d0075 0000003f, 504d0004 000001ff, 504d0001 00090000, 504d0077 00000000. Values up to 504d0053 are transcript values of a run that had sent the client commands; the rest is what the emulated original leaves.

9.6 Open, settled only by a hardware run or further reading

Question Settled by
Does the LS PMU answer INIT, region and bootstrap without the client commands, and which events does it send? the run: notes 504d0025, 504d0100.., 504d003x, 504d0060/61
Does register 0x100 show the PMU bit while this path keeps the PMC interrupt enables masked? the run: a timed-out INIT wait with 504d0201 (IRQSTAT) bit 6 set and 504d021c (0x100) bit 24 clear says no
What does SEC2 MAILBOX0 read at the ACR unload's status check (after the SEC2 start and unload)? the run: 504d030a and 41430040; or read _nv016730rm's caller for the shutdown case
Is the unbind acknowledged by a detached PMU? the run: 504d0076
Do FECS and GPCCS reach ready with the PMU's power, clock and thermal units uninitialised? the run: 504d0042, 504d0044
OBJVBIOS+12d0 on the V100 (PMU PostUnload acts or not) read the VBIOS producer of +12d0
Creation condition and initial content of the PMU+e88 surface and of the 0x19d0 buffer read _nv052623rm's callers and _nv052603rm
The deepest call chain of the level is about 9 KiB of frames on a 16 KiB kernel stack (sum of the per-function frames; no call-chain proof) a run in a VM with a stack guard, or a static call-graph tool