Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/docs/GB10_NATIVE_DEPENDENCY_MAP.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / docs / GB10_NATIVE_DEPENDENCY_MAP.md` 262 lines ยท 68899 bytes Raw Blame History Rendered 1 # GB10 native dependency map (issue #286, cut A) 2 3 Status: source inventory. No builds, no tests, no hardware runs, no GPU access were done to write this. Every row was read from source at the pinned commits below. Claims are tagged OBSERVED (read in source), INFERRED (with confidence) or UNKNOWN. 4 5 ## Plain-English summary 6 7 Today the GPU works on this machine because a Linux program talks to NVIDIA's Linux driver through special device files. Omega's code never touches the chip directly. Everything it does goes through two small layers in the PHYSICS repo, which in turn ask the NVIDIA driver to do the hard work (wake the chip, load firmware, build memory maps, create a work queue, report faults). 8 9 For AIENOS to run the GPU without Linux, three things have to be true: 10 11 1. The part of Omega that makes GPU programs (instruction encoding, work descriptors, constant banks) must keep working. It is mostly plain C with no Linux dependency, so it can be reused. OBSERVED. 12 2. Everything the Linux driver does for me today must be done by AIENOS code instead. That is the long list in section 3. Nothing in the current code does any of it by itself. OBSERVED. 13 3. The pieces of Omega that are tangled up with Linux (a global lock, clocks, memory allocation, sleeping, threads) need a small "platform services" layer so the same code can run on both. OBSERVED that the tangle exists, INFERRED (medium) that a services layer is the right fix. 14 15 The vector engine (`OmegaGpuBackend`) is already a clean seam. The persistent session, the numerical launchers, the resident runtime and the accelerator world are not: they call the driver layer directly. Section 5 says which cut moves each one. Section 6 says what waits on the open execution-order decision and which steps only Drake can do (boots, firmware, chip use under AIENOS). 16 17 ## Pins and how they were checked 18 19 | Item | Value | Status | 20 | --- | --- | --- | 21 | Omega | ``2ae8677c604fb1b9566d27412cff7b0339e5df55`` | checked out, `git rev-parse HEAD` matches | 22 | PHYSICS | ``6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`` | checked out, matches | 23 | Omega `physics.lock` | contains exactly the PHYSICS sha above | OBSERVED, pin confirmed | 24 | AIENOS code | ``fa209e454dda90d933076e5fd1f333731fd9a3c1`` (docs-only ADR 0019 merge ``bf475a08``) | from the issue, not re-read here | 25 26 Line numbers below are at those pins. Omega links look like `omega:src/file.c#Lnn`, PHYSICS links look like `physics:path#Lnn`. Full URL form: `https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/#Lnn` and `https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/#Lnn`. Files under Omega `evidence/` are frozen snapshots of older copies of these sources and are excluded from the inventory (OBSERVED: they hold copies of `omega_gpu_session.c`, `*_api.c` and so on). 27 28 Governance note. The issue calls `aien-spark/aien-architecture#163` "an OPEN Drake decision". OBSERVED: #163 itself is a merged pull request (merged 2026-10-08T02:28Z) that recorded the conflict. The decision is still open per `CURRENT_EXECUTION_PLAN.md` line 720 ("Drake resolves which governs; until then neither is revised"). This document treats the decision as open and does not resolve it. 29 30 ## 1. The Linux driver layer, as it exists 31 32 Two PHYSICS headers define the whole surface. 33 34 | Layer | What it is | Source | 35 | --- | --- | --- | 36 | `Nvrm` / `NvrmMem` and `nvrm_*` | Userspace client of the NVIDIA open kernel module (RM and UVM). `NvrmMem` assumes one address is both the CPU and GPU virtual address. | [nvrm.h:23-28](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L23), [nvrm.h:50-86](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L50), [nvrm.h:88-109](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L88), [nvrm.h:119](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L119) | 37 | `M16NativeContext` and `m16_native_*` | Thin wrapper: embeds one `Nvrm`, one pushbuffer slot, one marker slot, 64 legacy allocation slots. Adds channel creation, method enqueue, doorbell, marker polling. | [m16_native.h:14-19](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_native.h#L14), [m16_native.h:22-52](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_native.h#L22) | 38 39 Both are OBSERVED to need `/dev/nvidiactl`, `/dev/nvidia0` and `/dev/nvidia-uvm` ([nvrm.h:2-7](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L2), [nvrm.c:218-220](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L218)). 40 41 ## 2. Callers, grouped by subsystem 42 43 Counting rule: one row is one source file (or one tight set of files) that names `nvrm_*`, `m16_native_*`, `Nvrm`, `NvrmMem` or `M16NativeContext`. Line lists are the call sites found by grep, not every mention. "Tangled" means the file calls the driver layer directly. 44 45 ### S1. Vector engine (the existing backend seam) 46 47 | # | File | Driver-layer use | Notes | 48 | --- | --- | --- | --- | 49 | 1 | [omega:src/omega_gpu_engine.h#L200](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.h#L200) and [omega_gpu_engine.c#L299](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L299) | none. 15-function `OmegaGpuBackend` table (open_device, create_channel, alloc, copy_in, fill_poison, build, submit, wait_marker, wait_marker2, wait_release_semaphore, barrier, copy_out, diagnostics, free_buf, close). | OBSERVED: contract is driver-free. It uses `stdatomic` and `clock_gettime` only ([engine.c#L84-86](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L84), [#L140](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L140)). The latch `g_blocked` ([#L85](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L85)) implements "uncertain completion refuses all work". | 50 | 2 | [omega:src/omega_blackwell_engine.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L39) | `m16_native_open` [L215](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L215), `m16_native_create_channel` [L229](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L229), `nvrm_alloc_gpu_uncached` [L124](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L124), `nvrm_free` [L132](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L132) [L172](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L172) [L617](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L617), `m16_native_submit_methods` [L496](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L496), `m16_native_wait_marker` [L515](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L515), `m16_native_close` [L630](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L630), `nvrm_mthd` (pure header builder) at 12 sites from [L402](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L402) | The Linux implementation of the table. Backend export at [L655](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L655). Clock: `clock_gettime` [L84](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L84). | 51 | 3 | [omega:src/omega_blackwell_submit.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L7) | `m16_native_open` [L184](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L184) [L435](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L435), `m16_native_create_channel` [L185](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L185) [L436](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L436), `nvrm_alloc_gpu_uncached` at 16 sites [L191-211](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L191) [L440-463](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L440), `m16_native_submit_methods` [L366](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L366) [L608](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L608), `m16_native_wait_marker` [L91](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L91), `m16_native_close` | Older one-shot launch path (per-call open, run, close). Also holds the second copy of the 18-word setup prefix ([L19](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L19)). Tangled. | 52 53 ### S2. Persistent inference session 54 55 | # | File | Driver-layer use | Notes | 56 | --- | --- | --- | --- | 57 | 4 | [omega:src/omega_gpu_session.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L13) and [omega_gpu_session.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.h#L43) | `nvrm_open` [L159](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L159), `m16_native_create_channel` [L160](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L160), `nvrm_close` [L159](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L159), `nvrm_alloc_gpu_uncached` [L91](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L91), `nvrm_free` [L110](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L110), `m16_native_submit_methods` [L277](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L277), `m16_native_wait_marker` [L54](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L54), `nvrm_retire` [L286](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L286), `m16_native_close` [L160](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L160) [L167](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L167) [L191](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L191) | Process-wide singleton `g_s` ([L29](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L29)), global mutex ([L28](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L28)), latch `g_blocked` ([L30](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L30)). Public API takes `NvrmMem*` ([L89](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L89), [L108](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L108)), so the Linux type leaks to every caller. Not behind `OmegaGpuBackend`. | 58 | 5 | [omega:src/omega_gpu_elementwise_api.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_elementwise_api.c#L871), [omega_gpu_matmul_api.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_matmul_api.c#L22), [omega_gpu_attention_api.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_attention_api.c#L495) | No direct `nvrm_*` or `m16_*` calls. Store `NvrmMem` ([elementwise L871](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_elementwise_api.c#L871), [matmul L38,L48](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_matmul_api.c#L38), [attention L495](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_attention_api.c#L495)) and call `omega_gpu_session_*`. | Indirect callers. They also take the session lock macro and use `clock_gettime` ([elementwise L961](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_elementwise_api.c#L961), [matmul L68](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_matmul_api.c#L68), [attention L582](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_attention_api.c#L582)) and `malloc`/`calloc`. Migrate with the session, not alone. | 59 60 ### S3. Numerical launchers (E1 chip paths) 61 62 | # | File | Driver-layer use | Notes | 63 | --- | --- | --- | --- | 64 | 6 | [omega:src/omega_numeric_gb10.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L109) | `m16_native_create_channel` [L109](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L109), `nvrm_alloc` x8 [L112-126](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L112), `nvrm_alloc_gpu_uncached` [L125](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L125), `m16_native_submit_methods` [L291](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L291) | One-shot launcher. Uses cached `nvrm_alloc` for non-polled buffers. | 65 | 7 | [omega:src/omega_numeric_reduce_gb10.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_reduce_gb10.c#L331) | create_channel [L331](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_reduce_gb10.c#L331), `nvrm_alloc` [L333-341](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_reduce_gb10.c#L333), uncached [L342](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_reduce_gb10.c#L342), submit [L473](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_reduce_gb10.c#L473) | same shape | 66 | 8 | [omega:src/omega_numeric_divsqrt_gb10.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_divsqrt_gb10.c#L1523) | create_channel [L1523](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_divsqrt_gb10.c#L1523), `nvrm_alloc` [L1525-1535](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_divsqrt_gb10.c#L1525), uncached [L1534](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_divsqrt_gb10.c#L1534), submit [L1617](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_divsqrt_gb10.c#L1617) | same shape | 67 | 9 | [omega:src/omega_numeric_ldst_gb10.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_ldst_gb10.c#L270) | create_channel [L270](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_ldst_gb10.c#L270), `nvrm_alloc` [L272-279](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_ldst_gb10.c#L272), uncached [L280](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_ldst_gb10.c#L280), submit [L361](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_ldst_gb10.c#L361) | same shape | 68 | 10 | [omega:src/omega_numeric_native.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_native.h#L5) | `m16_native_open` [L19](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_native.h#L19), `m16_native_close` [L26](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_native.h#L26), `m16_native_wait_marker` [L34](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_native.h#L34) | Shared wrappers used by rows 6-9. | 69 70 The `open` for rows 6-9 happens in the tests that call them (see row 21), not in the launcher files. INFERRED (medium): launcher files receive a ready `M16NativeContext*`. 71 72 ### S4. Resident runtime and accelerator world 73 74 | # | File | Driver-layer use | Notes | 75 | --- | --- | --- | --- | 76 | 11 | [omega:src/runtime/rx_resident_gpu.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L12) | `m16_native_open` + `create_channel` [L1041](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L1041), `nvrm_alloc` [L729-733](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L729), `nvrm_alloc_gpu_uncached` [L732](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L732) [L1055](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L1055), `m16_native_submit_methods` [L854](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L854), `nvrm_channel_destroy` [L971](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L971), `nvrm_channel` [L984](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L984), `m16_native_close` | Resident "seat". Heaviest Linux coupling in Omega: pthreads (`pthread_create` [L941](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L941) [L999](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L999) [L1092](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L1092)), CPU affinity and thread names ([L901-907](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L901)), `getenv("RX_SEAT_LEASE_CPU")` [L902](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L902), `usleep` (5 sites, e.g. [L719](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L719)). Recreates the channel at run time ([L971-984](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L971)). | 77 | 12 | [omega:src/omega_accelerator_world.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L110) and [.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.h#L65) | open/create_channel [L154-157](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L154), `nvrm_alloc_gpu_uncached` [L167](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L167) [L175](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L175) [L184](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L184) [L270](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L270) [L376](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L376), `nvrm_free` [L110](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L110) [L122](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L122), `nvrm_channel` / `nvrm_channel_destroy` [L533](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L533) [L527](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L527), `nvrm_enqueue` [L724](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L724), `nvrm_ring` [L753](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L753), `nvrm_retire` [L883](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L883) [L1067](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L1067) [L1303](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L1303), `m16_native_submit_methods` [L1056](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L1056) [L1292](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L1292) | The only Omega code that drives enqueue, ring and retire by hand (split submit). Public structs hold `NvrmMem` ([.h L65,79,84,92](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.h#L65)) and `M16NativeContext` ([.h L146](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.h#L146)). | 78 | 13 | [omega:src/omega_world_gates.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L740) | `nvrm_enqueue` [L740](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L740), `nvrm_retire` [L797](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L797), `nvrm_alloc_gpu_uncached` [L934](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L934), `m16_native_wait_marker_ge` [L2183](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L2183) [L2266](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_world_gates.c#L2266) | Gate code for the world; same split-submit style as row 12. | 79 80 ### S5. FORGE realization and evidence identity 81 82 | # | File | Driver-layer use | Notes | 83 | --- | --- | --- | --- | 84 | 14 | [omega:src/forge_realization.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/forge_realization.c#L37) / [.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/forge_realization.h#L6) | takes `Nvrm *rm` as a parameter ([L37](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/forge_realization.c#L37)); no direct calls found | Type dependency only. | 85 | 15 | [omega:src/omega_evidence.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_evidence.c#L153) / [.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_evidence.h#L26) | reads `Nvrm` fields `compute_class`, `sm_version`, `gpu_uuid` ([L158-161](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_evidence.c#L158)) | Receipts bind hardware identity from a live `Nvrm`. A native backend must supply the same facts from its own source. | 86 | 16 | [omega:src/omega_blackwell_gates.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_gates.c#L1114) | observed-hardware identity from live `Nvrm` ([L1114-1127](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_gates.c#L1114)) | Same dependency as row 15. | 87 | 17 | [physics:forge/forge_realize.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L231) | `nvrm_channel` [L231](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L231), `nvrm_alloc` [L235-240](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L235), `m16_native_build_release` [L255](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L255), `nvrm_enqueue` [L269](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L269), `nvrm_ring` [L275](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L275), `m16_native_wait_marker` [L278](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_realize.c#L278), `nvrm_free` | PHYSICS-side FORGE. | 88 | 18 | [physics:forge/forge_descriptor.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_descriptor.c#L199) | `nvrm_open` [L199](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_descriptor.c#L199), `nvrm_close` [L207](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_descriptor.c#L207) [L219](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_descriptor.c#L219) [L272](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/forge/forge_descriptor.c#L272) | Opens the device to read identity. | 89 90 ### S6. PHYSICS qualification programs, gates and tests 91 92 | # | File | Driver-layer use | Notes | 93 | --- | --- | --- | --- | 94 | 19 | [physics:m16/m16_concurrent.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_concurrent.c#L29), [m16_requalify.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_requalify.c#L44) | open, alloc_memory, create_channel, build_release, enqueue, ring_doorbell, wait_marker, `nvrm_retire`, close | Qualification programs. Linux-only by design. | 95 | 20 | [physics:nvrm/lifecycle_gates.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/lifecycle_gates.c#L193), [submission_visibility_gates.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/submission_visibility_gates.c#L13), [tests/test_forge_seam.c](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/tests/test_forge_seam.c#L105) | exercise `nvrm_open/alloc/free/channel/submit/close`, fault injection fields ([nvrm.h:80-81](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L80)) | Their value is as the Linux reference behavior to preserve (alloc/free accounting, quarantine, GPFIFO full). | 96 97 ### S7. Omega tests, fakes, benches, build scripts 98 99 | # | File | Driver-layer use | Notes | 100 | --- | --- | --- | --- | 101 | 21 | [omega:tests/test_numeric_lifecycle.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/test_numeric_lifecycle.c#L10), [gpu_serving_alloc_count_test.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/gpu_serving_alloc_count_test.c#L43), [numeric_native/other_launcher.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/numeric_native/other_launcher.c), [numeric_native/m16_native.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/numeric_native/m16_native.h) | `m16_native_open/close/wait_marker`, `nvrm_open/close/retire` | Host or chip tests. The `numeric_native` pair is a local stub of the header. | 102 | 22 | [omega:tests/fake_m16_native.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.c#L293) / [.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.h), [test_omega_blackwell_engine.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/test_omega_blackwell_engine.c#L38) | a simulated implementation of the whole `m16_native_*` and needed `nvrm_*` surface ([open L293](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.c#L293), [alloc L322,L350](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.c#L322), [submit L374](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.c#L374), [wait L410](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tests/fake_m16_native.c#L410)) | The existing host-only seam test. Built without any physics `.c` ([omega-gpu-engine.mk:48](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/mk/omega-gpu-engine.mk#L48)). Reusable for cut A contract tests. | 103 | 23 | [omega:bench/prime_race/gb10_native.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/bench/prime_race/gb10_native.c#L108), [tests/gb10_launch_cost.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/bench/prime_race/tests/gb10_launch_cost.c#L82) | declare `NvrmMem` (no named call matched in grep) | Bench code. INFERRED (medium): uses the session API. Not read line by line. | 104 | 24 | [omega:mk/omega-gpu-engine.mk](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/mk/omega-gpu-engine.mk#L30), [src/omega_physics_dir.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_physics_dir.h#L14), [tools/chip_run.sh](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tools/chip_run.sh#L195), [tools/e1_manifest.sh](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tools/e1_manifest.sh#L63), [tools/r16_authpath.sh](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/tools/r16_authpath.sh#L65) | build wiring: include paths `-I$PHYSICS/nvrm -I$PHYSICS/m16`, physics checkout probe for `m16/m16_native.h`, a rule that physical-seat sources (`m16_native.c`, `nvrm.c`) must not appear in a host build | A freestanding target needs its own build rule; the guard in `r16_authpath.sh` is a useful pattern. | 105 106 Totals: 24 rows, 7 subsystem groups (S1 to S7). Direct callers with live driver calls: rows 2, 3, 4, 6 to 13, 17 to 21. Type-only or identity-only dependants: rows 5, 14, 15, 16, 23. 107 108 ## 3. Other Linux-only dependencies in the GPU paths 109 110 | Dependency | Where (OBSERVED) | Why it matters natively | 111 | --- | --- | --- | 112 | open/ioctl/mmap on `/dev/nvidia*` | `open` [nvrm.c:153,162,218-220](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L153); `ioctl` [nvrm.c:58-59](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L58), [#L145](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L145); `mmap` of RM memory [#L177](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L177); reserve of fixed VA with `MAP_FIXED_NOREPLACE` [#L485](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L485); `munmap` [#L507](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L507), [#L596](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L596) | The whole backend. Replaced, not wrapped. | 113 | `ioctl` header types | `nv-ioctl.h`, `uvm_ioctl.h` ([nvrm.c:21-25](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L21)) | Linux driver ABI headers from the pinned open-gpu-kernel-modules tree. Cannot be in the freestanding build. | 114 | pthread mutex | `g_mu` [session.c:28](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L28), lock/unlock [L67-68](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L67) [L187-194](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L187); the three `*_api.c` files take it through `omega_gpu_session_lock()` | Needs a platform lock service. | 115 | pthread threads, affinity, names | [rx_resident_gpu.c:53,67,901-907,941,952,974,999,1092,1116](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L941) | Needs a platform thread or task service, or a redesign. | 116 | `clock_gettime(CLOCK_MONOTONIC)` | [session.c:38](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L38), [m16_native.c:90](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_native.c#L90), [engine.c:140](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L140), [blackwell_engine.c:84](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L84), [blackwell_submit.c:27](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L27), `*_api.c` (see row 5) | Timeouts and latency. Needs a monotonic clock service. The engine already has a test clock hook ([engine.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.h#L242)); the issue forbids that hook in production. | 117 | `usleep(50)` polling | [m16_native.c:105](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_native.c#L105), five sites in [rx_resident_gpu.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L719) | Needs a wait service (sleep, yield or interrupt). | 118 | `malloc`/`calloc`/`free` | [blackwell_submit.c:69,381,619](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L69); matmul and attention APIs (e.g. [matmul L304-504](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_matmul_api.c#L304), [attention L453-918](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_attention_api.c#L453)); numeric launchers ([gb10 L87-89](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_numeric_gb10.c#L87)); [rx_resident_gpu.c:80,1021,1039,1072](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L1021) | Needs a host heap service. CPU memory only. | 119 | `getenv` | `RX_SEAT_LEASE_CPU` [rx_resident_gpu.c:902](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/runtime/rx_resident_gpu.c#L902); `PHYSICS_DIR` [omega_physics_dir.h:28](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_physics_dir.h#L28) | Configuration source. Native needs an explicit config input. | 120 | `fopen`, `realpath` | [blackwell_submit.c:711](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L711), [omega_physics_dir.h:14,33,63](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_physics_dir.h#L14) | File access in launch and build helpers. | 121 | signals | none found in these files | OBSERVED absent (grep for `signal(`, `sigaction`). | 122 | ARM barriers and `yield` | `dsb sy` [session.c:231,284](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L231), [nvrm.c:735,737](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L735); `yield` [session.c:51](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L51) | Inline assembly, portable to bare-metal AArch64. Not Linux-only. | 123 | `stdatomic` | [engine.c:84-85](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L84), session stats | Portable if the freestanding toolchain provides it. UNKNOWN for the AIENOS C toolchain. | 124 | libc string/stdio | `snprintf`, `vsnprintf` for error text ([nvrm.c:50-56](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L50), [session.c:59-65](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L59)) | Needs a freestanding formatter or a diagnostics service. | 125 126 ## 4. Driver responsibility map 127 128 For each duty listed in issue #286 cut A: where today's code gets it, and what the AIENOS-native replacement must provide. "RM" is NVIDIA's resource manager inside the Linux driver. Everything RM does internally is not visible in today's source (OBSERVED: I only see the ioctl call and its parameters). 129 130 | Responsibility | Today (RM/UVM call site) | Native replacement must provide | 131 | --- | --- | --- | 132 | Device and firmware init | `NV01_ROOT_CLIENT` alloc [nvrm.c:223](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L223); card enumeration `NV_ESC_CARD_INFO` [#L235](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L235); `NV01_DEVICE_0` [#L255](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L255); `NV20_SUBDEVICE_0` [#L258](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L258); identity and SM version via `GPU_GET_ID_INFO`, `GR_GET_INFO`, `GPU_GET_GID_INFO` ([#L267-306](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L267)). The driver already initialized the chip and loaded GSP firmware before the process starts. | OBSERVED: today's code does no firmware work at all. Native needs the full bring-up: reset and power state, GSP firmware load and handoff, protocol with GSP, readiness waits, identity and capability queries. This is cut C and is the largest UNKNOWN (see section 8). | 133 | Context creation | Class list query [nvrm.c:267-271](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L267), picks compute, GPFIFO and usermode classes ([#L274-279](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L274)); `KEPLER_CHANNEL_GROUP_A` [#L620](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L620); `FERMI_CONTEXT_SHARE_A` [#L625](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L625); compute object alloc [#L646](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L646) | A context object that owns engine state (graphics/compute context, saved registers) with explicit lifetime. INFERRED (medium): RM sets up compute-engine per-context state (local memory windows, shader memory) inside the compute object alloc, which today's code never sees. | 134 | Address spaces | `NV01_MEMORY_VIRTUAL` [#L262](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L262), `FERMI_VASPACE_A` [#L300](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L300); UVM registration `UVM_INITIALIZE` [#L227](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L227), `UVM_REGISTER_GPU` [#L313](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L313), `UVM_REGISTER_GPU_VASPACE` [#L321](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L321); identical CPU and GPU virtual addresses via a reserved VA slot ([acquire_va_slot #L188](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L188), [va_take #L367](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L367)) | A GPU address space object, separate from the CPU MMU and SMMU services (issue cut D). The same-address design is a Linux/UVM choice ([nvrm.h:25](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L25)); native contracts must carry CPU address and GPU address as distinct values. | 135 | Allocation | `NV01_MEMORY_SYSTEM` alloc [nvrm.c:506](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L506) with explicit cache attribute ([alloc_with_cacheability #L477](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L477), uncached entry [#L473](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L473)); CPU map [#L161-177](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L161); free and live-table checks [#L543](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L543); fixed table sizes 4096 free and 4096 live ([nvrm.h:15-16](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L15)) | A bounded, reclaiming GPU-visible allocator with explicit cache policy per buffer and CPU mapping. The `ck_dma_alloc` bump pool does not qualify (issue). Must keep the uncached rule for host-polled words (hardware manual, `nvos.h` GPU_CACHEABLE comment; OBSERVED in code at [session.c:91](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L91)). | 136 | GPU page tables | Created and edited by UVM/RM inside the kernel: `UVM_CREATE_EXTERNAL_RANGE` [nvrm.c:423](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L423), `NV_ESC_RM_MAP_MEMORY_DMA` [#L435](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L435), `UVM_MAP_EXTERNAL_ALLOCATION` [#L450](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L450); teardown `UVM_FREE` [#L112](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L112), `NV_ESC_RM_UNMAP_MEMORY_DMA` [#L124](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L124) | OBSERVED: today's code never writes a page-table entry; it only asks UVM to map. Native must own the GPU MMU format, page-table memory, TLB invalidation and fault handling. UNKNOWN: exact GB10 format and invalidation protocol from my sources. Evidence of sensitivity: omega#323 recorded a GPU page fault on a page boundary when code was not padded by 2 KB ([omega_gpu_code_alloc.h:1-12](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_code_alloc.h#L1)). | 137 | Channel and queue creation | GPFIFO ring plus USERD in one allocation ([nvrm.c:632-645](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L632)); error notifier allocation [#L632](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L632); `BLACKWELL_CHANNEL_GPFIFO_A` object [#L645](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L645); schedule `NVA06C_CTRL_CMD_GPFIFO_SCHEDULE` [#L670](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L670); destroy [#L677](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L677) | Channel creation including runlist insertion, scheduling enable and disable, and destruction. Own the GPFIFO and USERD layout (OBSERVED: Blackwell USERD documents no GPGet, so consumption is tracked by the caller, [nvrm.c:729-731](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L729)). | 138 | Submit token and doorbell | `GET_WORK_SUBMIT_TOKEN` [nvrm.c:648-649](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L648); usermode object plus 64 KB MMIO map [#L281-285](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L281); GP entry write and GPPut [#L723-737](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L723); doorbell store `*rm->doorbell = rm->token` [#L746](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L746) | A capability-bound doorbell page mapping and the token value for the channel. Native needs to learn the token from the channel it created, not from RM. UNKNOWN how token derivation works without RM. | 139 | Completion | None from the driver. My code writes a marker with a method stream and polls it: release methods ([session.c:271-282](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L271)), `m16_native_wait_marker_ge` poll loop with `usleep(50)` ([m16_native.c:98-109](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/m16/m16_native.c#L98)), plus a second marker after an L2 flush. Entries retired by hand with `nvrm_retire` ([nvrm.c:741](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L741)). | OBSERVED: completion is host polling of GPU-uncached memory, no interrupt used. Native keeps the same marker protocol and needs a wait service (timer plus yield). A timeout latches the session (`g_blocked`, [session.c:280](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L280)); that behavior must carry over. | 140 | Interrupts | None used by my code. | OBSERVED absent. Native may poll only (issue says polling does not count as interrupt support). Needs the GIC/MSI-X/ITS route for any fault or completion interrupt: [gic.c refuses INTIDs >= 1020](https://github.com/aien-dev/aienux/blob/`fa209e454dda90d933076e5fd1f333731fd9a3c1`/native/kernel/arch/gic.c) per the issue. Not re-read here. | 141 | Error reporting | RM error notifier allocated and passed to the channel ([nvrm.c:632,638](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L632)); text errors in `rm->err` ([#L50-56](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L50)); sticky `faulted` flag set at many failure sites (e.g. [#L330](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L330), [#L488](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L488), [#L566](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L566)). Faults on the chip surface through the Linux kernel log (Xid), not through my code. | OBSERVED: nothing in Omega reads the error notifier (no use of `notifier` outside nvrm.c allocation and free). Native needs fault capture, channel-error read-back, and a fail-closed quiescence state. Per issue: after a timeout, do not free memory the GPU can still reach. | 142 | Teardown | Ordered frees in `nvrm_close` ([nvrm.c:755-801](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L755)), channel destroy ([#L677-713](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L677)), `munmap` ([#L596](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L596)); session on-close hooks ([session.c:177-196](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L177)). Process exit closes the file descriptors, so RM reclaims leaks. | Native has no process-exit safety net. It needs explicit revoke and reclaim of channels, mappings, memory and the address space, with known-completion cleanup and uncertain-completion quarantine. | 143 144 ## 5. Reusable pieces versus Linux-only pieces 145 146 ### Reusable (driver-independent) 147 148 | Piece | Source | Why reusable (OBSERVED unless tagged) | 149 | --- | --- | --- | 150 | Blackwell instruction IR, register allocator, encoder | [omega_blackwell_codegen.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_codegen.h#L170) (`omega_bw_ir_*`, `omega_bw_regalloc_solve`, `omega_bw_encode_program`), [.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_codegen.c#L8) | Includes only `stdio`, `stdlib`, `string`, `sha256.h` and a submit header ([codegen.c:1-6](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_codegen.c#L1)). No device calls. Heap (`stdlib`) use is CPU-side. INFERRED (medium) that it builds freestanding once a heap and `snprintf` exist. Note it includes `omega_blackwell_submit.h` (the Linux path header), which must be checked for pulling in `m16_native.h`. UNKNOWN. | 151 | Matmul and attention codegen entry points | [codegen.h:197-232](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_codegen.h#L197) | Pure functions from spec to code bytes. | 152 | QMD builders and invariant check | [omega_blackwell_qmd.h:44-66](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.h#L44), [.c:39-237](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.c#L39) | Only `string.h`. Pure word builders. | 153 | Constant-bank builders | [qmd.c:153-209](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.c#L153) | Pure. But see the caveat below. | 154 | Code buffer sizing (2 KB prefetch tail) | [omega_gpu_code_alloc.h](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_code_alloc.h#L19) | Header only, "no device, no physics headers". | 155 | Engine state machine, latch, job and result types | [omega_gpu_engine.h/.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_engine.c#L299) | Driver-free. Needs only a clock and atomics. | 156 | Method header builder `nvrm_mthd` | [nvrm.h:112-114](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L112) | Static inline arithmetic. Lives in a Linux header today. It should move to a shared encoding header (cut A "factor shared hardware encoding"). | 157 | GP entry encoder `nvrm_gp_entry` | [nvrm.c:715](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L715) | Pure arithmetic; declared in `nvrm.h`. Same move. | 158 | Pushbuffer assembly (launch method stream) | [session.c:232-270](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L232) | Builds words in a local array. Only the submit and wait calls are driver-tied. Today this logic is duplicated across [session.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L22), [blackwell_submit.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L19), [blackwell_engine.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_engine.c#L301), [accelerator_world.c](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_accelerator_world.c#L980) and the numeric launchers. INFERRED (medium): a single shared builder is a precondition for a clean port. | 159 | AIENOS pure BAR/identity decoding | [crates/aienos-accel/src/lib.rs](https://github.com/aien-dev/aienux/blob/`fa209e454dda90d933076e5fd1f333731fd9a3c1`/crates/aienos-accel/src/lib.rs) | Per issue; not re-read here. | 160 161 ### Caveats on "reusable" 162 163 - The constant bank 0 template is "empirically captured from physical Blackwell GB10 compute channel bring-up" ([qmd.c:4-7](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.c#L4), 224 words, [L8](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.c#L8)). It is patched at four word positions with the bank address ([L155-165](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.c#L155)); other words may encode values RM chose for this context. The header marks this class of data `EPISTEMIC_REVERSE_ENGINEERED` ([qmd.h:18](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_qmd.h#L18)). Whether the other words are constant across contexts is UNKNOWN. 164 - The 18-word setup prefix `SETUP_WORDS` ([session.c:22](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L22), [submit.c:19](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_submit.c#L19)) programs compute-class state words. Which of these RM would otherwise have set, and whether a native context needs them, is UNKNOWN. 165 - The QMD takes a `scratch_va` and a semaphore address placed in session scratch ([session.c:214](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_session.c#L214)). Per-context local-memory setup that normally precedes such launches is not visible in today's source. UNKNOWN. 166 167 ### Linux-only 168 169 Everything in `nvrm.c` and `m16_native.c`; the `Nvrm`/`NvrmMem`/`M16NativeContext` types (they embed fds and CPU pointers equal to GPU addresses); the session singleton and its mutex; the resident runtime's threads; `tests/fake_m16_native.c` (a test double of the Linux API, reusable only as a contract-test model). 170 171 ## 6. Caller group to cut table 172 173 Cut letters as in issue #286: A map and freestanding boundary; B native discovery and bounded ownership; C firmware and device lifecycle; D native memory, queue and first compute; E follow-on (separately tracked). A row can be touched by more than one cut; the "migrates in" column names the cut that changes the caller itself. Entries are INFERRED (medium) from the issue text, since the issue does not assign callers. 174 175 | Caller group (rows) | Migrates in | Why | 176 | --- | --- | --- | 177 | S1 vector engine contract (row 1) | A | Already driver-free; A extends it (platform services, versioning, refusal of unsupported operations). | 178 | S1 Blackwell engine backend (row 2) | A (Linux side kept private), D (native backend written beside it) | The first compute target is the integer vector add through this contract. | 179 | S1 legacy submit path (row 3) | A (dedupe encoding), no native port | Duplicate of the engine path. INFERRED (low): retire or keep as Linux reference. | 180 | S2 persistent session (row 4) | E (port); A (platform services, hide `NvrmMem`) | Issue says the session is not freestanding yet and is not part of first compute. | 181 | S2 elementwise, matmul, attention APIs (row 5) | E | Follow the session. | 182 | S3 numeric launchers (rows 6 to 10) | E | Issue excludes broad kernels from the first milestone. | 183 | S4 resident runtime (row 11) | E (late) | Threads, runtime channel recreation, polling; not needed for first compute. | 184 | S4 accelerator world and world gates (rows 12, 13) | E (late) | Hand-driven split submit. | 185 | S5 evidence and identity (rows 14 to 16) | A (define a hardware-identity record both backends fill), C (native source of identity) | Receipts must bind firmware identity (issue acceptance). | 186 | S5 FORGE realization (rows 17, 18) | E | PHYSICS-side, Linux-only. | 187 | S6 PHYSICS qualification and gate programs (rows 19, 20) | none migrate; they remain the Linux reference | Issue: preserve the Linux backend as reference. | 188 | S7 tests, fakes, benches, build scripts (rows 21 to 24) | A (contract tests over the fake; freestanding link target and its build rule), D (native receipts) | Issue: freestanding link target and contract tests before device init. | 189 | New code with no current caller: PCI multi-segment discovery, capability-bound MMIO/DMA/IRQ | B | No current Omega caller. | 190 | New code: GSP firmware transport and bring-up | C | No current caller. RM does it today. | 191 | New code: GPU page tables, allocator, channel, doorbell, completion | D | Replaces rows 4/12 usage of `nvrm_*` for the first-compute subset only. | 192 193 No whole-project independence claim follows from migrating any one row (issue requirement). After cut D only the vector-add path would be native. 194 195 ## 7. Order dependencies 196 197 Sources: `CURRENT_EXECUTION_PLAN.md` line 720 and NEXT-PHASE-3 (lines 791 to 800) in aien-architecture; issue #286 text; issue #285. 198 199 Two orders exist for native AIENOS. Order 1 (older): M5 trust, M6 network, M7 inference, M8 persistent agent. Order 2 (NEXT-PHASE-3, newer): operator input, boot selection and rollback, PCI discovery, real-device storage, owner identity and trust, native inference, then GPU later. Both place GPU after native CPU inference (OBSERVED in the plan; the plan states Campaign 3 lists "later GPU"). The plan recommends Order 2 but records that Drake decides. 200 201 ### Can proceed now (host-only, no physical device, no kernel-order commitment) 202 203 - Cut A in full: this map, the platform-services contract, hiding `NvrmMem` behind typed handles, moving `nvrm_mthd` and `nvrm_gp_entry` into a shared encoding header, a freestanding link target for the codegen, QMD and engine files, backend contract tests over the existing fake. INFERRED (high): no kernel or hardware change. 204 - B host fixtures: multi-segment MCFG parsing tests, fake config-space access that fails on any write, GPU identity fixture on a nonzero segment, malformed and overlapping entry tests. These are pure parsing and fixtures. The issue already authorizes "Host-only interface, parser, fixture, and refusal work". 205 - C host work: inventory of firmware and protocol sources, parsers and refusal tests for firmware metadata. No loading. DONE 2026-10-12: docs/GB10_FIRMWARE_INVENTORY.md and native/kernel/tools/ck_gsp_fw_inspect.c (`make -C native/kernel gsp-fw-inspect-test`); the next host-only steps and the remaining unknowns are listed there (sections 7 and 8). 206 - D host work: simulated-device tests for allocator, address-space bookkeeping and refusal paths, using no real GPU. 207 208 ### Cannot start until #163's decision is made, or needs coordination first 209 210 These items change shared kernel code or occupy a place in the native sequence, so scheduling them depends on which order governs. INFERRED (medium); the plan does not list per-step dependencies, so this is my reading. 211 212 | Cut and step | Why it waits | 213 | --- | --- | 214 | B: wiring multi-segment discovery into the boot path, or changing `pci_enumerate` / `pci_stage_probe` | Order 2 puts PCI discovery right after boot selection; Order 1 does not schedule PCI before M7. The first PR (aienos#287) only adds new read-only functions and host tests and leaves the boot path unchanged; the coordinator confirmed on 2026-10-08 that no other lane owns `pci.c`. | 215 | B: capability-bound MMIO, DMA and interrupt resources in the kernel | Touches IPC/capability code and `ck_mmio_map`, which trust and physical-memory-authority work also rely on. Order matters for what exists first. | 216 | B: IORT/SMMU audit and extension for a second SMMU, GIC/ITS work for an interrupt route | Same shared kernel areas; storage and input lanes use them. | 217 | B: QEMU gates for the above | Gate numbering and CI are shared. | 218 | C: all implementation beyond host parsers | Requires physical bring-up prerequisites (see below). | 219 | D: any kernel-side allocator or queue code merged to main | Depends on the B resources and on #285 when it reuses domain-1 numbers. | 220 | E: all | Follows first compute. | 221 222 ### Operator steps (Drake only, not planned work) 223 224 Each of these needs Drake and the existing attended-hardware, quiet-window and recovery procedures. None are authorized by this document or by the issue. 225 226 - OPERATOR STEP: boot AIENOS on the physical Spark (any native boot with the GB10 visible). 227 - OPERATOR STEP: any firmware load or GSP handoff on real hardware. 228 - OPERATOR STEP: any GPU use under native AIENOS, including the first vector-add run and repeated runs. 229 - OPERATOR STEP: a cold or warm start from a documented power/reset state without prior Linux GPU driver initialization (cut C proof). 230 - OPERATOR STEP: device reset or power cycle to test recovery. 231 - OPERATOR STEP: Secure Boot, boot menu or recovery-stick actions if a native image must be booted. 232 233 Per the issue, these also wait on: native input and recovery, boot rollback, physical memory authority, and the relevant storage and trust dependencies. INFERRED (high) that the physical GB10 DMA/translation question (is the GPU behind the SMMU window?) must be answered before C or D can run with confinement. 234 235 ### Issue #285 trigger 236 237 OBSERVED in #285: the first change that lets a domain-1 kernel resource number (kind 2 or 3: kernel channel or object) be destroyed and reissued at run time, or persists one across reboot or rollback, must implement the per-resource incarnation counter in the same change. Until then `gen_lookup` has no real counter and nonzero `required_generation` is refused. 238 239 Where it may bite here. A GPU channel is the likely domain-1 kernel channel (INFERRED, medium) and cut D must "destroy and reopen" it (issue acceptance: normal teardown/reopen, repeated runs). If the native channel is released and its number reissued, the counter must ship in that cut. If cut D keeps one channel number per boot and never reuses it, the trigger does not fire. UNKNOWN: which GPU-private allocations map to domain 1 (the issue says to define this mapping explicitly; no such mapping exists in the files read here). The counter must not be equated with handle-slot generations or Omega world epochs (#285 text). 240 241 ## 8. Known unknowns 242 243 1. PARTLY RESOLVED 2026-10-12 (docs/GB10_FIRMWARE_INVENTORY.md): the blobs, versions, digests, the SEC2-boots-GSP-FMC path on GB10B and the licence limits are now inventoried from the public driver source at tag 580.173.02; what is public: everything the host hands to the chip. Still UNKNOWN: the COT payload and WPR-meta layouts, SEC2 preconditions at AIENOS entry, and the mandatory RPC subset (inventory section 8). Today's source contains none of it (RM does it, [nvrm.c:223](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.c#L223)). Still blocks the machine-side part of cut C. 244 2. UNKNOWN: GPU MMU page-table format, TLB invalidation and fault-reporting registers on GB10, as implemented by the pinned driver. Today's code only requests mappings. 245 3. UNKNOWN: how the work-submit token is derived and the channel is made runnable without RM (`GET_WORK_SUBMIT_TOKEN`, `GPFIFO_SCHEDULE`). 246 4. UNKNOWN: which words of the captured constant bank 0 template and the 18-word setup prefix are context-independent versus values RM chose. Needed before a native context can reuse the Omega QMD and cbank builders. 247 5. UNKNOWN: the per-context compute engine state RM initializes during compute-object allocation (local memory, shader memory windows). 248 6. UNKNOWN: whether GPU memory traffic on GB10 passes through the AIENOS-confinable SMMU window or uses another path (the issue flags this; [GB10_PLATFORM_TOPOLOGY.md](https://github.com/aien-dev/aienux/blob/`fa209e454dda90d933076e5fd1f333731fd9a3c1`/docs/GB10_PLATFORM_TOPOLOGY.md) not re-read here). 249 7. UNKNOWN: whether the GPU interrupt route (MSI-X/ITS/LPI) is required for correctness or only for efficiency, given the current code is polling only. 250 8. RESOLVED for the host build, 2026-10-16 (omega [`docs/numeric/OMEGA_GPU_NATIVE_BOUNDARY.md`](https://github.com/aien-spark/omega/blob/`278b6c3c5840e5f13472a2f60f50542d81c3821e`/docs/numeric/OMEGA_GPU_NATIVE_BOUNDARY.md), cut A.2, omega#419): `omega_blackwell_codegen.c` and `omega_blackwell_matmul.c` are in the `-ffreestanding -fno-builtin` closure, and `make test-codegen-freestanding` finds the instruction streams of 14 fixture kernels byte-identical between the hosted and the freestanding build. That is host evidence only: a link inside the AIENOS kernel image and any device run remain NOT_RUN. Original entry: UNKNOWN whether the codegen files link freestanding; `omega_blackwell_codegen.c` includes `omega_blackwell_submit.h` ([L2](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_blackwell_codegen.c#L2)). 251 9. UNKNOWN: the AIENOS C toolchain's support for `stdatomic.h`, 64-bit atomics and inline AArch64 assembly in the freestanding target. 252 10. UNKNOWN: contents and Linux dependence of the bench files (row 23) and of every tool script beyond the lines cited. Not read in full. 253 11. UNKNOWN: the AIENOS-side current state. The AIENOS rows in this document repeat the issue's findings at ``fa209e45``; they were not re-read here. 254 12. UNKNOWN: relationship of Xid 31 fault in omega#323 (padded code fix) to a native page-fault handler. The padding cause is INFERRED in the source comment itself ([omega_gpu_code_alloc.h:8-10](https://github.com/aien-spark/omega/blob/`2ae8677c604fb1b9566d27412cff7b0339e5df55`/src/omega_gpu_code_alloc.h#L8)). 255 13. UNKNOWN: whether the 4096-entry fixed tables in `Nvrm` ([nvrm.h:15-16](https://github.com/aien-spark/physics/blob/`6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf`/nvrm/nvrm.h#L15)) are the right bound for a native allocator. 256 257 ## 9. Scope and limits of this document 258 259 - Source inventory only. No build, test, hardware access or qualification run was performed, and none is claimed. 260 - Counts come from `grep` over the pinned trees at the listed paths. A caller that reaches the driver layer through a path not matched by these patterns could be missing. Evidence snapshot directories were excluded on purpose. 261 - The caller-to-cut table and the order dependency table are INFERRED. They are a proposal for review, not a decision. 262 - This document does not resolve aien-architecture#163 and does not authorize any boot, firmware change, reset or chip use.