code wiki / _hdl_build / _gpu_oplist_gate.nx
_gpu_oplist_gate.nx
buildroot/runtime/_hdl_build/_gpu_oplist_gate.nx
about
_gpu_oplist_gate.nx -- GPU-class driver-from-spec gate (X-DRV-W1 -> X-DRV-003 / GPU trajectory):
the 4th device class as a GENERIC op-list on the CANONICAL emitter nx_drv_proto_emit, composing
with the sovereign SPIR-V lane. Proves:
(1) GPU -- the GENERIC nx_drv_proto_emit, driven by knowledge/specs/gpu_dispatch_virt.spec alone
(zero emitter change), authors a GPU-class command-submission driver; the SOVEREIGN rv64 emu
(+ the rv64im_min_gpu device model, via the dedicated _gpu_run runner) runs it: CTRL.EN ->
confirm STATUS.READY -> bind the command ring -> lay a command packet carrying the SPIR-V
magic 0x07230203 -> ring the DOORBELL -> device validates the SPIR-V magic, signals the
FENCE + latches RESULTPEEK -> driver verifies FENCE==seqno and RESULTPEEK==(operand<<16)|seqno.
Serial CONTAINS golden "GPUENRINGCMDFENCE" + a clean halt (BOOTSOV verdict=GREEN).
(2) DISTINCT -- the SAME emitter binary, driven by the NVMe op-list, yields a DIFFERENT golden;
the GPU class is just-a-spec, not NVMe/virtio in disguise.
(3) TAMPER x2 on the GPU image: bump the device-base lui imm (byte 7) -> all MMIO targets a non-
device address -> the ID identity verify fails -> transcript collapses; bump the ID-expected
li high byte (byte 15) -> identity mismatch -> collapses. Each must drop the golden.
Every verdict is a PRINTED marker off a REAL sovereign run; raw bytes read SOVEREIGNLY (sys_read).
NO qemu/gcc/openssl/python. Marker -> knowledge/status/driver_spec.log (GPUOPGATE row). Sovereign
orchestration (fork/dup3/execve/wait4). license_tier: ORIGINAL
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| 22 | const EMIT_ELF: *u8 = "_offc/nx_drv_proto_emit.elf" |
| 23 | const SOV_ELF: *u8 = "_offc/_gpu_run.elf" |
functions
| 25 | func q_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 26 | func q_fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 27 | func q_fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 29 | func q_run1(prog: *u8, a1: *u8, outpath: *u8) -> i64 called by 3: q_emit_runq_tampermain calls 7: sys_forksys_openat_wrsys_dup3sys_mmapsys_execvesys_exit+1 |
| 50 | func q_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 60 | func q_buf_has(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64 |
| 72 | func q_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 74 | func q_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 81 | func q_emit_run(spec: *u8, out: *u8, goldout: *u8, gbuf: *u8, gcap: i64, serialpath: *u8) -> i64 |
| 96 | func q_tamper(srcbin: *u8, pos: i64, golden: *u8, gn: i64, tampbin: *u8, serialpath: *u8) -> i64 |
| 112 | func main() -> i64 |