code wiki / _hdl_build / nx_genesis_live.nx
nx_genesis_live.nx
buildroot/runtime/_hdl_build/nx_genesis_live.nx
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
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
structs
| none |
consts
| 24 | const GL_MAGIC_1048592: i64 = 1048592 |
| 25 | const GL_MAGIC_1048576: i64 = 1048576 |
| 26 | const GL_MAGIC_1048575: i64 = 1048575 |
| 28 | const GL_MAP_PREFIX: *u8 = "/tmp/pci-class-map-" |
| 29 | const GL_HWMAP: *u8 = "knowledge/registry/hwmap.tsv" |
| 30 | const GL_MAXMAP: i64 = 64 |
functions
| 32 | func 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 } |
| 37 | func gl_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 38 | func gl_streq(a: *u8, b: *u8) -> i64 |
| 44 | func gl_read(path: *u8, lb: *i64) -> *u8 |
| 57 | func gl_field_dup(b: *u8, ls: i64, le: i64, f: i64) -> *u8 |
| 72 | func gl_class_hi(cf: *u8) -> *u8 |
| 80 | func gl_dupz(s: *u8) -> *u8 |
| 89 | func gl_fresh_prefix(out: *u8, base: *u8) -> i64 |
| 105 | func gl_map_row(w: *i64, idx: i64, chi: *u8, cat: *u8, sov: *u8, node: *u8) -> i64 |
| 115 | func gl_seed_map(prefix: *u8) -> i64 |
| 132 | func gl_load_map(cmh: *i64, cms: *i64, cmc: *i64) -> i64 called by 2: gl_analyzegl_print_devices calls 8: sys_mmapgl_fresh_prefixgl_seed_mapncfg_openncfg_countncfg_row+2 |
| 158 | func gl_analyze(hwmap_path: *u8, outs: *i64) -> i64 |
| 202 | func gl_print_devices(hwmap_path: *u8) -> i64 |
| 231 | func main() -> i64 |