code wiki / _hdl_build / nx_spore_syscalls.nx
nx_spore_syscalls.nx
buildroot/runtime/_hdl_build/nx_spore_syscalls.nx
about
nx_spore_syscalls.nx -- the SPORE's minimal syscall surface.
The full nx_syscalls.nx carries ~40 wrappers (socket/connect/sendto/execve/
fork/getdents/clock...) -- everything the MATURE system eventually needs. The
SPORE needs only the six to verify a piece and measure itself, and a NishiLang
build links the whole imported module (no dead-code elimination yet), so a
spore that imported the full surface dragged ~6 KB of wrappers it never calls.
This is the architecturally-correct bootstrap: the spore carries the SMALLEST
syscall surface that lets it (a) read bytes, (b) verify them, (c) know its own
footprint. The richer surface (networking, processes, dirs) arrives as later
SEED pieces, germinated through the same trust gate. Additive: this does NOT
modify the protected shared nx_syscalls.nx.
Dual-target (RV64 default / x86_64 under --target) preserved exactly.
dependencies 0 imports · 2 importers
imports: none
imported by: nx_race_kernel.nxnx_spore_min_test.nx
structs
| none |
consts
| 18 | const SYS_WRITE: i64 = 1 |
| 19 | const SYS_CLOSE: i64 = 3 |
| 20 | const SYS_LSEEK: i64 = 8 |
| 21 | const SYS_OPENAT: i64 = 257 |
| 22 | const SYS_EXIT: i64 = 60 |
| 23 | const SYS_MMAP: i64 = 9 |
| 27 | const SYS_WRITE: i64 = 64 |
| 28 | const SYS_CLOSE: i64 = 57 |
| 29 | const SYS_LSEEK: i64 = 62 |
| 30 | const SYS_OPENAT: i64 = 56 |
| 31 | const SYS_EXIT: i64 = 93 |
| 32 | const SYS_MMAP: i64 = 222 |
| 35 | const AT_FDCWD: i64 = -100 |
| 36 | const O_RDONLY: i64 = 0 |
functions
| 38 | func sys_write(fd: i64, buf: *u8, count: i64) -> i64 |
| 41 | func sys_close(fd: i64) -> i64 called by 1: main |
| 44 | func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64 called by 1: main |
| 47 | func sys_exit(code: i64) -> i64 |
| 50 | func sys_mmap(size: i64) -> *u8 |
| 54 | func sys_openat_rd(path: *u8) -> i64 called by 1: main |