code wiki / _hdl_build / nx_driver_emit.nx

nx_driver_emit.nx

buildroot/runtime/_hdl_build/nx_driver_emit.nx

4689 B74 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic driver
docsdependenciesstructsconstsfunctions

about

nx_driver_emit.nx -- DRIVER-FROM-SPEC (X-DRV-W1), built on the emitter-of-emitters keystone. A DEVICE SPEC (here: the vendor id to bind) -> this organ EMITS a driver (NishiLang source) that scans the REAL hardware map (knowledge/registry/hwmap.tsv, authored by HWMAP / X-DRV-W0) and counts the devices whose vendor matches the spec = BINDS its devices. The match-loop control flow is synthesized from the spec (the vendor pattern is baked in), and nx_cc compiles it -- so a NEW device class = a NEW spec -> a NEW driver, NO new code (the driver-as-spec-composition thesis). Composes X-DRV-W0 (HWMAP) + X-AUT-006c/e (emitter-of-emitters / compiler-dual). nx_driver_emit <basename> <vendor> -> runtime/_hdl_build/<basename>.nx Honest scope: this is the device PROBE/BIND layer (which devices this driver claims); the bare- metal register protocol (handshake/ring/DMA) is the K-R2 virtio lane. Sovereign. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_driver_emit.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 dv_p sys_write dv_slen sys_mmap dv_cat dv_catn sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close

structs

none

consts

12const K_MAGIC_65536: i64 = 65536

functions

14func dv_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
15func dv_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 1: main
16func dv_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
27func dv_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 1: main calls 1: sys_write
29func main(argc: i64, argv: *i64) -> i64