code wiki / (root) / nx_etg_probe_cpu_test.nx

nx_etg_probe_cpu_test.nx

buildroot/runtime/nx_etg_probe_cpu_test.nx

8881 B183 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic etg
docsdependenciesstructsconstsfunctions

about

nx_etg_probe_cpu_test.nx -- KAT for E3 first real CPU probe. Verifies: T1 Classifier taxonomy: each NX_ETG_OUTCOME_* the classifier can emit is reachable on a deterministic synthetic input. T2 Boundary cases: claim==0, measured==0 -> INCONCLUSIVE. T3 CONFIRMED band: measured within (claim - low%, claim + high%). T4 FALSIFIED: measured > claim * (1 + high/1000). T5 VENDOR_LIED_OMISSION: measured < claim * (1 - low/1000). T6 Real probe end-to-end: invokes nx_calibrate_run on qemu-RV64 with a deliberately permissive claim (100,000 ns) and asserts the emitted entry is valid + the outcome is one of the allowed verdicts (CONFIRMED / VENDOR_LIED_OMISSION / FALSIFIED). The exact value of measured is non-deterministic under qemu, so we don't assert on it -- we assert the PIPELINE is real.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_calibrate.nx nx_etg.nx nx_etg_probe_cpu.nx nx_etg_probe_cpu_test.nx

imports: nx_syscalls.nxnx_calibrate.nxnx_etg.nxnx_etg_probe_cpu.nx

imported by: nobody (leaf or entry point)

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

main nx_etg_classify_outcome sys_mmap nx_etg_probe_cpu_syscall_r nx_calibrate_new sys_mmap ↻ nx_calibrate_run sys_mmap ↻ _calibrate_int_alu sys_mmap ↻ _now_ns sys_clock_gettime_mono sys_write _calibrate_ptrchase sys_mmap ↻ _now_ns ↻ sys_write ↻ _calibrate_mem_bw sys_mmap ↻ _now_ns ↻ _calibrate_syscall_gettime sys_mmap ↻ _now_ns ↻ sys_clock_gettime_mono ↻ _calibrate_syscall_mmap sys_mmap ↻ _now_ns ↻ _infer_tier sys_clock_gettime_mono ↻ nx_etg_classify_outcome ↻ nx_etg_entry_init nx_etg_probe_is_valid nx_etg_claim_is_valid nx_etg_outcome_is_valid nx_etg_outcome_implies_rec nx_etg_attestation_hash sys_mmap ↻ fnv1a nx_etg_outcome_is_valid ↻ nx_etg_probe_cpu_int_alu

structs

none

consts

none

functions

22func main() -> i64