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/x86efi/ident-bounds-20261104/id-fbcf0882.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 / x86efi / ident-bounds-20261104 / id-fbcf0882.om` 226 lines ยท 3397 bytes Raw Blame History 1 target x86efi 2 note efi 14 identity: the CPUID brand string, SystemTable FirmwareVendor (UCS-2 to ASCII, ? outside 3 note 32..126), SMBIOS type 1 Manufacturer/Product/Version (never Serial or UUID), then one hex line 4 note per refusal or edge result. FirmwareRevision goes after the ==B block (it depends on the OVMF build). 5 global ms uchar 256 6 global ml ulong 1 7 global cb uchar 16 8 global br uchar 48 9 global vb uchar 256 10 global sb uchar 8192 11 global pb uchar 8 12 13 fn pc c ulong to void 14 put ms get ml 0 uchar c 15 put ml 0 add get ml 0 1 16 end 17 18 fn nl to void 19 pc 10 20 r = efi 13 0 ms 0 get ml 0 21 put ml 0 0 22 end 23 24 fn ps c ulong to void 25 if and ge c 32 le c 126 26 pc c 27 else 28 pc 63 29 end 30 end 31 32 fn hx v ulong n ulong to void 33 i = ulong 0 34 while lt i n 35 d = and shr v mul sub sub n 1 i 4 15 36 if lt d 10 37 pc add 48 d 38 else 39 pc add 87 d 40 end 41 i = add i 1 42 end 43 end 44 45 fn rd4 k ulong to ulong 46 v = ulong 0 47 for i ulong 4 48 v = or v shl ulong get cb add k i mul i 8 49 end 50 ret v 51 end 52 53 note CPUID leaf l into cb; returns efi 14's result 54 fn cpu l ulong to ulong 55 ret efi 14 shl l 16 cb 0 16 56 end 57 58 fn brand to void 59 r = cpu `2147483648` 60 if or ne r 16 lt rd4 0 `2147483652` 61 pc 45 62 ret 63 end 64 for j ulong 3 65 r = cpu add `2147483650` j 66 for k ulong 16 67 put br add mul j 16 k get cb k 68 end 69 end 70 s = ulong 0 71 while and lt s 48 or eq ulong get br s 32 eq ulong get br s 0 72 s = add s 1 73 end 74 e = ulong 48 75 while and gt e s or eq ulong get br sub e 1 32 eq ulong get br sub e 1 0 76 e = sub e 1 77 end 78 if eq e s 79 pc 45 80 end 81 i = s 82 while lt i e 83 ps ulong get br i 84 i = add i 1 85 end 86 end 87 88 fn vendor to void 89 r = efi 14 1 vb 0 256 90 if or ge r `9223372036854775808` eq r 0 91 pc 45 92 ret 93 end 94 for k ulong div r 2 95 ps or ulong get vb mul k 2 shl ulong get vb add mul k 2 1 8 96 end 97 end 98 99 note SMBIOS string number n of the structure at p (formatted length at p+1), or - when absent 100 fn sstr p ulong n ulong t ulong to void 101 if eq n 0 102 pc 45 103 ret 104 end 105 q = add p ulong get sb add p 1 106 c = ulong 1 107 while and lt q t lt c n 108 if eq ulong get sb q 0 109 c = add c 1 110 end 111 q = add q 1 112 end 113 if or ge q t eq ulong get sb q 0 114 pc 45 115 ret 116 end 117 while and lt q t ne ulong get sb q 0 118 ps ulong get sb q 119 q = add q 1 120 end 121 end 122 123 note true when sb[q] and sb[q+1] are both 0 (the end of a structure's string set) 124 fn dnul q ulong to bool 125 ret and eq ulong get sb q 0 eq ulong get sb add q 1 0 126 end 127 128 fn smbios to void 129 t = efi 14 3 sb 0 8192 130 if or ge t `9223372036854775808` lt t 4 131 pc 45 132 ret 133 end 134 p = ulong 0 135 while lt add p 4 t 136 ty = ulong get sb p 137 ln = ulong get sb add p 1 138 if eq ty 1 139 if lt ln 8 140 pc 45 141 ret 142 end 143 sstr p ulong get sb add p 4 t 144 pc 47 145 sstr p ulong get sb add p 5 t 146 pc 47 147 sstr p ulong get sb add p 6 t 148 ret 149 end 150 if or eq ty 127 lt ln 4 151 pc 45 152 ret 153 end 154 q = add p ln 155 while and lt add q 1 t not dnul q 156 q = add q 1 157 end 158 p = add q 2 159 end 160 pc 45 161 end 162 163 fn line v ulong to void 164 hx v 16 165 nl 166 end 167 168 fn main to ulong 169 pc 61 170 pc 61 171 pc 66 172 nl 173 pc 98 174 pc 114 175 pc 61 176 brand 177 nl 178 pc 102 179 pc 119 180 pc 61 181 vendor 182 nl 183 pc 115 184 pc 109 185 pc 61 186 smbios 187 nl 188 note sub 3 at position 4: 8 bytes equal to the table's bytes 4..11 189 r = efi 14 or ulong 3 shl ulong 4 16 pb 0 8 190 ok = eq r 8 191 for k ulong 8 192 if ne get pb k get sb add k 4 193 ok = false 194 end 195 end 196 if ok 197 pc 112 198 pc 111 199 pc 115 200 pc 32 201 pc 111 202 pc 107 203 else 204 pc 63 205 end 206 nl 207 line efi 14 3 pb 0 0 208 line efi 14 or ulong 3 shl ulong `1048575` 16 pb 0 8 209 line efi 14 0 cb 0 16 210 line efi 14 0 cb 0 15 211 line efi 14 shl ulong 1 48 cb 0 16 212 line efi 14 4 cb 0 16 213 line efi 14 65537 cb 0 16 214 line efi 14 256 cb 0 16 215 pc 61 216 pc 61 217 pc 69 218 nl 219 pc 61 220 pc 61 221 pc 82 222 pc 32 223 hx efi 14 2 cb 0 0 8 224 nl 225 ret 0 226 end