code wiki / _hdl_build / _gpu_dxg_r1_recon.nx

_gpu_dxg_r1_recon.nx

buildroot/runtime/_hdl_build/_gpu_dxg_r1_recon.nx

11048 B205 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic gpu
docsdependenciesstructsconstsfunctions

about

_gpu_dxg_r1_recon.nx -- SCOPE/RECON probe for SOVEREIGN-GPU rung R1: adapter DESCRIPTION + positive RTX 5080 ID via LX_DXQUERYADAPTERINFO(KMTQAITYPE_ADAPTERREGISTRYINFO). RAW syscalls ONLY to /dev/dxg (no libvulkan/libcuda/libdxcore/libd3d12/libc). Reuses the R0 enum mechanism. What this recon PINS LIVE (the kernel rejects a wrong code with -ENOTTY=-25 and a wrong size/type with -EINVAL=-22, so we probe before claiming): 1. The exact LX_DXQUERYADAPTERINFO ioctl code. Encoding (same _IOWR(0x47,...) family as R0): code = (3<<30) | (24<<16) | (0x47<<8) | nr for a 24-byte struct. We sweep nr over a small range and report which nr the kernel ACCEPTS (ret==0) vs -ENOTTY. 2. struct d3dkmt_queryadapterinfo (24B): adapter_handle u32@0 / type u32@4 / private_data u64@8 / private_data_size u32@16 / reserved u32@20. 3. KMTQAITYPE_ADAPTERREGISTRYINFO type value (expected 8) -- we sweep a few type values and report which returns a real UTF-16 string. 4. Whether QueryAdapterInfo works on the ENUM handle directly, or needs LX_DXOPENADAPTERFROMLUID first. We try BOTH paths and report which path produced the real string. 5. The ACTUAL UTF-16LE adapter_string each adapter returned (decoded to ASCII for printing) so we can positively distinguish the RTX 5080 from the WSL/Microsoft software render adapter. NO-WAVE: reach + identify only. No throughput/exceed. AUTHOR=ORGAN / NO-FALSE-GREEN: every printed string is the REAL bytes the kernel wrote into private_data, never a literal. A wrong handle/type goes to a real errno, reported as-is. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx _gpu_dxg_r1_recon.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 n sys_mmap sys_write ↻ sys_exit sys_mmap ↻ sys_ioctl x p ↻ sys_mmap ↻ sys_write ↻ qai_code query_adapter_info sys_mmap ↻ sys_ioctl ↻ print_utf16 sys_mmap ↻ sys_write ↻ open_from_luid sys_mmap ↻ sys_ioctl ↻ sys_close

structs

none

consts

25const DXG_LX_DXENUMADAPTERS2: i64 = 0xC0104714
34const QAI_PRIV_SIZE: i64 = 1568

functions

36func 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 2: xmain calls 1: sys_write
37func 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
38func 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
41func qai_code(nr: i64) -> i64 { return (3<<30) | (24<<16) | (0x47<<8) | nr }
called by 1: main
45func print_utf16(base: *u8, off: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
67func query_adapter_info(fd: i64, code: i64, handle: i64, qtype: i64, priv: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_ioctl
89func open_from_luid(fd: i64, nr: i64, luid_a: i64, luid_b: i64, out_ret: *i64) -> i64
called by 1: main calls 2: sys_mmapsys_ioctl
102func main() -> i64