code wiki / _hdl_build / nx_genesis_live.nx

nx_genesis_live.nx

buildroot/runtime/_hdl_build/nx_genesis_live.nx

12878 B250 linesdepth 8pulls 10 transitivereach 1 importersview sourcekind tooltopic genesis
docsdependenciesstructsconstsfunctions

about

nx_genesis_live.nx -- the genesis tree, LIVE per host (operator early ask: "dynamic and living by what system the nishi os is on ... the spore to seed depends on it"). module: nishi-core.genealogy.genesis_live capability: CORE_COMPUTE (reconcile the genesis driver axis against THIS machine's real devices) The genesis lineage is the PORTABLE model. This organ INGESTS the host PCI probe (hwmap.tsv, authored by nx_hwmap from sysfs) and the PCI class map (PCI base class -> genesis driver-axis sovereignty), and computes the LIVE per-host census: of the devices actually present here, how many have a SOVEREIGN Nishi driver, how many are a THIRD-PARTY lock (worklist), how many are FUTURE, how many UNCOVERED (a real device with no genealogy node = a gap to fill). Run it on a different machine (different hwmap) and the census changes -- the tree's coverage re-derives per host. The static PCI class map is now AUTHORED BY THIS ORGAN into the NATIVE content-addressed seg_store (ncfg / nx_native_config) -- NOT a borrowed knowledge/registry/pci_class_map.tsv (operator 2026-06-20: "stop using tsv, nishi ecosystem only, all rungs everywhere"). gl_load_map seeds the 11-row map into a fresh per-call store then reads it BY COLUMN NAME, so the census has ZERO dependency on that .tsv (migrated off + removed). The host probe (hwmap.tsv) stays a live sysfs-derived artifact (nx_hwmap's output, dynamic per host -- a separate unit, not config). Sovereign: nx_cc->nxasm. license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_itoa_lib.nx nx_native_config.nx nx_genesis_live.nx nx_genesis_live_gate.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_native_config.nx

imported by: nx_genesis_live_gate.nx

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

main gl_puts sys_write sys_mmap gl_analyze sys_mmap ↻ gl_load_map sys_mmap ↻ gl_fresh_prefix sys_mmap ↻ sys_now_ms sys_mmap ↻ sys_clock_gettime_mono gl_seed_map ncfg_begin ss_begin ss_begin_cap gl_map_row sys_mmap ↻ ncfg_add_row sys_mmap ↻ canon_encode ncfg_key ss_add ncfg_set_count sys_mmap ↻ ncfg_count_key ncfg_itoa sys_mmap ↻ ss_add ↻ ncfg_commit ss_commit ss_segid_ok sys_mmap ↻ ss_cat ss_catn sys_write ↻ ss_write_seg ss_readall ss_writefile

structs

none

consts

24const GL_MAGIC_1048592: i64 = 1048592
25const GL_MAGIC_1048576: i64 = 1048576
26const GL_MAGIC_1048575: i64 = 1048575
28const GL_MAP_PREFIX: *u8 = "/tmp/pci-class-map-"
29const GL_HWMAP: *u8 = "knowledge/registry/hwmap.tsv"
30const GL_MAXMAP: i64 = 64

functions

32func gl_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 }
37func gl_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
38func gl_streq(a: *u8, b: *u8) -> i64
44func gl_read(path: *u8, lb: *i64) -> *u8
57func gl_field_dup(b: *u8, ls: i64, le: i64, f: i64) -> *u8
called by 2: gl_analyzegl_print_devices calls 1: sys_mmap
72func gl_class_hi(cf: *u8) -> *u8
called by 2: gl_analyzegl_print_devices calls 1: sys_mmap
80func gl_dupz(s: *u8) -> *u8
called by 1: gl_load_map calls 1: sys_mmap
89func gl_fresh_prefix(out: *u8, base: *u8) -> i64
called by 1: gl_load_map calls 2: sys_mmapsys_now_ms
105func gl_map_row(w: *i64, idx: i64, chi: *u8, cat: *u8, sov: *u8, node: *u8) -> i64
called by 1: gl_seed_map calls 2: sys_mmapncfg_add_row
115func gl_seed_map(prefix: *u8) -> i64
132func gl_load_map(cmh: *i64, cms: *i64, cmc: *i64) -> i64
158func gl_analyze(hwmap_path: *u8, outs: *i64) -> i64
202func gl_print_devices(hwmap_path: *u8) -> i64
231func main() -> i64