{ "scope": "GV100 (Tesla V100) host load: OBJFIFO StateLoad _nv028309rm -> _nv028308rm, the BAR1 USERD base write of the early caller, OBJFIFO StateUnload _nv028312rm -> _nv028311rm, and the runlist buffer requests of OBJFIFO InitLocked; bring-up level 6 (kernel/fifo_bringup.rs). The copy-engine utility channel that follows in the original (transcript line 140935 onward) is not part of it.", "original_artifact_sha256": "5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b", "evidence_classes": "A = instructions read (REA procedure_assembly or objdump of the symbol), D = decompiler pseudocode only, S = public source match, T = physical transcript target/trace/b3-bar0.txt, E = original instructions executed by a harness of this repository, I = inference.", "call_chain": { "load": "KernelFifo Load (+100 _nv040425rm) returns 0. OBJFIFO class Load slot (+118) = _nv028309rm(gpu, fifo, flags): _nv059509rm (default interval), _nv028308rm, +780 (empty). _nv028308rm: +710 (returns 0); _nv028145rm -> _nv028143rm -> _nv043611rm(gpu, OBJMC, 4, 0) -> OBJMC+130 _nv043609rm partial branch; channel-id manager loop (+608 returns 0); OBJBIF+318 _nv017752rm; MIGManager+168 _nv046163rm (empty); _nv028025rm: +660 _nv027982rm (+630 _nv027874rm), +668, +1d8 _nv027979rm, +1d0, +128 _nv027662rm -> _nv030171rm, +540, +118 _nv027681rm (_nv030976rm, GPU+5c8 _nv030977rm), +150, +140; GPU+99f = 1; +160 _nv027753rm: _nv027770rm -> _nv027771rm per engine row (busy check _nv027871rm: +3e8 _nv027923rm, +400 _nv027859rm; _nv040361rm; +2d8 _nv028277rm with _nv027655rm; _nv059509rm with OBJFIFO+810; _nv028181rm: _nv055498rm, owner vtable +88 _nv004422rm -> _nv055557rm -> _nv015976rm and _nv015977rm -> +3b0 _nv028192rm -> _nv028190rm -> +3b8 _nv028203rm; _nv028101rm: +1e8 _nv028063rm, +1e0 _nv028344rm), W 0x2a0c, _nv027803rm -> _nv027804rm -> +2d8; +640 _nv027660rm, +508 _nv027665rm, +518 _nv027667rm, +500, +510.", "after_the_load": "_nv028064rm (the copy-engine utility channel setup the ACR path reaches) calls KernelFifo+208 _nv040417rm(gpu, fifo, 1, 0): W 0x2254 = 0x10000000 (transcript line 140934).", "unload": "_nv028321rm (teardown of that channel): KernelFifo+208(gpu, fifo, 0, 0), then the class Unload slot (+120) = _nv028312rm -> _nv028311rm: +120 _nv027819rm -> _nv030368rm(gpu, 0x2000, 1); +1c8 _nv028265rm -> +190 _nv028230rm (+188 _nv028237rm, +130 _nv027957rm, +688 _nv028258rm -> _nv028263rm -> owner vtable +b8 _nv055525rm, +170 _nv028217rm); +150, +140; +6b8 _nv027774rm; GPU+99f = 0.", "evidence": "E for every function named (reports/gpu-fifo-load-original.json lists the 176 executed in the traced load case); A for the order of _nv028025rm and for _nv027753rm (REA procedure_assembly); the two caller facts about _nv028064rm and _nv028321rm are D plus the matching transcript lines." }, "register_sequence_of_the_traced_load": [ "140621-140630 reset: R/W 0x88004 (bus master off), R/W 0x200 (bit 8 off, 2 us, timer +180 with 0, restored, 2 us), W 0x88004, bus +220 (R 0x1100, W 0x1140 = 0x8c0001fe, R 0x9080, R 0x88714)", "140631-140633 R 0x88014, R 0x88018, W 0x12d0 = 0x2800", "140634-140636 W 0x2528 = 0x80000000, W 0x2100 = 0xffffffff, W 0x2140 = 0x7fffffff", "140637-140720 14 PBDMAs: R/W 0x4013c + 0x2000 i (bit 11 cleared), W +0x108 = ~0, W +0x10c = 0xfffff7ff, W +0x148 = ~0, W +0x14c = ~0", "140721-140722 W 0x26e0 = 0xc242 (_nv030976rm), W 0x26ec = 0 (GPU+5c8)", "140723-140872 15 engine rows: R 0x3080 + 4 pbdma, R 0x2640 + 8 tag, R/W 0x2630 (set runlist bit), W 0x2270/0x2274 twice (buffer page, runlist << 20 | 0), W 0x2638 = 1 << runlist, R 0x2638", "140873 W 0x2a0c = 0x803fffff", "140874-140903 15 times R/W 0x2630 (clear runlist bit)", "140904-140933 R/W 0x2a04, 14 times W 0x4012c + 0x2000 i = 0xffff, then = 0xf4240", "140934 W 0x2254 = 0x10000000" ], "inputs_and_sources": { "engine table (15 engines, 13 runlists, first PBDMA and FIFO tag per row), PBDMA count 14": "hardware: registers 0x2004, 0x2390.., 0x22700.. through core mmu::engine_cache (reports/gv100-physical-topology-validation.json); the harness runs the original constructor on the same words", "register values": "hardware", "GPU+911": "set: _nv000790rm stores 0x0101 at GPU+911 before any stage [A, S]; the image byte is logged", "GPU+93b, +917, +918, +926, +52f2, +52f3, +915, +4de0, +4de2, +1e0c, +1e28, +52fc, +6d29, +69e4, +dec, +6a40": "retained GPU software image", "OBJFIFO+808, +80c, +80d, +810, +814": "core fifo::load::config (_nv027761rm, oracle rows C) from registry RmEngineContextSwitchTimeoutUs and RmPbdmaTimeout and GPU+1e0c/+1e28", "OBJFIFO+7c7": "clear: no GV100 initializer sets it (reports/gv100-engine-hal-bindings.json)", "clock-gating tables of key 0x2000": "gpu::clock_gating_tables (oracle of gpu::clock_gating); feature state from the registry words (gpu::clock_gating_providers)", "GPU+22c8 object and its +11d8 child": "providers::GV100_OBJECT_22C8 (reports/gpu-clock-gating-providers-validation.json)", "register override table GPU+6a38": "none; the level refuses when GPU+6a40 is not zero", "runlist owners and buffers": "one owner per runlist in engine table order, record as InitLocked leaves it (oracle: index 0, entries 0, +504 0, +500 0, +50c 1); addresses from core placement::fifo_init on the level-4 heap model; channel count from register 0x2008", "load flags": "0, as _nv028064rm passes [D]", "timeouts": "the configured default interval on the Linux monotonic clock", "LPWR engine mask": "taken as zero (assumption supported by the transcript: no PMU mutex access in the load)" }, "runlist_buffers": { "request": { "count": 26, "bytes": "0x20000", "alignment": "0x1000", "address_space": 2, "descriptor_tag": "0x86", "order": "two per owner, owners created in engine table order of their first engine; the load submits the first of each pair" }, "stage": "OBJFIFO InitLocked _nv028307rm -> _nv028306rm -> _nv028169rm -> _nv055508rm -> _nv055507rm -> owner vtable +30 -> _nv015974rm -> _nv040400rm [E]", "placement_on_the_original_heap": { "wpr_primary": "0x7fde80000", "wpr_shadow": "0x7fdda0000", "pmu_surface": "0x7fdb98000", "runlist_buffers": [ "0x7fdb70000", "0x7fdb50000", "0x7fdb30000", "0x7fdb10000", "0x7fdaf0000", "0x7fdad0000", "0x7fdab0000", "0x7fda90000", "0x7fda70000", "0x7fda50000", "0x7fda30000", "0x7fda10000", "0x7fd9f0000", "0x7fd9d0000", "0x7fd9b0000", "0x7fd990000", "0x7fd970000", "0x7fd950000", "0x7fd930000", "0x7fd910000", "0x7fd8f0000", "0x7fd8d0000", "0x7fd8b0000", "0x7fd890000", "0x7fd870000", "0x7fd850000" ] }, "requests_between_the_test_page_and_the_buffers": [ "WPR primary, 0xe0000 aligned 0x20000 (OBJACR InitLocked _nv016953rm) [request E in gpu-wpr-blob and gpu-acr-region-allocate oracles; that InitLocked makes it here D]", "WPR shadow, same request with descriptor flag 4 (OBJACR+386 set on GV100) [D]", "PMU surface, 0x207a00 bytes with the 4 KiB page size (_nv052601rm) [D]; the size is read from the PMU argument word of transcript line 147444 [T, I]" ], "result": "With these three requests the original heap code places the 26 buffers at 0x7fdb70000 - 0x20000 n, the transcript's addresses; core placement::fifo_init gives the same. Without the PMU surface or with another size they do not match (rows of the placement oracle).", "missing": "The producer of the PMU surface size was not executed. Requests of at most 0x1f000 bytes go to the hole above the WPR primary and do not move the buffers; one 4 KiB page of that hole is in use at the early load and its owner is not identified. The InitLocked bodies listed in analysis/closed-driver-580/fifo.md (FIFO load verification, 'Not examined') were read from pseudocode only." }, "implemented": { "core": [ "fifo::load::{load, unload, config, set_bar1_userd_base, runlist_buffer_bytes} (no_std, no unsafe); Services: timeout start and check, three diagnostics, restriction lookup, write-combine flush, recovery service, with mc_reset::Services, clock_gating::Services and lpwr::Services as supertraits (outer Err = provider unavailable or unsupported path; inner = executed original status)", "mmu::placement::{fifo_init, InitRequests, Placement::heap_after_test, WPR_REQUEST_GV100}", "mmu::engine_discovery::EngineRecord::first_pbdma_word, mmu::engine_cache::Published::into_records" ], "reused": "fifo::init (BIF word, interrupt masks and enables, PBDMA enables, override table, timeouts), gpu::mc_reset::reset_engines, gpu::clock_gating::{load_blcg, load_slcg, slcg_table}, fifo::lpwr::Reference, fifo::context::Command, fifo::preempt constants", "kernel": "kernel/fifo_bringup.rs (level 6), adapter_start.rs (bar2_bringup returns the heap model; level 6 after level 5), nvdec_bringup.rs (Storage, Notes, Registry made crate-visible)", "tools": "tools/check_gpu_fifo_load_binary.py; tools/check_gpu_memory_placement_binary.py (281 appended rows); tools/run_hardware_first_open.py (level 6 notes, expected values); kernel-open/nvidia/gpu_owner.c (parameter text); Makefile check" }, "verification": { "oracle": "target/gpu-stage/original-fifo-load.txt", "oracle_sha256": "f5ad2894442afdae24d1a3ab7e34fda13e4e6d854818e70b7ee52d8af72619e7", "oracle_regenerates_identically": true, "rows": 823, "rows_by_kind": { "T": 1, "V": 1, "L": 338, "B": 7, "C": 14, "X": 426, "U": 36 }, "kinds": { "T": "engine table of the physical V100 (16 records of 100 bytes)", "V": "the traced V100 load", "L": "load cases", "B": "runlist buffer request of the owners at InitLocked per channel count", "C": "OBJFIFO constructor fields", "U": "_nv040417rm", "X": "OBJFIFO StateUnload after a load" }, "load_cases_with_nonzero_status": 29, "variations": "load flags; OBJMC and MIGManager present or absent; GPU bytes 911, 93b, 917, 918, 919, 926, 52f2, 52f3; the Lpwr object, its two children, bytes 183, 184, 271, engine mask and policy; feature states; PMU mutex outcomes (retry, 20 failures, other status); context-switch timeout, enable and debug byte; PBDMA timeout and the forced byte; wait interval; random register words; engine and PBDMA status words; pending preempts with timeout statuses at each row; missing owners; override tables; buffer addresses; channel counts; constructor registry keys; unload with pending and enabled interrupt bits and runlist events", "original_functions_executed_in_the_traced_load": 176, "transcript": { "harness": { "lines": "140621-140934", "register_accesses": 314, "equal": true, "bus_function_accesses_taken_from_the_transcript": [ "r:1100:0", "w:1140:8c0001fe", "r:9080:80002000", "r:88714:48cf" ], "last_line_is": "KernelFifo+208 _nv040417rm(gpu, fifo, 1, 0), called by _nv028064rm after the load" }, "rust": "fifo::load::tests::traced_read_values_reproduce_the_physical_transcript: lines 140621-140934, 314 accesses, offsets, values, order and reads equal; the bus function is gpu::bus_stage::load_slot_220", "tracer_artifact": "no write in the range has the value 0x24 or its own displacement" }, "placement_oracle": { "oracle_sha256": "9205a3b083b8f9f4ab0f1591606cf7bbea2b29bea9b873d078baa50990978f24", "rows": 10346, "first_10065_rows_sha256": "6eafbaaf51a288281647db6be047e640385c98866921271719ba56f75af6e084", "appended_rows": 281 }, "ignored_tests": "fifo::load::tests::compare_original_fifo_load (823 rows), fifo::load::tests::traced_read_values_reproduce_the_physical_transcript (314 accesses) and mmu::placement::tests::compare_original_memory_placement (10,346 rows) pass" }, "kernel_level_6": { "order": "after levels 4 (BAR2, torn down as before) and 5 (NVDEC run and reset) completed; needs no BAR2 mapping because nothing is written to framebuffer memory", "steps": [ "refuse unless PMC enable bit 8 is set", "software inputs and registry", "engine table from the device-info registers", "channel count (0x2008)", "owners and buffers on the heap model", "fifo::load::load", "W 0x2254 = 0x10000000", "read-back of 20 registers", "W 0x2254 = 0 and fifo::load::unload", "read-back of 6 registers" ], "expected_notes_on_the_traced_v100": { "46490003 pmc_enable_at_entry": "1fecdff1", "46490005 engines_runlists_pbdmas": "000f0d0e", "46490006 channels": "00001000", "46490007 context_switch_timeout": "803fffff", "46490009 pbdma_timeout": "00000000", "4649010x runlist first buffer pages (runlists 0, 6, 1, 3, 2, 4, 7, 8, 9, 5, 10, 11, 12)": "007fdf50 down in steps of 0x40 (the original's: 007fdb70 down)", "4649000a load_status": "00000000", "4649000b interrupt_enable_mask": "7fffffff", "4649000c preempt_reads_and_pending": "0000000f", "4649000d userd_base": "00000000", "4649020x first reads": "088004 00100506, 000200 1fecdff1, 001100 0, 009080 80002000, 088714 000048cf, 088014 0000000c, 088018 000039a0, 04013c effffeff, 002630 0, 002a04 800f4240", "4649030x after load": "002140 61810101, 002528 80000000, 002100 40000000, 002630 0, 002638 0, 002a00 00001fff, 002a04 800f4240, 002a0c 803fffff, 002254 10000000, 0012d0 00002800, 0026e0 0000c242, 0026ec 0, 04010c fffff7ff, 04012c 000f4240, 04013c effff6ff, 04014c ffffffff, 05a12c 000f4240, 002270 007fdc50, 002274 00c00000, 000200 1fecdff1", "4649000e unload_status": "00000000", "46490010 interrupt_pending_at_unload": "40000000", "4649040x after unload": "002100 0, 002140 0, 002528 0, 002a00 0, 0026ec 0001fffe, 002254 0", "46490001 stage": "00060000", "note": "Values read back from registers the original only wrote are predictions, not transcript reads; tools/run_hardware_first_open.py lists which is which and reports every difference." } }, "teardown": { "original_path": "KernelFifo+208(gpu, fifo, 0, 0) then OBJFIFO StateUnload, as _nv028321rm runs them after the early load (transcript lines 141004-141012), implemented in core and compared with the original (426 oracle rows)", "left_programmed": "0x12d0, 0x26e0, PBDMA interrupt enables and timeouts, 0x2a04, 0x2a0c: the original's unload leaves them too", "then": "the existing end of the direct bring-up: PMC enable and the bus interrupt mask are written back", "fallback": "if the unload meets an enabled pending bit it cannot service (bits 8, 29, 31) it only writes 0x2140 = 0 and 0x2528 = 0" }, "refused_or_assumed": [ "refused: PMC enable bit 8 clear; registry unavailable; engine table not built; register 0x2008 zero or 0xbadxxxxx; no heap model (level 4 failed); GPU+6a40 non-zero; more than 16 runlists", "stops with a note: a preempt still pending at a poll (interrupt service _nv037737rm has no provider); a restricted runlist; any clock-gating, LPWR or timer service outside the paths verified for table 0x2000", "assumed: LPWR engine mask zero; no RmNumFifos override of the channel count; OBJMC present; load flags 0", "declared difference: runlist buffer addresses (this path makes no WPR or PMU request first)", "not reproduced: thread-state timeout and flags of _nv059509rm; the lock at OBJFIFO+7e8 (single task under the GPU lock)" ], "limits": [ "Addresses of 2^40 and above are refused by fifo::context where the original keeps 28 bits of the page number.", "The unload is verified for flags 0 without the scheduling object of OBJFIFO+860, the state after an early load.", "The owners' behaviour was verified for the V100 engine table only.", "The bus function +220 and the timer function +180 are services of the harness; their own oracles are gpu-bus-stage and gpu-timer-delay." ], "validation": { "tools/validate_all.sh": "all 30 steps PASS (fmt, clippy, 596 workspace tests, bridge tests, modules, audit, native codegen, guest build, initramfs, both guest runs, result gate, live control)", "nvidia_rs.ko_sha256": "fa0e956a56ef370cd4f593287a6ed53eba4c65f4210d60ab6ba39cef31c1b1d3", "nv_rs_edu_test.ko_sha256": "82a4183d9780fb6c7e838abe5c7e39e1fa7e11e7d75ad11330fcd47a324c5891", "vermagic": "5.15.0-203-generic SMP mod_unload modversions", "hardware": "not executed; this build has not run on a GPU" }, "tested_sources_sha256": { "src/nvidia/src/fifo/load.rs": "70d9c82ddca93b06884f6e3fdee5a1d8d08dbace50765d9fb535ef61ed481724", "src/nvidia/src/fifo/load_tests.rs": "a1f9f8973de96f8a4f1fbf98fd06ac7caffa8aa0aa2932ed31303bc9612ac6f8", "src/nvidia/src/mmu/placement.rs": "2715f3192c4a6dd7f68e474ff0d342318e0fc240b15e4e2ed80e8b22f84bb679", "src/nvidia/kernel/fifo_bringup.rs": "4441165835075579a76ce12deaed0671ac601fc0346e8d87e331aa3719949e84", "src/nvidia/kernel/adapter_start.rs": "6147e682ccb94ae179d0a7006313d22645da1c6c45f6ebca4df85b201f3d3e91", "tools/check_gpu_fifo_load_binary.py": "f548c28f02a63b04db53ab623afe6a89b024b7c4499240e62d026f885b8dd622", "tools/check_gpu_memory_placement_binary.py": "72c7dad4fa2a17eb4a052732c2401aae56fde59b727124161a540f2df0b493cf", "tools/run_hardware_first_open.py": "0f2f8f85e4e2baf71d67081b85fc2f93c20f710d6cd7d4a8bab75b606c4b734f" }, "reports": [ "reports/gpu-fifo-load-original.json", "reports/gpu-memory-placement-original.json", "analysis/closed-driver-580/fifo.md (FIFO load verification)" ] }