Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/evidence/a64efi-dgx-spark-20261112/pciid.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / evidence / a64efi-dgx-spark-20261112 / pciid.om` 155 lines ยท 2991 bytes Raw Blame History 1 note pciid.om: first contact with the machine's NVIDIA devices from Omega with no operating system and 2 note no NVIDIA software: through the firmware's PCI I/O protocol (UEFI 2.10 14.4) read each device's 3 note configuration header; for a display-class NVIDIA device whose memory decoding is on, read the two 4 note identity registers of BAR 0 (offsets 0 and 0xA00). Read only. The lines go to the console and to 5 note \OLLM\GPUID.TXT. Needs efirt.om before it (efbs, efguid, efhg, efh, the efi word). 6 global gpb uchar 64 7 global gpo uchar 4096 8 global gpn ulong 1 9 text gptx "pciio handles nv seg.bus.dev.fn id cmd class bar0 boot0 boot42 memory decoding off, registers not readno PCI I/O protocol, status " 10 text gpfile "\\OLLM\\GPUID.TXT" 11 12 fn gpc b ulong to void 13 n = get gpn 0 14 if lt n 4000 15 put gpo n uchar b 16 put gpn 0 add n 1 17 end 18 end 19 20 note gps: n bytes of gptx from offset o 21 fn gps o ulong n ulong to void 22 i = ulong 0 23 while lt i n 24 gpc ulong get gptx add o i 25 i = add i 1 26 end 27 end 28 29 note gph: v as w hex digits 30 fn gph v ulong w ulong to void 31 i = ulong 0 32 while lt i w 33 d = and shr v mul sub sub w 1 i 4 15 34 if lt d 10 35 gpc add 48 d 36 else 37 gpc add 87 d 38 end 39 i = add i 1 40 end 41 end 42 43 note gploc: "nv seg.bus.dev.fn " and the location of PCI I/O instance pio 44 fn gploc pio ulong to void 45 loc = fwadr gpb 32 32 46 gl = fwld add pio 112 8 47 s = fwcall gl pio loc add loc 8 add loc 16 add loc 24 0 48 gps 14 18 49 gph fwld loc 8 4 50 gpc 46 51 gph fwld add loc 8 8 2 52 gpc 46 53 gph fwld add loc 16 8 2 54 gpc 46 55 gph fwld add loc 24 8 1 56 end 57 58 note gpreg: one 32-bit register of BAR 0 at offset r, or ? when the read fails 59 fn gpreg pio ulong r ulong to void 60 mr = fwld add pio 16 8 61 reg = fwadr gpb 0 8 62 s = fwcall mr pio 2 0 r 1 reg 63 if eq s 0 64 gph fwld reg 4 8 65 else 66 gpc 63 67 end 68 end 69 70 note gpdev: one PCI I/O handle; a line when it is an NVIDIA device 71 fn gpdev h ulong to void 72 g = efguid `5522935658814222848` `11097520664359398558` 73 o = fwadr efh 56 8 74 hp = fwld add efbs 152 8 75 s = fwcall hp h g o 0 0 0 76 if ne s 0 77 ret 78 end 79 pio = efhg 56 80 cfg = fwadr gpb 0 32 81 rd = fwld add pio 48 8 82 s = fwcall rd pio 2 0 8 cfg 0 83 if ne s 0 84 ret 85 end 86 id = fwld cfg 4 87 if ne and id 65535 4318 88 ret 89 end 90 cmd = fwld add cfg 4 2 91 cls = shr fwld add cfg 8 4 8 92 bar = fwld add cfg 16 4 93 gploc pio 94 gps 32 4 95 gph id 8 96 gps 36 5 97 gph cmd 4 98 gps 41 7 99 gph cls 6 100 gps 48 6 101 gph bar 8 102 if eq shr cls 16 3 103 if ne and cmd 2 0 104 gps 54 7 105 gpreg pio 0 106 gps 61 8 107 gpreg pio 2560 108 else 109 gps 69 40 110 end 111 end 112 gpc 10 113 end 114 115 fn gpci to void 116 put gpn 0 0 117 bs = efbs 118 g = efguid `5522935658814222848` `11097520664359398558` 119 c = fwadr efh 32 8 120 o = fwadr efh 24 8 121 lb = fwld add bs 312 8 122 s = fwcall lb 2 g 0 c o 0 123 if ne s 0 124 gps 109 28 125 gph s 16 126 gpc 10 127 else 128 n = efhg 32 129 buf = efhg 24 130 gps 0 14 131 gph n 4 132 gpc 10 133 i = ulong 0 134 while lt i n 135 gpdev fwld add buf mul i 8 8 136 i = add i 1 137 end 138 x = fwcall fwld add bs 72 8 buf 0 0 0 0 0 139 end 140 m = get gpn 0 141 r = efi 13 0 gpo 0 m 142 k = len gpfile 143 for j ulong k 144 put gpb j get gpfile j 145 end 146 r = efi 12 65281 gpb 0 k 147 r = efi 12 65283 gpo 0 m 148 r = efi 12 65284 gpo 0 0 149 end 150 151 fn main to int 152 r = ocmain 153 gpci 154 ret r 155 end