code wiki / _hdl_build / nx_fw_boot_proof_gate.nx
nx_fw_boot_proof_gate.nx
buildroot/runtime/_hdl_build/nx_fw_boot_proof_gate.nx
about
nx_fw_boot_proof_gate.nx -- the never-brick CAPSTONE: the recovered firmware actually BOOTS.
Closes the loop on a REAL artifact, EXECUTED in the sovereign emu (no qemu/laptop):
corrupt the real nx_boot_uefi.efi mid-flash -> golden-recover -> UNWRAP -> RUN in nx_emu_uefi
-> it prints NISHI (exit 0).
REC : the corrupted flash auto-recovers from golden -> FW_RECOVERED
EXACT : the recovered payload is byte-identical to the .efi -> in-process compare
BOOTS : the recovered raw .efi EXECUTES + prints NISHI -> emu fork rc == 0
GREEN only if all three hold. ONE emu fork+exec (the proven br_guarded execve idiom, blocking
wait): repeated fork+execs in a single process intermittently spawn-fail in this runtime, so
the emu runs ONCE on the recovered image. The emu's DISCRIMINATION (it rejects corrupt code:
"NOS-EXEC RED") is proven by nx_emu_uefi's own tamper-gate; the recovery rigor is the in-process
REC + byte-EXACT checks here + nx_fw_real_flash_gate. Evidence -> knowledge/status/fw_boot_proof_gate.log.
The emu must be pre-built: ./_offc/nx_sov_build_run.elf nx_emu_uefi
Sovereign: imports the safe-flash organ (-> nx_sha256) + nx_framed_append + nx_syscalls. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_fw_safeflash.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
| 22 | const BP_LOG: *u8 = "knowledge/status/fw_boot_proof_gate.log" |
| 23 | const BP_EFI: *u8 = "_offc/nx_boot_uefi.efi" |
| 24 | const BP_EMU_ELF: *u8 = "/tmp/nx_emu_uefi.sov.elf" |
functions
| 27 | func bp_run(elf: *u8, a1: *u8) -> i64 |
| 47 | func bp_row(name: *u8, pass: i64) -> i64 |
| 60 | func main() -> i64 |