code wiki / _hdl_build / _gpu_dxg_adapterinfo_gate.nx

_gpu_dxg_adapterinfo_gate.nx

buildroot/runtime/_hdl_build/_gpu_dxg_adapterinfo_gate.nx

8844 B125 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic gpu
docsdependenciesstructsconstsfunctions

about

_gpu_dxg_adapterinfo_gate.nx -- SOVEREIGN-GPU ladder R1 (adapter identity), the HONEST re-scope. R0 proved raw reach (open /dev/dxg + LX_DXENUMADAPTERS2 -> the real GPU adapter set). R1 reads each adapter's REAL identity off the same raw fd via LX_DXQUERYADAPTERINFO (0xC0184709) type=15 ADAPTERTYPE -- the ONLY adapter-identity query the WSL2 dxgkrnl uapi exposes (there is NO description-STRING type on this kernel: kmtqueryadapterinfotype = {UMDRIVERPRIVATE=0, ADAPTERTYPE=15, ADAPTERTYPE_RENDER=57} only; the Windows adapter_string ABI is absent -- proven live by the R1 recon). POSITIVE ID (real, not a literal model string): the host returns a 4-byte adaptertype bitfield per adapter. The DISCRETE hardware GPU (hybrid_discrete=1, software_device=0) is the RTX 5080; the other is the integrated GPU (hybrid_integrated=1). This gate identifies the 5080 by that REAL bit, NOT by a hardcoded value. (Corrects the R0 caveat: both enumerated adapters are real paravirt hardware GPUs -- there is NO software-render adapter in this enum.) The human-readable "RTX 5080" model NAME is a LUID->PCI-vendor/device-id rung, deferred (dxgkrnl has no name string). NO-WAVE: zero throughput. GREEN iff (author=organ, from REAL device returns, never $?): A) enum ret==0 AND num_adapters>=2 AND every ADAPTERTYPE query ret==0; B) every adapter software_device==0 (all real hardware); C) EXACTLY ONE adapter is hybrid_discrete=1 (the 5080) and at least one is hybrid_integrated=1; D) the discrete value != the integrated value (not a stuck constant); E) TAMPER matrix all distinct from the real ret=0: T1 bogus type(8)!=0, T2 bogus ioctl code!=0, T3 query on a non-dxg fd(/dev/null)!=0. Marker -> knowledge/status/gpu_dxg.log (DXGINFOGATE). Raw syscalls only (no libvulkan/cuda/dxcore/libc). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx _gpu_dxg_adapterinfo_gate.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 p sys_write sys_openat_rd sys_exit sys_mmap sys_ioctl n sys_mmap ↻ sys_write ↻ query sys_mmap ↻ sys_ioctl ↻ x p ↻ sys_mmap ↻ sys_write ↻ sys_close sys_openat_append fp sys_write ↻ sys_write ↻

structs

none

consts

27const ENUM2_CODE: i64 = 0xC0104714 // LX_DXENUMADAPTERS2 (R0)
28const QAI_CODE: i64 = 0xC0184709 // LX_DXQUERYADAPTERINFO, 24-byte struct (R1 recon-pinned)
29const QAI_BOGUS: i64 = 0x99184709 // magic-0x99 tamper of the query code

functions

31func p(s: *u8) -> i64 { var nn: i64=0; while s[nn]!=(0 as u8){nn=nn+1} sys_write(1,s,nn); return 0 }
called by 2: xmain calls 1: sys_write
32func fp(fd: i64, s: *u8) -> i64 { var nn: i64=0; while s[nn]!=(0 as u8){nn=nn+1} sys_write(fd,s,nn); return 0 }
called by 1: main calls 1: sys_write
33func n(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; 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(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
34func x(v: i64) -> i64 { p("0x" as *u8); let bb:*u8=sys_mmap(20); var k:i64=0; var m:i64=v; if m==0{bb[0]=48;k=1}; while m>0{ let d:i64=m&15; if d<10{bb[k]=(48+d) as u8}else{bb[k]=(87+d) as u8}; m=(m>>4); k=k+1 } var i:i64=0; let o:*u8=sys_mmap(20); while i<k{o[i]=bb[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
called by 1: main calls 3: psys_mmapsys_write
37func query(code: i64, fd: i64, handle: i64, qtype: i64, priv: *u8, psize: i64) -> i64
called by 1: main calls 2: sys_mmapsys_ioctl
47func main() -> i64