interplane.Get Omega
Read in your language

omega-gpu-driver

aien-dev/omega-gpu-driver

Brought by drakestapleton

branch main Branches Tags History

omega-gpu-driver / GB20B.md

152 lines · 10493 bytes Raw Blame History Rendered
1# GB20B source-selected SEC2 candidate
2
3Status: IMPLEMENTED, host simulator EXERCISED only. Physical W0, firmware boot, RPC,
4resources, queues and compute on the Spark remain NOT_RUN in this qualification.
5No merge, deployment, service stop, VFIO bind/open, reset or BAR access is authorized here.
6
7## Authorities and deliberate oracle correction
8
9NVIDIA open-gpu-kernel-modules tag 580.173.02, exact revision
10`20e4e6e19cc26ba47b5cbe23130a396be100c427`, is the vendor authority. The physics
11third_party copy is pruned; qualification used an unmodified full checkout of that revision.
12`src/nvidia/generated/g_kernel_sec2_nvoc.c:674-804` selects different preparation,
13MCTP-header and send/receive HALs for GB10B and GB20B. It shares the low-level command
14queue send implementation. The generated GSP HAL selects GB20B boot and production
15FMC archives at `g_kernel_gsp_nvoc.c:792-795,928-930`; WPR metadata remains GB10B's
16implementation at lines 986-989. Do not substitute the GB10B archives.
17
18The C reference moved deliberately from aienux `c5bb3a4b9898257658aba0b7178a3c73a0371c27`
19to #463 `a108b1144a064aa7b824374a622d627c6ba91fd1`. Both the former C reference and
20Omega encoded GB10B MCTP SOM|EOM as 0xc0000000. The vendor GB10B HAL
21`ksec2CreateMctpHeader_539ab4` actually returns 1. The corrected C arena and simulator
22are the independent oracle; arena and RPC gates pin the same complete reference revision.
23`mutants-arena.sh` reinstates the old value and requires an exact-byte parity failure.
24This is an oracle correction, not evidence the previous common-mode comparison was correct.
25
26## Distinct profile, not a relaxed GB10 gate
27
28| Property | GB10B | GB20B |
29|---|---|---|
30| BOOT_42 architecture / implementation | 0x1a / 0xb | 0x1b / 0xb |
31| signed ELF family | gb10y | gb20y |
32| boot / FMC generated archive suffix | GB10B | GB20B |
33| MCTP first word for single COT | 1 | 0xc0000000 (SOM, EOM, SEID=SEQ=0) |
34| COT version / packed payload bytes | 1 / 860 | 2 / 860 |
35| FRTS sysmem size | FMC image bytes (GB10B HAL quirk) | zero |
36| prerequisite | existing GB10B flow | FWSEC scratch 0x5e0 == 0xff |
37| send completion | SEC2 busy mailbox consumed | MSGQ response, SEC2_RESPONSE 0x15, command COT 0x14, FSP_OK |
38
39`gsp/profile.om:gpclass` classifies the second profile separately. `gpchip` and the
40existing mapped transport admission remain GB10B-only: GB20B classification does not
41admit GB10B system-info records or a GB10B package. No actual BOOT_42 has been measured.
42
43`gsp/arena.om` now composes either profile. For profile 2, `arpkg[0..3)` must each be
442 (gb20y signed-image family, GB20B boot archive, GB20B FMC archive respectively).
45Boot code/data/manifest offsets must be inside the supplied boot image; GB10B fixed
46sizes are not applied to GB20B. Common WPR/FMC-args layout follows the generated shared
47WPR HAL. The selected FMC and its 48-byte hash, 384-byte key and 384-byte signature
48are copied to the bounded aligned arena. COT v2 leaves every FRTS field zero.
49These profile assertions describe the caller's checked extraction, NOT cryptographic
50verification. `fwprep FWFILE OGKMSRC OUTDIR gb20b` prepares this profile offline.
51It selects the gb20y signature and both GB20B production archives, checks the SHA-256 of
52all three complete inputs against the vendor pins, then creates a fresh output directory and publishes the boot image and FMC
53inputs. It writes `fw.gb20b.manifest` last. An existing output directory is refused. The default
54three-argument invocation prepares the historical GB10B profile. The board identity
55and the physical launch still require hardware qualification.
56
57`gsp/sec2.om:s2boot` takes actual BOOT_42 plus explicit profile/package and refuses a
58mismatch before register access. It requires silicon, SEC2 present and FMC enabled;
59waits for FWSEC secure boot; sends the complete 868-byte single packet on command
60queue 0; waits on MSGQ rather than GB10B's mailbox; reads bounded response EMEM with
61AINCR; verifies pointer progress, acknowledges tail before head, checks vendor/type,
62COT command and error; then runs the shared GSP mask/lockdown/FMC/CPU-active completion.
63Source: `kernel_sec2_gb20b.c:280-536,547-549,962-1085`, `kernel_sec2.c:250-593`,
64`sec2_mctp_format.h:34-53`, `nvdm_payload_cmd_response.h` and `kern_fsp_cot_payload.h`.
65Unsupported fragmented responses, malformed sizes and nonzero firmware errors refuse.
66Task ID is captured, not interpreted as a GSP RPC sequence number.
67
68The vendor secure-boot deadline is max(scaled four seconds, default GPU timeout).
69This library receives finite poll budgets; a native caller must implement that timer
70policy with its own monotonic clock and approved pause. No production timing or reset
71policy is asserted by a synthetic check-count simulation. Warm/resume, confidential
72compute and firmware debug variants are not implemented by this cold-production path.
73
74## Full-size host image
75
76`tests/arena_large.sh FIRMWARE VERIFIED_GB20B_PACKAGE` compiles the native composer and reads the real
77inputs from the signed-firmware package. The test stages 76,496,896 bytes in an anonymous host mapping.
78It checks all 74,969,088 firmware bytes, 18,303 leaf pages and their parent pointers, the bootloader,
79both signatures, the FMC and its key and digest. The test fixture supplies model addresses and system
80parameters. The finite byte model in `tests/arena_bytes.lean` proves the upper bank fits, a byte write
81round-trips and the other bytes in its word are preserved.
82
83The host composer admits 80 MiB. The existing owned device-window policy in `chan/gmmu.om` admits
848 MiB. Physical transport, real device addresses, cache visibility and firmware launch still need
85hardware qualification.
86
87## Composed launcher and native effect seam
88
89`build.sh` builds `build/w0`, `build/fwprep` and the model-only `build/ogd`. The latter
90accepts `model` and `model-trace` and refuses a physical launch with exit 95. Host units cover
91protocol building, modeled boot/RPC, resource records and queue/completion ownership;
92their passing tests do not create a launcher. `gsp/dispatch.om` still refuses hardware.
93`chan/dma.om` and `gsp/mmio.om` target Linux VFIO/map handles, NOT native Aienux capabilities.
94
95The missing native seam is concrete: load/relocate/link the .om unit to a kernel ABI;
96provide non-forgeable profile-bound PCI/MMIO, SMMU-owned DMA-window and IRQ capabilities;
97keep CPU VA, IOVA and GPU VA distinct; enforce ordered publish/MMIO/cache visibility;
98submit a GPU store and engine/system visibility fence; observe uncached completion;
99then prove engine quiescence or bus-master-off before SMMU abort/unmap/reclaim. Current
100published/quarantined windows intentionally cannot be reclaimed. A Linux invalid-fd
101or anonymous-memory test is not this seam. Neither this SEC2 candidate nor a BOOT_42
102read establishes GPU-initiated DMA containment or compute.
103
104## Minimal W0 identity authorization request (not execution)
105
106Request only one `build/w0 000f:01:00.0 20` invocation, no optional HEXOFF, after an
107exclusive approved window and a fresh boot with NVIDIA held back. It reads PCI config
108and BOOT_0/1/42 through pread and read-only BAR mapping and compares both views.
109**Opening VFIO can implicitly FLR the GPU; closing/releasing it can SBR its parent
110000f:00:00.0. Read-only register intent is NOT reset-free.** Empty reset_method does
111not prevent release SBR. This cannot run beside the resident service on 18091.
112
113Before authorization, parent must recheck current BDF, singleton IOMMU group, privileges,
114pinned w0/compiler and restore recipe; obtain a current spark-window/quietlock reservation
115and Drake's explicit approval for service stop, two reboots, VFIO bind/open and FLR/SBR.
116The existing recovery stick is read-only: serial 5D0344B4, PARTUUID
117f227357c-1e80-4fd0-a55e-2efbef1dd25c, current firmware Boot0002. Its historical attended
118recovery proof is 2026-09-25, NOT a recovery boot today. Never overwrite it. See the
119parent's `recovery-stick-readonly-20261028.md`; a candidate image needs a separate medium.
120
121Exact proposed existing-script procedure, only after those authorizations:
122
1231. Freeze and hash this checkout and binaries. `test ! -e build/ogd` is REQUIRED.
124 Run `sh window/d2-pre.sh` (preflight only). The parent verifies it records the exact
125 resident process argv/cwd/environment/coordinator restore key and no other GPU users.
126 This must not be inferred from a stale receipt. Do not use `--go` before approval.
1272. Parent records Drake's exact approved window in
128 `/home/drakestapleton/handoffs/OwnDriver/window/APPROVED` using the existing three
129 lines (`window: ...`, `reset: approved`, `reboot: approved`). Then from this frozen
130 checkout: `sh window/d2-pre.sh --go D2`. Here D2 is only the existing recovery runner:
131 **no ogd may exist or be introduced until the window closes**. No boot/hello/exec
132 invocation is authorized. Do not replace it with a firmware-boot test.
1333. W1 takes the chip lock, stops the process serving 18091, waits for no compute apps,
134 records sysctls, installs temporary NVIDIA hold-back and recovery unit, and reboots.
135 W2 sets restore state/removes hold-back FIRST, checks no NVIDIA modules, binds VFIO
136 and requires root:root:0600. W3 requires runtime-active and executes precisely
137 `sudo -n build/w0 000f:01:00.0 20`. Expected: config identity plus BOOT_0/1/42,
138 successful pread/map comparison, exit 0. Record actual BOOT_42; do not manufacture
139 an expected hexadecimal value from NVIDIA marketing or Linux RM chip naming.
1404. With ogd absent, the runner MUST log boot and hello NOT_RUN, then unbind VFIO
141 (possible SBR), clear override/PM, and reboot to the NVIDIA-enabled normal boot.
142 R loads/rebinds NVIDIA, restores saved sysctls and the exact recorded resident
143 launch recipe, waits for 18091 `/v1/models`, checks one greedy chat and exactly
144 one resident GPU process, removes the temporary unit and checks privileges.
1455. Any failure follows W7/R, not a retrying GPU probe. The runner has one reboot
146 fallback. If restore still fails, stop and require Drake's physical power-cycle /
147 attended recovery procedure. Preserve logs. W0 identity success is not firmware,
148 RPC, DMA or compute qualification. Firmware loading stays NOT_RUN.
149
150The D2 label does not grant additional authority: if `build/ogd` exists, this procedure
151REFUSES before starting; a W0-only stage would be needed before authorizing that tree.
152The live 18091 must remain untouched until the parent relays exact current approval.