code wiki / _hdl_build / nx_cmos_gate.nx

nx_cmos_gate.nx

buildroot/runtime/_hdl_build/nx_cmos_gate.nx

4104 B103 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic cmos
docsdependenciesstructsconstsfunctions

about

nx_cmos_gate.nx -- proves the never-brick CMOS config-tweak model. T0 golden-valid : a known-good CMOS image has a consistent checksum T1 safe-tweak-valid : a guarded config tweak keeps the checksum valid + changes the byte N1 raw-corrupt-detected : a raw byte flip (no checksum fix) -> cmos_valid == 0 (BIOS would reject) N2 restore-recovers : restoring the golden snapshot makes it valid again N3 refuse-checksum-byte : cmos_set_safe REFUSES to write the checksum bytes (0x2E/0x2F) N4 refuse-rtc-byte : cmos_set_safe REFUSES to write the RTC/clock/status bytes (<0x10) GREEN only if all six hold. Evidence -> knowledge/status/cmos_gate.log. Sovereign: imports nx_cmos + nx_framed_append + nx_syscalls (no gcc). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_cmos.nx nx_framed_append.nx nx_syscalls.nx nx_cmos_gate.nx

imports: nx_cmos.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 c_puts sys_write sys_mmap cmos_golden cmos_fix cmos_cksum cmos_valid cmos_cksum ↻ cmos_stored cmos_restore cmos_set_safe cmos_fix ↻ cmos_valid ↻ cmos_corrupt_raw cg_row sys_mmap ↻ cg_cat fa_appendz fa_append sys_mmap ↻ sys_openat_append sys_flock fa_write_all sys_write ↻ sys_close fa_len c_puts ↻ cg_cat ↻ cg_catn sys_mmap ↻ fa_appendz ↻

structs

none

consts

16const CG_LOG: *u8 = "knowledge/status/cmos_gate.log"

functions

18func cg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != 0 as u8 { dst[off + i] = s[i]; i = i + 1 } return off + i }
called by 2: cg_rowmain
19func cg_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
29func cg_row(name: *u8, pass: i64) -> i64
called by 1: main calls 4: sys_mmapcg_catfa_appendzc_puts
42func main() -> i64