code wiki / _hdl_build / nx_nishios_window.nx

nx_nishios_window.nx

buildroot/runtime/_hdl_build/nx_nishios_window.nx

6984 B110 linesdepth 5pulls 16 transitivereach 0 importersview sourcekind tooltopic nishios
docsdependenciesstructsconstsfunctions

about

nx_nishios_window.nx -- "see NishiOS in a window": boot the kernel on the SOVEREIGN rv64 emulator (same device-model runtime as nx_boot_run_sov; qemu stays alignment-only) and EMIT a styled HTML "NishiOS boot console" -- a CRT-style screen showing the UART output + the hardware state (halt code, steps, device models). The operator opens it in a browser window to SEE the OS boot and test from the hardware rung up. HTML is emitted BY a Nishi organ (sovereign web doctrine). writes knowledge/status/nishios_screen.html No persistent-hardware writes -- the emulator's host-mode writes are inert by construction (Rule 26). license_tier: ORIGINAL

dependencies 6 imports · 0 importers

rv64im_min_sim.nx rv64im_min_csr.nx rv64im_min_clint.nx rv64im_min_uart.nx rv64im_min_virtio.nx rv64im_min_nvme.nx nx_nishios_window.nx

imports: rv64im_min_sim.nxrv64im_min_csr.nxrv64im_min_clint.nxrv64im_min_uart.nxrv64im_min_virtio.nxrv64im_min_nvme.nx

imported by: nobody (leaf or entry point)

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

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close nw_p nx_rv64im_rf_init nx_rv64im_csr_init nx_clint_init nx_uart_init nx_virtio_init nx_virtio_reset_storage nx_virtio_init_net nx_virtio_reset_storage ↻ nx_nvme_init nx_nvme_reset_storage nx_nndev_init nx_nndev_reset nx_mmu_init nx_mmu_reset nx_rv64im_sim_init nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_nvme nx_rv64im_sim_attach_nndev nx_rv64im_sim_attach_mmu nx_rv64im_sim_run nx_rv64im_sim_step nx_clint_tick nx_clint_update_mtip nx_rv64im_csr_tick_mcycle nx_clint_mtip_get nx_rv64im_csr_read nx_csr_addr_to_slot nx_rv64im_sim_take_trap nx_rv64im_csr_read ↻ nx_rv64im_csr_write nx_csr_addr_to_slot ↻

structs

none

consts

15const NW_MAGIC_16384: i64 = 16384
17const NW_MEM_BASE: i64 = 0x80000000
18const NW_MEM_SIZE: i64 = 65536
19const NW_TX_CAP: i64 = 4096
20const NW_MAX_STEPS: i64 = 100000

functions

22func nw_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
23func wa(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } return off+i }
called by 1: main
24func wb(buf: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { buf[off+i]=src[i]; i=i+1 } return off+i }
called by 1: main
25func wn(buf: *u8, off: i64, v: i64) -> i64 { var o: i64=off; if v==0 { buf[o]=48 as u8; return o+1 } let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var i: i64=0; while i<k { buf[o+i]=t[k-1-i]; i=i+1 } return o+k }
called by 1: main
27func main() -> i64