code wiki / _hdl_build / nx_uefi_ovmf_oracle.nx

nx_uefi_ovmf_oracle.nx

buildroot/runtime/_hdl_build/nx_uefi_ovmf_oracle.nx

18008 B428 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_uefi_ovmf_oracle.nx -- BENCH-ONLY ORACLE (operator law 2026-07-20). THE THIRD REFERENCE FOR THE UEFI LANE. nx_boot_uefi AUTHORS the EFI image and nx_emu_uefi EXECUTES it -- but both are OURS, so a GREEN from that pair proves the pair is self-consistent, never that real firmware agrees. ("A TWO-WAY COMPARISON ATTRIBUTES THE INCUMBENT'S ERROR TO YOU -- BUILD THE THIRD REFERENCE ONCE AND REUSE IT AT EVERY SCALE.") The third reference is EDK2/OVMF: an independent UEFI implementation nobody here wrote. This organ does NOT run qemu (qemu is a foreign binary and lives only on the laptop; the NAS has neither qemu nor OVMF -- measured 2026-08-08). It is the RULER: it takes the framebuffer real firmware actually produced (a qemu `screendump` P6 PPM) and the framebuffer the sovereign emulator modelled (`nx_emu_uefi --shot` 24-bit BMP) and compares them PIXEL FOR PIXEL, plus re-derives nx_emu_uefi's own fb_measure statistics over the FOREIGN buffer so both engines are judged by ONE ruler on ONE scale. Orientation/channel order are NOT assumed: PPM is top-down RGB, BMP is bottom-up BGR, and the transform is applied explicitly. Geometry comes FROM each file's own header, never from a constant -- a comparator that trusts the writer's constants is one implementation, not two. Usage: nx_uefi_ovmf_oracle <ovmf.ppm> <sov.bmp> nx_uefi_ovmf_oracle selftest (teeth, incl. a planted-difference negative control) Exit: 0 GREEN (dims agree AND zero differing pixels) | 1 RED | 3 UNPROVEN (could not read) -- the third state exists so "I could not look" never reports as "it is broken". Log -> knowledge/status/nishi_os.log, canonical verdict= on the LAST field (positional anchor). Sovereign: syscalls only, no gcc/.sh. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_uefi_ovmf_oracle.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main o_eq ovo_selftest sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ mk_ppm mk_bmp fb_compare sys_mmap ↻ ppm_ws ppm_int rd32 o_p sys_write ↻ o_fn sys_mmap ↻ sys_write ↻ sys_openat_append o_fp sys_write ↻ sys_close sys_exit ↻ o_p ↻ sys_exit ↻ sys_mmap ↻ sys_read_file sys_openat_rd

structs

none

consts

27const OVO_MAGIC_4096: i64 = 4096
29const OVO_MAXW: i64 = 8192
30const OVO_MAXH: i64 = 8192
33const O_W: i64 = 0
34const O_H: i64 = 1
35const O_TOTAL: i64 = 2
36const O_EQUAL: i64 = 3
37const O_DIFF: i64 = 4
38const O_FDX: i64 = 5
39const O_FDY: i64 = 6
40const O_COLOR: i64 = 7
41const O_MATCH: i64 = 8
42const O_ZEROS: i64 = 9
43const O_TRANS: i64 = 10

functions

45func o_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: ovo_selftestmain calls 1: sys_write
46func o_fp(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: ovo_selftestmain calls 1: sys_write
47func o_fn(fd: i64, v: i64) -> i64
called by 2: ovo_selftestmain calls 2: sys_mmapsys_write
57func o_fx(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
64func o_eq(a: *u8, b: *u8) -> i64
called by 1: main
70func rd32(b: *u8, o: i64) -> i64
called by 1: fb_compare
77func ppm_ws(b: *u8, len: i64, ip: *i64) -> i64
called by 1: fb_compare
102func ppm_int(b: *u8, len: i64, ip: *i64) -> i64
called by 1: fb_compare
124func fb_compare(pp: *u8, plen: i64, bm: *u8, blen: i64, out: *i64) -> i64
216func mk_ppm(b: *u8, w: i64, h: i64) -> i64
called by 1: ovo_selftest
230func mk_bmp(b: *u8, w: i64, h: i64) -> i64
called by 1: ovo_selftest
260func ovo_selftest() -> i64
350func main(argc: i64, argv: *i64) -> i64