interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / milestone-15-spec.md

551 lines · 35381 bytes Raw Blame History Rendered
1# Specification: Milestone 15 — Physics Accelerator Link (`PHYSICS_ACCELERATOR_LINK`)
2
3```text
4Document ID: SPEC-PHYSICS-M15
5Milestone: Milestone 15 (PHYSICS_ACCELERATOR_LINK)
6Classification: Sovereign Machine Canonical Specification
7Target Substrate: Bounded Coherent Memory Interface, SMMUv3 DMA Sandboxing & Accelerator Authority
8Status: COMPLETE / HARDWARE BOUNDARY QUALIFIED
9Lineage: SILICON -> ATLAS (M1) -> PHYSICS (M2/M3/M15) -> OMEGA (M4-M14) -> AIEN
10```
11
12---
13
14## 1. Executive Summary & Foundational Doctrine
15
16Milestone 14 completed the CPU realization synthesis pipeline (`OMEGA_REALIZATION_SYNTHESIS`, $G_S \times G_M \to G_R$), synthesizing verified, multi-issue native AArch64 machine code directly onto physical execution pipelines without foreign compilers or static lowering heuristics.
17
18Milestone 15 establishes the **Physics Accelerator Link** (`PHYSICS_ACCELERATOR_LINK`), opening Phase C (Accelerator Cognition Substrate). It expands the sovereign machine's computational reach to high-throughput hardware accelerators (specifically NVIDIA Blackwell architectures on DGX Spark) while maintaining strict physical authority, hardware sandboxing, and mathematical determinism:
19
20> **PHYSICS GAINS BOUNDED ACCELERATOR AUTHORITY. OMEGA CANNOT OWN ACCELERATOR AUTHORITY. OMEGA ASKS; PHYSICS AUTHORIZES.**
21
22### Canonical Boundary Principle
23```text
24M15 ESTABLISHES WHO MAY TOUCH THE ACCELERATOR.
25M16 DISCOVERS HOW THE ACCELERATOR IS ACTUALLY COMMANDED.
26```
27
28### Milestone 15 Exit Condition
29> Physics has an accelerator authority model grounded in empirically observed DGX Spark device, memory, and IOMMU topology. OMEGA cannot directly exercise accelerator authority and must formulate bounded intents through Physics. Native Blackwell submission mechanics remain deliberately outside M15 and are the subject of M16.
30
31### Explicit Scope Boundary: What M15 Does NOT Claim
32Milestone 15 explicitly does not claim:
33- Known Blackwell command packet format
34- Known native submission queue format
35- Known BAR0 doorbell register semantics
36- Direct sovereign SMMUv3 hardware takeover
37- Native Blackwell work submission
38- Native completion handling
39- Native device reset
40
41All native submission mechanics, channel structures, work descriptor formats, and doorbell discoveries belong strictly to **Milestone 16 (`BLACKWELL_NATIVE_PATH_KNOWN`)** or subsequent bare-metal Physics takeover work. M15 establishes the trusted authority and topology foundation upon which M16 builds.
42
43In conventional architectures, GPU drivers operate with sprawling ambient authority: multi-gigabyte kernel drivers, closed-source firmware blobs, opaque direct memory access (DMA), unchecked command ring submissions, and unpredictable out-of-band interrupts. A single malformed GPU command or kernel bug can crash the entire host operating system or corrupt host memory via rogue DMA writes.
44
45In the Sovereign Machine, accelerators are not permitted ambient authority:
46- **PHYSICS** is the sole physical authority of the Sovereign Machine. It owns hardware discovery, physical DRAM carving, SMMUv3 translation tables, command ring allocations, MMIO doorbell writes, fault trapping, device reset, and cryptographic effect receipts.
47- **OMEGA** cannot own accelerator authority, cannot access raw device registers, and cannot directly ring MMIO doorbells. Omega acts as an unprivileged client requesting accelerator resources: Omega formulates structured intents, submits them to the Physics Effect Broker, and receives verified, cryptographically sealed effect receipts.
48
49Milestone 15 defines and qualifies this boundary: establishing explicit memory boundaries for coherent CPU-accelerator memory, SMMUv3 stage 1 DMA sandboxing, command queue authority, doorbell mediation, fail-closed fault handling, non-disruptive device reset, and rolling SHA-256 effect receipts.
50
51---
52
53## 2. Core Doctrine & Invariants
54
55As mandated by canonical roadmap doctrine (`DOCTRINE-ROADMAP`) and sovereign machine architecture (`DOCTRINE-SOVEREIGNTY`), the Physics Accelerator Link enforces seven foundational invariants:
56
571. **Bounded Accelerator Authority**:
58 Accelerator operations require valid capability tokens (`RES_ACCELERATOR`, resource type `0x00000005`) governed by monotonic attenuation. Callers never hold raw device registers or unmediated physical addresses; authority is held exclusively via typed `CapabilityId { slot, generation }`. Any operation lacking a valid, unrevoked capability token or attempting operations beyond granted permission bits is rejected fail-closed.
59
602. **SMMUv3 DMA Sandboxing & IOVA Confinement**:
61 The accelerator Input/Output Virtual Address (IOVA) space is strictly translated via ARM SMMUv3 stage 1 translation tables managed exclusively by Physics. Any DMA access outside granted physical frames is trapped fail-closed via SMMUv3 translation faults (`F_TRANSLATION`) or permission faults (`F_PERMISSION`), instantly revoking the offending capability without corrupting host state.
62
633. **Coherent Unified Memory Semantics**:
64 On NVIDIA DGX Spark (Grace Blackwell), CPU and GPU share a single physical LPDDR5x DRAM envelope `[0x80000000, 0x2080000000)` (128 GiB). Accelerator-visible memory windows are carved explicitly by Physics from unreserved DRAM frames. Ambiguous, overlapping, or unverified memory mappings are strictly prohibited. Physics kernel memory and private data structures are permanently unmapped and inaccessible to accelerator DMA.
65
664. **Queue Authority & Doorbell Mediation**:
67 Command submission rings and MMIO doorbells are allocated and bounded by Physics. Ring buffers have fixed lengths, circular wrapping validation, and exclusive head/tail pointer governance. Omega submits validated command packets to Physics; Physics verifies memory bounds, writes the command packet to the hardware submission ring, issues memory synchronization barriers, and mediates the MMIO doorbell write.
68
695. **Fault Confinement & Non-Disruptive Reset**:
70 Hardware timeouts, invalid command descriptors, MMIO bus faults, and SMMUv3 translation faults trigger immediate queue revocation and device isolation. Physics executes a clean hardware reset sequence without crashing the host CPU, corrupting host memory, or disrupting non-faulting subsystems.
71
726. **Cryptographic Effect Receipts**:
73 Every accelerator operation—whether admitted and executed or rejected at any gate—emits an immutable 192-byte `EffectReceipt` committed to the rolling SHA-256 seal chain. Every receipt records device state, intent digest, actual effect, hardware measurement, and rolling previous receipt hash.
74
757. **Zero Foreign Toolchain**:
76 0 LLVM, 0 GNU as, 0 GCC inline asm, 0 JIT, 0 Python. All translation tables, ring buffers, MMIO register interactions, and cryptographic receipts are constructed via native sovereign byte structures and direct AArch64 machine routines without invoking external toolchains or proprietary vendor runtimes.
77
78---
79
80## 3. Accelerator Link Architecture & Substrate Design
81
82### 3.1 Sovereign Substrate Topology (DGX Spark Grace-Blackwell)
83
84```text
85+-------------------------------------------------------------------------------+
86| PHYSICS ACCELERATOR LINK TOPOLOGY |
87+-------------------------------------------------------------------------------+
88| |
89| +-----------------------+ +--------------------------+ |
90| | ARM Neoverse V2 | | NVIDIA Blackwell GPU | |
91| | Host CPU (Grace) | | Compute Engine | |
92| +-----------┬-----------+ +------------┬-------------+ |
93| │ │ |
94| │ │ |
95| ▼ ▼ |
96| [ CPU MMU (EL1/EL2) ] [ ARM SMMUv3 (Stage 1) ] |
97| │ │ |
98| │ NVLink-C2C Coherent Interconnect │ |
99| └─────────────────────┬───────────────────────┘ |
100| │ |
101| ▼ |
102| +-----------------------------------------------------------------------+ |
103| | PHYSICAL LPDDR5x DRAM [0x80000000, 0x2080000000) | |
104| | | |
105| | 0x80000000 ┌──────────────────────────────────────┐ | |
106| | │ Physics Kernel & Authority Ledger │ (Hidden from SMMU) |
107| | ├──────────────────────────────────────┤ | |
108| | │ Free Host Physical Frames │ | |
109| | ├──────────────────────────────────────┤ | |
110| | │ Bounded Accelerator DMA Window #0 │ (IOVA Mapped) | |
111| | ├──────────────────────────────────────┤ | |
112| | │ Command Submission Ring Buffer │ (Coherent Queue) | |
113| | ├──────────────────────────────────────┤ | |
114| | │ Bounded Accelerator DMA Window #1 │ (IOVA Mapped) | |
115| | 0x2080000000 └────────────────────────────────────┘ | |
116| +-----------------------------------------------------------------------+ |
117+-------------------------------------------------------------------------------+
118```
119
120### 3.2 Subsystem Ownership Boundaries
121
122To maintain absolute epistemic integrity, Milestone 15 explicitly records active subsystem ownership between the host Linux kernel device stack and Sovereign Physics:
123
124| Subsystem | Current Live Owner | Physics Status | Transfer to Sovereign Physics |
125| :--- | :--- | :--- | :--- |
126| **SMMUv3 Hardware Programming** | Linux kernel (`arm_smmu_v3`) / active device stack | Stage 1 policy model implemented; native hardware takeover not yet performed | Future milestone / bare-metal isolated environment |
127| **Device Address / IOVA Mappings** | Linux kernel (`dma-iommu` / `uvm`) | Stage 1 window translation & permission bounds implemented; hardware page-table walk not taken over | Future milestone / bare-metal isolated environment |
128| **GPU BAR Mappings** | Linux kernel PCI subsystem & `nvidia.ko` (`0x24000000-0x27ffffff`) | Aperture bounds observed; direct userspace mmap restricted by `CONFIG_IO_STRICT_DEVMEM` | M16 (Blackwell native submission characterization) |
129| **GPU Submission Queues** | `nvidia.ko` / user channel pushbuffers | Circular ring queue authority model implemented; native Blackwell channel format unknown | M16 (empirical discovery of command packet & queue structure) |
130| **GPU Completion Handling** | `nvidia.ko` interrupt handler & semaphores | Completion receipt model implemented; native Blackwell completion protocol unknown | M16 (empirical discovery of completion signaling & fences) |
131| **Device Reset** | Linux kernel PCI core / GPU driver reset handler | Monotonic device state machine implemented; raw control register reset not executed to preserve running host | Future milestone / bare-metal isolated environment |
132
133### 3.3 SMMUv3 DMA Sandboxing & IOVA Translation
134
135The ARM SMMUv3 (System Memory Management Unit version 3) enforces hardware-level isolation between the accelerator's bus-mastering transactions and physical host memory:
136
1371. **Stream Table Entries (STE)**:
138 - Stream Table base is strictly aligned to a 256 KiB boundary.
139 - Stream ID `0x0100` (256 decimal, mapped via ACPI IORT Node 29 for PCI segment 15 BDF 01:00.0) maps to a dedicated 64-byte STE.
140 - STE is configured for Stage 1 translation enabled (`Config = 0b101`), linear stream format (`S1Fmt = 0b00`), pointing to a dedicated Context Descriptor table (`CTXPTR`).
141
1422. **Context Descriptor (CD)**:
143 - Occupies 64 bytes with 64-bit alignment:
144 - `CD[0]`: Control word defining `T0SZ = 16` (48-bit IOVA space), `TG0 = 0b00` (4 KiB granule), `IRGN0 = 0b01` (Inner Write-Back Cacheable), `ORGN0 = 0b01` (Outer Write-Back Cacheable), `SH0 = 0b11` (Inner Shareable), `EPD0 = 0` (TTBR0 walk enabled), `EPD1 = 1` (TTBR1 walk disabled), `V = 1` (Valid), `IPS = 0b010` (40-bit / 44-bit Physical Address space), `AA64 = 1` (AArch64 translation table format), `ASID = 1`.
145 - `CD[1]`: `TTBR0` (Physical Base Address of Stage 1 Translation Table Level 0/1).
146 - `CD[2]`: `TTBR1` (Unused, disabled via `EPD1`).
147 - `CD[3]`: `MAIR` (Memory Attribute Indirection Register, configuring Normal Inner/Outer Write-Back Cacheable memory and Device MMIO attributes).
148
1493. **Stage 1 Page Tables**:
150 - 4 KiB granule size with 4-level translation walk.
151 - Only physical frames explicitly granted via `DmaWindowDescriptor` have valid page table entries.
152 - Any transaction targeting an address without a valid translation entry triggers an `F_TRANSLATION` fault. Any transaction violating permission bits (e.g., write to read-only frame) triggers an `F_PERMISSION` fault.
153
1544. **Event Queue & Fault Confinement**:
155 - SMMUv3 Event Queue records all fault syndromes with Stream ID, IOVA, and fault class.
156 - Faults generate synchronous or polled notifications to Physics, which immediately freezes the stream, revokes the associated capability, records the fault in the effect receipt ledger, and initiates non-disruptive device recovery.
157
158### 3.4 Command Queue Authority & Doorbell Mediation
159
160Command submission is strictly mediated through Physics to prevent untrusted callers from commanding the accelerator hardware directly:
161
162```text
163+---------------+ +--------------------+ +------------------+
164| OMEGA | | PHYSICS | | BLACKWELL |
165| (Client Mode) | | (Authority Mode) | | ACCELERATOR |
166+-------┬-------+ +---------┬----------+ +--------┬---------+
167 │ │ │
168 │ 1. Populate Work Descriptors │ │
169 │ inside granted DMA window │ │
170 │ │ │
171 │ 2. Submit EffectIntent │ │
172 │ (ACCEL_OP_SUBMIT, cap_id) │ │
173 ├──────────────────────────────────►│ │
174 │ │ 3. Validate Capability & Bounds │
175 │ │ Verify IOVA containment │
176 │ │ │
177 │ │ 4. Copy to Hardware Ring Buffer │
178 │ │ Update Tail Pointer (modulo) │
179 │ │ Emit Memory Barrier (DSB SY) │
180 │ │ │
181 │ │ 5. Ring MMIO Doorbell Register │
182 │ ├────────────────────────────────────►│
183 │ │ │ 6. Fetch & Exec
184 │ │ 7. Commit EffectReceipt to Ledger │ Work Packets
185 │ 8. Receive EffectReceipt (192B) │ Roll SHA-256 Seal Chain │ via DMA
186 │◄──────────────────────────────────┤ │
187 │ │ │
188```
189
190- **Ring Buffer Geometry**: Ring buffer memory is allocated exclusively by Physics in coherent host DRAM. Maximum in-flight command slots are fixed (e.g., 64 slots of 128 bytes).
191- **Doorbell Protection**: MMIO doorbell physical pages are strictly excluded from Omega's virtual address mappings. Only Physics possesses authority to issue write transactions to the hardware doorbell registers.
192
193### 3.4 Device Lifecycle State Machine
194
195```mermaid
196stateDiagram-v2
197 [*] --> UNINITIALIZED
198 UNINITIALIZED --> PROBED: physics_accel_probe()
199 PROBED --> CONFIGURED: physics_accel_configure_smmu()
200 CONFIGURED --> ACTIVE: physics_accel_activate()
201 ACTIVE --> ACTIVE: Valid Submission / Sync
202 ACTIVE --> FAULTED: Hardware Timeout / SMMU Fault
203 FAULTED --> RESETTING: physics_accel_reset()
204 RESETTING --> RECOVERED: Reset Verification Pass
205 RECOVERED --> CONFIGURED: Stream Table Re-initialized
206 FAULTED --> UNINITIALIZED: Non-Recoverable Hardware Panic
207```
208
209- **Monotonic Transitions**: State transitions are strictly monotonic and checked. Invalid state transitions (such as attempting command submission from `CONFIGURED` or `FAULTED` states) fail closed immediately with a rejected effect receipt.
210- **Non-Disruptive Reset Sequence**:
211 1. Freeze SMMUv3 Stream (set STE `Config = 0b000` or disable translation bypass).
212 2. Invalidate SMMUv3 cached configuration and TLBs (`CMD_CFGI_STE`, `CMD_TLBI_NH_ALL`).
213 3. Assert hardware engine reset via accelerator control MMIO register.
214 4. Poll reset completion register until idle flag is asserted or timeout expires.
215 5. Reset command ring head and tail pointers to 0.
216 6. Re-enable SMMUv3 Stream with fresh context descriptors.
217 7. Transition device state to `RECOVERED`, then `CONFIGURED`.
218
219---
220
221## 4. Data Model & C API Declarations
222
223```c
224#ifndef PHYSICS_ACCEL_LINK_H
225#define PHYSICS_ACCEL_LINK_H
226
227#include <stdbool.h>
228#include <stddef.h>
229#include <stdint.h>
230
231#define PHYSICS_ACCEL_LINK_VERSION 0x00010000
232#define PHYSICS_ACCEL_MAX_WINDOWS 16
233#define PHYSICS_ACCEL_MAX_QUEUES 4
234#define PHYSICS_ACCEL_RING_SLOTS 64
235#define PHYSICS_ACCEL_SLOT_SIZE_BYTES 128
236
237/* Resource Type for Accelerator Capability */
238#define RES_ACCELERATOR 0x00000005
239
240/* Accelerator Operation Bitmasks */
241#define ACCEL_OP_PROBE 0x00000001
242#define ACCEL_OP_MAP_DMA 0x00000002
243#define ACCEL_OP_UNMAP_DMA 0x00000004
244#define ACCEL_OP_ALLOC_QUEUE 0x00000008
245#define ACCEL_OP_SUBMIT 0x00000010
246#define ACCEL_OP_SYNC 0x00000020
247#define ACCEL_OP_RESET 0x00000040
248
249/* DMA Permission Flags */
250#define DMA_PERM_READ 0x00000001
251#define DMA_PERM_WRITE 0x00000002
252#define DMA_PERM_COHERENT 0x00000004
253
254/* Accelerator Lifecycle States */
255typedef enum {
256 ACCEL_STATE_UNINITIALIZED = 0,
257 ACCEL_STATE_PROBED = 1,
258 ACCEL_STATE_CONFIGURED = 2,
259 ACCEL_STATE_ACTIVE = 3,
260 ACCEL_STATE_FAULTED = 4,
261 ACCEL_STATE_RESETTING = 5,
262 ACCEL_STATE_RECOVERED = 6
263} AcceleratorDeviceState;
264
265/* DMA Window Descriptor for SMMUv3 Translation Mapping */
266typedef struct {
267 uint64_t iova_base;
268 uint64_t phys_base;
269 uint64_t size_bytes;
270 uint32_t permissions; /* DMA_PERM_* */
271 uint32_t stream_id;
272 uint32_t window_id;
273 uint32_t reserved;
274} DmaWindowDescriptor;
275
276/* SMMUv3 Stream Configuration */
277typedef struct {
278 uint32_t stream_id;
279 uint32_t ste_index;
280 uint64_t cd_table_base;
281 uint64_t ttbr0_base;
282 uint64_t mair_value;
283 uint32_t t0sz;
284 uint32_t granule_size;
285 bool stage1_enabled;
286 bool fault_trap_enabled;
287} Smmuv3StreamConfig;
288
289/* Accelerator Capability Record */
290typedef struct {
291 uint32_t slot;
292 uint32_t generation;
293 uint64_t principal_id;
294 uint32_t resource_type; /* RES_ACCELERATOR */
295 uint32_t allowed_ops; /* Bitmask of ACCEL_OP_* */
296 uint64_t iova_bound_base;
297 uint64_t iova_bound_size;
298 uint32_t queue_id_mask;
299 uint32_t revocation_state; /* 1 = ACTIVE, 2 = REVOKED */
300 uint8_t provenance_digest[32];
301} AcceleratorCapability;
302
303/* Canonical EffectIntent (64 bytes, little-endian, 64-bit aligned) */
304typedef struct {
305 uint16_t version; /* 1 */
306 uint16_t length; /* 64 */
307 uint32_t reserved0; /* 0 */
308 uint64_t request_id; /* Caller-generated request ID */
309 uint64_t principal_id; /* Principal ID (e.g. Omega) */
310 uint32_t capability_slot; /* Capability slot index */
311 uint32_t capability_generation; /* Capability generation */
312 uint32_t resource_type; /* RES_ACCELERATOR */
313 uint32_t operation; /* ACCEL_OP_* */
314 uint64_t target_base; /* Target IOVA or Queue ID */
315 uint64_t target_size; /* Byte span or command length */
316 uint64_t param0; /* Descriptor address or doorbell parameter */
317} EffectIntent;
318
319/* Canonical EffectReceipt (192 bytes, 64-bit aligned) */
320typedef struct {
321 uint16_t version; /* 1 */
322 uint16_t length; /* 192 */
323 uint32_t decision; /* 1 = ADMITTED, 2 = REJECTED */
324 uint32_t rejection_reason; /* Specific reason code if rejected */
325 uint32_t reserved0; /* 0 */
326 uint64_t request_id; /* Mirrored from EffectIntent */
327 uint8_t intent_digest[32]; /* SHA-256 of 64-byte EffectIntent */
328 uint64_t actual_effect; /* Physical result or mapped address */
329 uint64_t output; /* Submitted packet count or status */
330 uint32_t capability_slot; /* Presented slot */
331 uint32_t capability_generation; /* Presented generation */
332 uint64_t machine_generation; /* Monotonic machine counter */
333 uint64_t measurement; /* Timestamp / cycle measurement */
334 uint8_t previous_receipt_digest[32]; /* Rolling SHA-256 seal chain */
335 uint8_t receipt_digest[32]; /* SHA-256 of receipt bytes 0x00..0x7F */
336 uint8_t reserved1[32]; /* Alignment padding to 192 bytes */
337} EffectReceipt;
338
339/* Command Queue State within Physics */
340typedef struct {
341 uint32_t queue_id;
342 uint32_t head_index;
343 uint32_t tail_index;
344 uint32_t slot_count;
345 uint64_t ring_phys_base;
346 uint64_t doorbell_mmio_reg;
347 bool active;
348} AcceleratorQueue;
349
350/* Master Physics Accelerator Link Context */
351typedef struct {
352 uint32_t link_version;
353 uint32_t device_state; /* AcceleratorDeviceState */
354 uint32_t stream_id;
355 uint32_t active_queues;
356 uint64_t mmio_doorbell_base;
357 uint64_t mmio_doorbell_size;
358 uint64_t coherent_dram_base; /* 0x80000000 on DGX Spark */
359 uint64_t coherent_dram_size; /* 128 GiB on DGX Spark */
360 DmaWindowDescriptor active_windows[PHYSICS_ACCEL_MAX_WINDOWS];
361 uint32_t active_window_count;
362 AcceleratorQueue queues[PHYSICS_ACCEL_MAX_QUEUES];
363 Smmuv3StreamConfig smmu_config;
364 uint8_t last_receipt_digest[32];
365 uint64_t fault_count;
366 uint64_t total_submissions;
367} PhysicsAcceleratorLink;
368
369/* ========================================================================= */
370/* Physics Server Authority APIs */
371/* ========================================================================= */
372
373/* Initialize the Physics Accelerator Link with coherent DRAM boundaries */
374int physics_accel_init(PhysicsAcceleratorLink *link,
375 uint64_t dram_base,
376 uint64_t dram_size);
377
378/* Configure SMMUv3 Stream Table and Context Descriptors for accelerator */
379int physics_accel_configure_smmu(PhysicsAcceleratorLink *link,
380 const Smmuv3StreamConfig *config);
381
382/* Grant a bounded DMA window and install SMMUv3 Stage 1 translation */
383int physics_accel_grant_dma_window(PhysicsAcceleratorLink *link,
384 const AcceleratorCapability *cap,
385 const DmaWindowDescriptor *window,
386 EffectReceipt *out_receipt);
387
388/* Revoke a DMA window and invalidate SMMUv3 translation entries */
389int physics_accel_revoke_dma_window(PhysicsAcceleratorLink *link,
390 const AcceleratorCapability *cap,
391 uint64_t iova_base,
392 EffectReceipt *out_receipt);
393
394/* Allocate a bounded command submission queue ring */
395int physics_accel_alloc_queue(PhysicsAcceleratorLink *link,
396 const AcceleratorCapability *cap,
397 uint32_t queue_id,
398 EffectReceipt *out_receipt);
399
400/* Mediate command packet validation, ring insertion, and doorbell ringing */
401int physics_accel_submit_command(PhysicsAcceleratorLink *link,
402 const AcceleratorCapability *cap,
403 const EffectIntent *intent,
404 EffectReceipt *out_receipt);
405
406/* Trap and isolate an accelerator fault (SMMU abort, timeout, illegal insn) */
407int physics_accel_handle_fault(PhysicsAcceleratorLink *link,
408 uint32_t fault_syndrome);
409
410/* Perform non-disruptive device reset and recovery */
411int physics_accel_reset_device(PhysicsAcceleratorLink *link,
412 EffectReceipt *out_receipt);
413
414/* ========================================================================= */
415/* Omega Client APIs (Mediated Ingress) */
416/* ========================================================================= */
417
418/* Request a bounded DMA memory window from Physics */
419int omega_accel_request_dma_grant(uint32_t cap_slot,
420 uint32_t cap_gen,
421 uint64_t iova_base,
422 uint64_t phys_base,
423 uint64_t size,
424 uint32_t perms,
425 EffectReceipt *out_receipt);
426
427/* Request command execution submission via mediated Physics queue */
428int omega_accel_request_submit(uint32_t cap_slot,
429 uint32_t cap_gen,
430 uint32_t queue_id,
431 uint64_t cmd_desc_iova,
432 uint64_t cmd_len,
433 EffectReceipt *out_receipt);
434
435/* Request synchronization / barrier on submitted work */
436int omega_accel_request_sync(uint32_t cap_slot,
437 uint32_t cap_gen,
438 uint32_t queue_id,
439 uint64_t timeout_cycles,
440 EffectReceipt *out_receipt);
441
442/* Validate rolling cryptographic seal chain on an EffectReceipt */
443int omega_accel_verify_receipt(const EffectReceipt *receipt,
444 const uint8_t *expected_prev_seal);
445
446#endif /* PHYSICS_ACCEL_LINK_H */
447```
448
449---
450
451## 5. The 10 Canonical Qualification Gates
452
453Milestone 15 qualification mandates 100% compliance across 10 canonical qualification gates:
454
4551. `PHYSICS_ACCEL_MEM_BOUNDS_PASS`:
456 Verifies that memory boundaries for the coherent accelerator envelope `[0x80000000, 0x2080000000)` are strictly enforced. Any attempt to allocate or map memory outside unreserved frames, or overlapping Physics kernel structures (image, stack, capability ledger, receipt ledger), is trapped and fails closed.
457
4582. `PHYSICS_ACCEL_DMA_POLICY_PASS`:
459 Verifies that Physics correctly models ARM SMMUv3 Stage 1 IOVA-to-PA translation policy and DMA window isolation. Asserts that IOVA mapping requests are bounded, translation matches DRAM frames with precise permission bits (`DMA_PERM_READ`, `DMA_PERM_WRITE`, `DMA_PERM_COHERENT`), unmapped accesses fail closed, and overlapping windows are rejected.
460
4613. `PHYSICS_ACCEL_QUEUE_AUTHORITY_PASS`:
462 Verifies bounded queue authority and doorbell mediation policy. Confirms that submission queue ring indices wrap cleanly modulo slot capacity, malformed command packets are refused prior to ring insertion, and untrusted principals are physically barred from writing MMIO doorbell registers directly.
463
4644. `PHYSICS_ACCEL_DEVICE_LIFECYCLE_PASS`:
465 Verifies deterministic progression across accelerator device states (`UNINITIALIZED` $\to$ `PROBED` $\to$ `CONFIGURED` $\to$ `ACTIVE`). Confirms that state transitions follow monotonic state machine rules and that non-disruptive fault isolation and recovery reset function fail-closed.
466
4675. `PHYSICS_ACCEL_RECEIPT_CHAIN_PASS`:
468 Verifies that every accelerator operation emits an immutable, bit-exact 192-byte `EffectReceipt` committed to the rolling SHA-256 seal chain. Verifies that receipt hashes deterministically incorporate the prior receipt digest, preventing receipt tampering, truncation, or replay attacks.
469
4706. `PHYSICS_ACCEL_OMEGA_INGRESS_PASS`:
471 Verifies the Omega-to-Physics boundary. Confirms that Omega interacts exclusively through structured 64-byte `EffectIntent` requests, and that requests lacking valid, unrevoked capability handles are rejected at the broker admission gate prior to execution.
472
4737. `PHYSICS_ACCEL_HARDWARE_BOUNDARY_PASS`:
474 Verifies truthful observation of DGX Spark hardware topology directly from the live host: PCI BDF `000f:01:00.0`, vendor ID `0x10de`, device ID `0x2e12`, IOMMU group 20, SMMUv3 platform device `arm-smmu-v3.1.auto` @ base `0x13000000`, Stream ID `0x0100` provenance, BAR0 aperture `0x24000000-0x27ffffff` (64 MiB), explicit subsystem ownership boundaries, and zero unverified MMIO writes performed.
475
4768. `PHYSICS_ACCEL_ZERO_RUNTIME_DEP_PASS`:
477 Verifies sovereign runtime independence: 0 CUDA runtime, 0 CUDA driver API, 0 LLVM JIT, 0 Python runtime, 0 GCC inline assembly in canonical files. Host qualification scaffolding uses GCC as a temporary non-lineage compiler.
478
4799. `PHYSICS_ACCEL_PROVENANCE_PASS`:
480 Verifies capability provenance tracking, monotonic attenuation validation, and capability slot checking. Confirms that unpermitted operations, invalid resource types, or out-of-bounds IOVA requests are rejected fail-closed.
481
48210. `PHYSICS_ACCEL_RECEIPT_PASS`:
483 Verifies that a formal 192-byte `EffectReceipt` is generated for hardware boundary observation, binding observed topology parameters (Stream ID, BAR0 base, SMMU base, BDF) into the immutable receipt chain with valid SHA-256 seal.
484
485---
486
487## 6. Provenance & Qualification Contract
488
489Milestone 15 is governed by canonical contract `CONTRACT-PHYSICS-ACCELERATOR-LINK-M15`.
490
491- **Specification Tracking**: `aien-spark/aien-architecture#27`
492- **Physics Authority Implementation**: `aien-spark/physics#10`
493- **Omega Client Link Implementation**: `aien-spark/omega#21`
494- **Qualification Receipt Target**: `evidence/physics_accelerator_link_qualification_receipt.json`
495
496### Epistemic Qualification Criteria & Ratification
497
498Under the epistemic verification doctrine, Milestone 15's boundary is ratified as **COMPLETE / HARDWARE BOUNDARY QUALIFIED**:
499
5001. **Software Authority & API Model (QUALIFIED)**:
501 - Validates that Omega can only interact with accelerator authority via capability-governed, monotonic `EffectIntent` requests.
502 - Validates IOVA bounding, software translation checks, ring state machine progression, fail-closed fault handling, and unkeyed rolling SHA-256 digest chaining.
5032. **Empirical Hardware Boundary Characterization (QUALIFIED)**:
504 - Live hardware inspection verifies physical DGX Spark topology:
505 - NVIDIA GB10 Blackwell GPU at PCI BDF `000f:01:00.0` (Vendor `0x10de`, Device `0x2e12`)
506 - IOMMU Group 20
507 - SMMUv3 platform device `arm-smmu-v3.1.auto` @ base `0x13000000`
508 - Stream ID `0x0100` (provenance: ACPI IORT Node 29, Segment 15, BDF 01:00.0)
509 - Coherent unified DRAM envelope `[0x80000000, 0x2080000000)` (128 GiB unified LPDDR5x)
510 - BAR0 MMIO aperture `[0x24000000, 0x28000000)` (64 MiB, kernel resource observed)
511 - Explicit subsystem ownership boundaries recorded; no guessed MMIO writes performed.
5123. **Milestone 16 Boundary Hand-off**:
513 - Milestone 16 (`BLACKWELL_NATIVE_PATH_KNOWN`) dependency is satisfied to begin empirical discovery of native Blackwell submission mechanics from a truthful foundation.
514
515```json
516{
517 "milestone": "MILESTONE 15 — PHYSICS_ACCELERATOR_LINK",
518 "status": "QUALIFIED / PASS",
519 "ratification": "COMPLETE / HARDWARE BOUNDARY QUALIFIED",
520 "contract_id": "CONTRACT-PHYSICS-ACCELERATOR-LINK-M15",
521 "lineage": "SILICON -> ATLAS (M1) -> PHYSICS (M2/M3/M15) -> OMEGA (M4-M14) -> AIEN",
522 "qualification_gates": {
523 "physics_gates_total": 10,
524 "physics_gates_passed": 10,
525 "omega_gates_total": 10,
526 "omega_gates_passed": 10,
527 "omega_cumulative_gates": 121,
528 "omega_cumulative_passed": 121
529 },
530 "hardware_boundary_characterization": {
531 "status": "QUALIFIED",
532 "target_smmu": "arm-smmu-v3.1.auto @ 0x13000000",
533 "target_stream_id": "0x0100",
534 "target_device": "NVIDIA Blackwell GB10 (PCI 000f:01:00.0, IOMMU group 20)",
535 "coherent_dram_envelope": "[0x80000000, 0x2080000000) 128 GiB",
536 "bar0_aperture": "[0x24000000, 0x28000000) 64 MiB",
537 "native_submission_mechanics": "INTENTIONALLY_DEFERRED_TO_M16"
538 }
539}
540```
541
542---
543
544## 7. Downstream Horizons & Accelerator Cognition
545
546Milestone 15 establishes the secure, sandboxed hardware substrate that unlocks the remainder of Phase C (Accelerator Cognition Substrate):
547
548- **Milestone 16 (`BLACKWELL_NATIVE_PATH_KNOWN`)**: Empirical execution characterization of native Blackwell SM architecture, discovering command queue packets, instruction issue formats, and MMIO doorbell mechanics.
549- **Milestone 17 (`OMEGA_BLACKWELL_VECTOR`)**: Verified Blackwell vector compute realization generated directly from $G_S$ via $G_S \times G_M \to G_R$ synthesis.
550- **Milestone 18 (`OMEGA_BLACKWELL_MATMUL`)**: Verified native Blackwell tensor matrix multiplication utilizing tensor core pipelines under mathematical invariant preservation.
551- **Milestone 19 (`OMEGA_ACCELERATOR_RESIDENT`)**: Persistent Omega execution substrate residing in accelerator-accessible coherent memory, completing the transition to autonomous high-throughput cognitive loops.