code wiki / _hdl_build / nx_fw_capstone_gate.nx
nx_fw_capstone_gate.nx
buildroot/runtime/_hdl_build/nx_fw_capstone_gate.nx
about
nx_fw_capstone_gate.nx -- the WHOLE-STACK never-brick capstone, on a REAL artifact, EXECUTED.
Ties the entire arc together: the real _offc/nx_boot_uefi.efi is wrapped as SIGNED UEFI capsules
(real EFI_CAPSULE_HEADER + ed25519, rung 11) into A/B banks + an immutable factory; selection is
SIGNATURE-gated (uc_verify); a forged image planted in the active bank is rejected and the system
falls back to a signed survivor, which is UNWRAPPED and ACTUALLY BOOTED in nx_emu_uefi (-> NISHI).
C1 forged-active-survivor-boots : forged active -> signed survivor selected -> emu rc==0 (boots NISHI)
C2 double-fault-signed-factory : forged A + garbage B -> the signed immutable factory is selected
C3 all-forged-not-selectable : banks + factory all forged/garbage -> select null (never boot a forgery)
GREEN only if all three hold. ONE emu fork (bounded reads keep fork cheap). The emu must be
pre-built: ./_offc/nx_sov_build_run.elf nx_emu_uefi. Evidence -> knowledge/status/fw_capstone_gate.log.
Sovereign: nx_fw_uefi_capsule (-> nx_fw_capsule -> nx_ed25519) + nx_framed_append + nx_syscalls. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_fw_uefi_capsule.nxnx_framed_append.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const CAP_LOG: *u8 = "knowledge/status/fw_capstone_gate.log" |
| 20 | const REAL_EFI: *u8 = "_offc/nx_boot_uefi.efi" |
| 21 | const EMU_ELF: *u8 = "/tmp/nx_emu_uefi.sov.elf" |
| 22 | const CAP_A: i64 = 65 |
| 23 | const CAP_B: i64 = 66 |
functions
| 25 | func cap_copy(src: *u8, dst: *u8) -> i64 |
| 32 | func cap_garbage(path: *u8) -> i64 |
| 37 | func cap_write_sel(sel: *u8, c: i64) -> i64 { let b: *u8 = sys_mmap(2); b[0] = c as u8; b[1] = 0 as u8; cp_write(sel, b, 1); return 0 } |
| 38 | func cap_read_sel(sel: *u8) -> i64 |
| 49 | func cap_select(sel: *u8, ba: *u8, bb: *u8, fac: *u8) -> *u8 |
| 57 | func cap_unwrap(capf: *u8, rawout: *u8) -> i64 |
| 69 | func cap_emu_boot(efi: *u8) -> i64 |
| 88 | func cap_row(name: *u8, pass: i64) -> i64 |
| 101 | func main() -> i64 |