interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / omega / hardware / README.md

144 lines · 8578 bytes Raw Blame History Rendered
1# Seeded Omega hardware mapping, L558
2
3This executable validates hardware intent and emits the existing Interplane
4`CapabilityRequest`. It does no hardware I/O and grants no authority. Production
5Aienux consumer integration is pending; this is a runnable additive entrypoint,
6not replacement of the existing AIEN bridge or L418/L420 language migration.
7
8Build from the pinned seed in an isolated directory on Linux AArch64:
9
10```
11bash tests/hardware/build.sh --birth
12node tests/hardware/acceptance.mjs
13```
14
15`--birth` requires the local `../omega-in-omega` object store (or `OMEGA_REPO`),
16and refuses to overwrite an existing seed extraction. Subsequent builds use
17`bash tests/hardware/build.sh`. `OMC=/path/to/qualified/omc` can supply a previously
18built compiler; its exact SHA-256 is always checked. No C/Rust compiler builds
19the production program. Seed source: `29b12760f4c962606411d6bf25032aedef063301`;
20seed0 hex -> seed0 -> hex1 -> asm2 -> om4 -> omc fixpoint. Birth/build evidence
21is in `qualification/evidence/L558`. No first-party compiler-owner files edited.
22
23Run the executable directly, with finite binary input files:
24
25```
26target/L558/hardware-map < intent.bin 3< discovery.bin
27```
28
29The host passes discovery on fd 3 after verifying provenance through its own
30trusted discovery provider. stdin is untrusted model intent. **The process,
31fd 3 and snapshot generation are a trusted-host boundary.** This program does
32not verify a firmware signature, read physical discovery registers, or defend
33against a host that lies. A model-supplied `verified=true` field has no channel
34here. A host must allocate a new nonzero generation whenever any discovery fact
35or catalog changes, prevent generation reuse across restart, and recheck the
36binding at authorization/execution to prevent replacement races. Both input
37channels must close after one frame; this one-shot protocol is not a service.
38The caller must bound runtime and bytes and discard ALL stdout on nonzero exit.
39
40## Frame, version 1
41
42Two exact 96-byte records, all multibyte integers unsigned little endian.
43Reserved bytes must be zero. Unknown fields have explicit enum 0 but this first
44profile refuses unknown required facts. Flags are protocol enums, not hardware
45register encodings. Limits below are policy/profile limits, not silicon limits.
46
47| Offset | Model intent (stdin) | Trusted discovery (fd 3) |
48|---|---|---|
49| 0..3 | ASCII HWI1 | ASCII HWD1 |
50| 4 | Interface version 1 | Interface version 1 |
51| 5 | Operation 1..5 | Profile 1: QEMU virt standards fixture |
52| 6 | ISA 1: AArch64 | Profile version 1 |
53| 7 | Endian 1: little | Vendor 0: standards-only |
54| 8 | Granule 1: 4 KiB | ISA 1: AArch64 |
55| 9 | Required CPU features, bit 0: FEAT_LSE | Endian 1: little |
56| 10 | Reserved | Granule 1: 4 KiB |
57| 11 | Reserved | Known CPU features, bit 0: FEAT_LSE; other bits refused |
58| 12..15 | Identifier u32 | 12 timer 1: Arm generic timer; 13 GIC 3; 14 IOMMU 0 unknown/absent or 3 SMMUv3; 15 DMA coherence 0 unknown, 1 explicit noncoherent/cache-maintenance-required, 2 coherent |
59| 16..23 | Operation value u64 | 16 firmware 1: PSCI 1.0; 17 conduit 1: SMC, 2: HVC; 18..23 reserved |
60| 24..31 | Expected discovery generation u64 | Immutable host generation u64, nonzero |
61| 32..63 | Expected catalog digest, 32 raw bytes | Host catalog digest, 32 raw bytes, nonzero |
62| 64..71 | Request sequence u64, nonzero | Reserved |
63| 72..95 | Reserved | Reserved |
64
65Catalog digest follows **existing Core `Catalog.compute_digest`**: SHA-256 over
66JCS of sorted `[capability name, parameter-schema digest]` pairs. It is not a
67hash of the catalog JSON file and is not a signature. Generation binds the full
68host discovery facts; the digest binds the schemas. Both must match.
69
70## Canonical capability mapping
71
72The names and renames use existing CrossAxis `MappingTable` without passthrough.
73`catalog.json` and `mapping.json` are existing protocol types, not a new JSON
74wrapper protocol. All arguments are typed: `identifier`, `required_features`, `value` integers and
75`discovery_generation` decimal string (preserves all u64 values in JSON).
76The request id is `hw-<sequence>`. Canonical namespace is `hardware`; names may
77contain dots. Existing JSON-envelope admission supports those names. The current
78OpenAI name splitter cannot split a multi-dot namespace/name; production dialect
79integration must use canonical ToolRef/envelope admission, not guess a split.
80
81| Operation | Canonical name | Runtime name | Identifier / value |
82|---|---|---|---|
83| 1 | cpu.discover | hw_cpu_discover | 0 / 0, required CPU features must be a subset |
84| 2 | timer.arm | hw_timer_arm | 0 / 1..2147483647 ticks, counter frequency is host-owned and not inferred |
85| 3 | interrupt.bind | hw_interrupt_bind | GICv3 SPI INTID 32..1019 / 0; excludes SGI/PPI/special/LPI |
86| 4 | dma.map | hw_dma_map | Opaque host device handle 0..65535 / 4096..1048576 bytes, multiple of 4096; requires SMMUv3 isolation and explicit coherence |
87| 5 | power.request | hw_power_request | 1 system off or 2 system reset / 0; preserves PSCI 1.0 and conduit |
88
89DMA handles are not SIDs, IOVAs, physical addresses or access rights. Mapping
90carries an intent only; runtime must check buffer ownership, IOMMU attachment,
91cache ownership transitions, lifetime and teardown. Noncoherent mapping requires
92host cache maintenance before/after DMA. No CPU_ON entry address or vendor
93firmware function ID is accepted. Power/IRQ/timer calls remain privileged host
94effects, each requiring a fresh decision. ISA and firmware and vendor-device
95contracts remain separate. All physical boards: **NOT_TESTED**.
96
97Refusal precedence: frame/magic/reserved (20), interface version (21),
98profile/version/vendor (22), ISA/endian/granule/feature subset (23),
99generation/digest binding (24), interface/coherency consistency (25),
100unknown operation including raw MMIO (26), argument/id/range (27),
101DMA isolation missing (28). stderr is `hardware refusal N\n`, exit N, no stdout.
102Output I/O failure exits 29, possibly after partial output; a caller must discard
103it. Input EINTR is retried, input short reads are assembled, read errors refuse.
104Coherent DMA with no IOMMU is deliberately refused by this narrow profile even
105though some physical systems support that combination safely under other policy.
106
107## Integration and qualification still required
108
109The external test reference reconstructs the same canonical intent from actual
110native executable output, proves existing CrossAxis produces an identical
111CapabilityRequest and uses existing Crossveil to deny, hold, refuse unknown
112decisions and block stale catalogs/replays. This is HOST-TESTED protocol evidence,
113not a privileged Aienux adapter or physical discovery/driver qualification.
114FR-8 (privileged/MMIO words), L420 kernel migration, host-only trusted discovery,
115immutable-generation storage and native consumer integration remain their owners'
116work. No new compiler feature is required for this bounded mapper. Production
117interrupt, DMA, power and timer handlers, timeouts, revocation/lifecycle and
118board-specific providers require separate executable/hardware acceptance.
119
120Run the complete native acceptance and protocol-reference checks with:
121
122```
123bash tests/hardware/verify.sh
124```
125
126The external reference is test infrastructure only; production execution is the
127seed-built ELF. The command executes native cases before consuming their outputs.
128`node tests/hardware/acceptance.mjs` refreshes those outputs on every run; checked
129JSON files alone are not an executable acceptance result. Run all existing gates
130with `bash tests/hardware/existing.sh`; every exit is retained, including failures.
131This requires the same offline Rust cache/sibling pins as the existing gates.
132The new native gate is an explicit command pending compiler distribution into
133the shared Spark test runner; no existing gate or required check was weakened.
134
135Final L558 acceptance: 3462 native behavior cases, 9 transport/fault cases,
1365 compiled mutants detected, 35 existing mapping/authority checks, 7 existing
137gates PASS. See [evidence](../../qualification/evidence/L558/README.md).
138Source coverage and physical gaps: [coverage](../../docs/hardware/COVERAGE.md).
139
140`fixtures.json` retains exact hex input records for all five operations and their
141shared synthetic discovery. It is ordinary contract test data, not a physical
142discovery receipt. `mapping.json` is a template: the host must pin its
143`catalog_digest` to the verified catalog before use. The external reference tests
144do so and compare it with the native output's digest using existing Core rules.