code wiki / _hdl_build / _gpu_dxg_r4b_recon.nx
_gpu_dxg_r4b_recon.nx
buildroot/runtime/_hdl_build/_gpu_dxg_r4b_recon.nx
about
_gpu_dxg_r4b_recon.nx -- SOVEREIGN-GPU ladder R4b RECON (read the REAL VRAM budget of the 5080).
LX_DXQUERYVIDEOMEMORYINFO (nr=0x0a in the dxgkrnl table -- consistent with every confirmed code:
open=0x01, device=0x02, ctxvirtual=0x04, queryadapterinfo=0x09, enum=0x14) returns the adapter's REAL
video-memory budget/usage -- an UNFAKEABLE number (~tens of GB) proving we read the actual GPU state,
far beyond opaque handle allocation. Best-guess struct:
d3dkmt_queryvideomemoryinfo: process @0 (u64, 0=current); adapter @8 (d3dkmthandle, in);
memory_segment_group @12 (u32, 0=LOCAL/VRAM); budget @16 (u64, out); current_usage @24 (out);
current_reservation @32 (out); available_for_reservation @40 (out); physical_adapter_index @48 (in). ~56B
No uapi header -> discover live: sweep sizes for nr=0x0a, adapter at offset 8, and on ret==0 DUMP all
u64 slots so the budget (a large value) is located. raw syscalls only. No log writes. 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
| 14 | const ENUM2_CODE: i64 = 0xC0104714 |
| 15 | const QAI_CODE: i64 = 0xC0184709 |
functions
| 17 | func p(s: *u8) -> i64 { var nn: i64=0; while s[nn]!=(0 as u8){nn=nn+1} sys_write(1,s,nn); return 0 } |
| 18 | func 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 } |
| 19 | func 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 } |
| 20 | func iowr(nr: i64, size: i64) -> i64 { return (3 << 30) | ((size & 0x3fff) << 16) | (0x47 << 8) | (nr & 0xff) } called by 1: main |
| 21 | func rd32(buf: *u8, off: i64) -> i64 { return (buf[off] as i64)|((buf[off+1] as i64)<<8)|((buf[off+2] as i64)<<16)|((buf[off+3] as i64)<<24) } |
| 22 | func rd64(buf: *u8, off: i64) -> i64 { let q: *i64 = (buf as i64 + off) as *i64; return q[0] } called by 1: main |
| 24 | func query_type(fd: i64, handle: i64, qtype: i64, psize: i64, outv: *i64) -> i64 |
| 33 | func main() -> i64 |