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