code wiki / _hdl_build / nx_fw_real_flash_gate.nx

nx_fw_real_flash_gate.nx

buildroot/runtime/_hdl_build/nx_fw_real_flash_gate.nx

4702 B104 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic fw
docsdependenciesstructsconstsfunctions

about

nx_fw_real_flash_gate.nx -- never-brick golden recovery on a REAL UEFI artifact. Proves the safe-flash mechanism (sovereign sha256 integrity + dual-image golden recovery) works on the ACTUAL sovereign UEFI boot stub _offc/nx_boot_uefi.efi (a 1024-byte PE32+ EFI_APPLICATION emitted by nx_boot_uefi), not just a synthetic payload: T0 real-efi-loaded : _offc/nx_boot_uefi.efi reads as a non-trivial image T1 clean-reflash-ok : re-flash the real image cleanly -> FW_OK + bootable N2 midflash-recovered : corrupt the real image mid-flash -> FW_RECOVERED + bootable T2 recovered-bytes-exact: the recovered payload is BYTE-IDENTICAL to the original .efi GREEN only if all four hold. Evidence -> knowledge/status/fw_real_flash_gate.log. HONEST: the image is still NXFW-wrapped (sha256 over the real .efi bytes); it is NOT yet BOOTED inside nx_emu_uefi (that execution-proof is the next sub-rung). Sovereign: imports the safe-flash organ (-> nx_sha256) + nx_framed_append + nx_syscalls. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_fw_safeflash.nx nx_framed_append.nx nx_syscalls.nx nx_fw_real_flash_gate.nx

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

main fw_puts sys_write sys_now_realtime_sec sys_mmap sys_clock_gettime_real sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close fw_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap fw_path fw_cat fw_catn sys_mmap ↻ fw_make sys_mmap ↻ fw_wr_u32 sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final

structs

none

consts

21const RF_LOG: *u8 = "knowledge/status/fw_real_flash_gate.log"
22const RF_EFI: *u8 = "_offc/nx_boot_uefi.efi"

functions

24func rf_row(name: *u8, pass: i64) -> i64
37func main() -> i64