aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / docs / adr / 0008-temporary-bring-up-firmware-report-exception.md
| 1 | # ADR 0008: Temporary Bring-Up Exception for a Post-Handoff Firmware Report |
| 2 | |
| 3 | Status: accepted by the operator, 2026-09-24, as a **temporary bootstrap |
| 4 | exception to escalation trigger 11**. It does not change the architecture. |
| 5 | Governing: [ADR 0003](0003-bootstrap-firmware-handoff-and-minimal-object-store.md), [MILESTONES.md section 0 and section 3](../MILESTONES.md), [NATIVE_BOOT_ONE_TIME.md](../NATIVE_BOOT_ONE_TIME.md). |
| 6 | |
| 7 | ## Context |
| 8 | |
| 9 | ADR 0003 makes firmware handoff one-way: after `ExitBootServices`, firmware |
| 10 | runtime storage is not part of AIENOS operation. The first native boot on |
| 11 | Machine 1 has no proven native console, external capture or native persistent |
| 12 | storage. If that boot fails, a small report that survives the reset is the |
| 13 | only reliable evidence of how far the kernel got. |
| 14 | |
| 15 | ## Decision |
| 16 | |
| 17 | The explicit bring-up and test image (`aienos-handoff`) may write a small |
| 18 | diagnostic report into UEFI variable storage after handoff, under these |
| 19 | conditions set by the operator: |
| 20 | |
| 21 | 1. Only the bring-up/test image may do it. |
| 22 | 2. Only diagnostic and evidence data may be written. Never credentials, |
| 23 | personal data, model state, Cortex state, or agent identity state. |
| 24 | 3. The variable is namespaced and versioned: `AienosBootReportV1` under vendor |
| 25 | GUID `a1e05b0e-7c3d-4f51-9b6a-2d8e4c1f0a37`, so it cannot overwrite |
| 26 | unrelated firmware state. |
| 27 | 4. Writes are bounded: at most 3 per boot (progress, final or fault) and at |
| 28 | most 3072 bytes each. |
| 29 | 5. A failed write never prevents boot; the result is reported and boot |
| 30 | continues. |
| 31 | 6. Normal AIENOS operation does not depend on UEFI runtime variable services. |
| 32 | 7. Every write is in the hardware-test ledger. Each report states its own |
| 33 | `nvram_write_index`, and `scripts/collect_boot_report.sh` runs under |
| 34 | `aien-proof hold --resource machine-1`, which records the collected report |
| 35 | as an `audit` event. |
| 36 | 8. The exception is removed once a reliable native console, external capture |
| 37 | or native persistent evidence path exists. |
| 38 | |
| 39 | **Reset after handoff.** The image resets through PSCI `SYSTEM_RESET`, the |
| 40 | architected Arm interface, which is not a UEFI runtime service. UEFI |
| 41 | `ResetSystem` is called only if PSCI returns without resetting. That fallback |
| 42 | is part of this bring-up exception and is removed with it. |
| 43 | |
| 44 | ## Target boundary (unchanged) |
| 45 | |
| 46 | UEFI performs boot handoff, then `ExitBootServices`, then AIENOS owns the |
| 47 | machine. Firmware runtime storage is no longer part of normal OS operation. |
| 48 | |
| 49 | ## Consequences |
| 50 | |
| 51 | - A failed first boot still leaves the last boot stage, fault registers, or |
| 52 | panic message in a place Linux can read after the reset. |
| 53 | - Removing the exception means deleting `save_report_var`, the |
| 54 | `AienosBootReportV1` variable, and the UEFI reset fallback from |
| 55 | `crates/aienos-boot/src/handoff.rs`, and replacing the collector's variable |
| 56 | check with the native evidence path. |