interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / GB10_NATIVE_ACCELERATOR_BOUNDARY.md

123 lines · 5017 bytes Raw Blame History Rendered
1# GB10 native accelerator boundary
2
3This document freezes the layering a future native GB10 driver must fit into.
4It does not design the driver. It defines the boundary so that GPU work can be
5built against a capability-bound contract instead of ambient hardware access.
6
7Governing: issue [#36](https://github.com/aien-dev/aienux/issues/36),
8[GB10_HARDWARE_PROFILE.md](GB10_HARDWARE_PROFILE.md),
9[GB10_PLATFORM_TOPOLOGY.md](GB10_PLATFORM_TOPOLOGY.md),
10[ARCHITECTURE.md](ARCHITECTURE.md).
11
12## Frozen layering
13
14```
15PCI/ACPI discovery
16 |
17 v
18device identity/profile
19 |
20 v
21kernel MMIO mapping authority
22 |
23 v
24SMMU/DMA authority
25 |
26 v
27interrupt resource
28 |
29 v
30GB10 device lifecycle
31 |
32 v
33GSP transport [FUTURE]
34 |
35 v
36GPU memory manager [FUTURE]
37 |
38 v
39channel/queue submit [FUTURE]
40 |
41 v
42compute execution [FUTURE]
43```
44
45The upper six layers are the subject of this characterization phase and the
46milestone that follows it. The lower four are marked future and must not be
47claimed until each has hardware evidence.
48
49## The key contract
50
51`aienos-accel` must never obtain ambient physical-memory or DMA authority.
52
53Today `aienos-accel` is pure decoding: it turns byte slices into typed facts
54and validates the GB10 contract. That property is permanent. When accelerator
55code eventually needs MMIO, interrupts, or DMA, it receives them as explicit
56capabilities granted through AEGIS, exactly like every other AIENOS physical
57resource. There is to be no global "map physical memory" call, no
58`/dev/mem`-style escape, and no untyped physical address that a device driver
59can dereference on its own.
60
61Concretely:
62
63- Discovery produces a `Gb10Profile`, not a mapped pointer. The profile is
64 immutable facts.
65- Mapping MMIO is a separate, capability-gated kernel service. The discovery
66 layer cannot map.
67- DMA is a separate, capability-gated SMMU service. A device cannot DMA until
68 AIENOS programs its stream table entry.
69- An interrupt line or MSI-X vector is an interrupt capability, distinct from
70 the MMIO capability that contains the MSI-X table.
71
72## Required future capabilities
73
74These are described conceptually so the eventual implementation has a target.
75Only the generic capability substrate, if it already exists, is reused; none of
76these accelerator capabilities is implemented in this phase.
77
78| Capability | Grants | Does not grant |
79| --- | --- | --- |
80| Accelerator MMIO region | read/write of a bounded BAR window | DMA, interrupts, execution |
81| Accelerator interrupt | receive one device interrupt or vector | MMIO, DMA |
82| Accelerator DMA domain | participate in an SMMU translation context | MMIO, execution |
83| Firmware object | load a named, verified firmware image | MMIO, DMA, execution |
84| Compute queue | create and submit a queue | authority over other queues |
85
86Each is resource-specific and revocable. A compute queue capability without a
87DMA domain cannot move data. A DMA domain without an MMIO region cannot be
88programmed. Composition is explicit.
89
90## Layer responsibilities
91
92- **PCI/ACPI discovery.** Enumerate firmware-declared ECAM ranges, find the
93 GB10 by property, decode identity and capabilities. No side effects. This is
94 implemented in `aienos-accel` (pure) and, later, a native enumerator.
95- **device identity/profile.** `Gb10Profile` with provenance. Read only.
96- **kernel MMIO mapping authority.** Create a bounded mapping for a granted
97 accelerator MMIO region. The mapping is the only path to device registers.
98- **SMMU/DMA authority.** Program the GB10 stream table entry under a granted
99 DMA domain. No bypass mode.
100- **interrupt resource.** Bind the MSI-X vector or legacy interrupt through the
101 GIC/ITS to the owner. Distinct capability.
102- **GB10 device lifecycle.** Reset, power, and firmware-load state machine
103 under operator and AEGIS policy. This is the first layer that mutates the
104 device, and it requires a later milestone.
105- **GSP transport (future).** The command/RPC channel to GSP. Requires the
106 lifecycle layer and the firmware object.
107- **GPU memory manager (future).** VRAM allocation and mappings. Requires the
108 DMA domain.
109- **channel/queue submit (future).** Requires the compute queue capability.
110- **compute execution (future).** Requires the queue and memory manager.
111
112## Safety boundary for this phase
113
114This characterization phase stops at layer two. It does not initialize the
115GPU, communicate with GSP, submit commands, allocate GPU memory, execute
116kernels, or perform inference. It does not write PCI configuration space,
117change command bits, resize BARs, reset the GPU, perform FLR, rebind the
118NVIDIA driver, change power state, write BAR/MMIO registers, access `/dev/mem`,
119issue GSP RPC, load alternate firmware, create GPU channels, or map GPU
120memory.
121
122The step from layer two to layer three is the next device-ownership milestone
123and needs its own authorization, evidence, and rollback plan.