Rev 485 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
485 | heavyiron | 1 | ;////////////////////////////////////////////// |
2 | ;Decoding Brand ID for Intel |
||
3 | |||
4 | |||
5 | |||
6 | decodebrand: |
||
7 | |||
8 | |||
9 | cmp dword[smallvendor], 'cAMD' |
||
10 | jz amd_br |
||
11 | cmp dword[smallvendor], 'ntel' |
||
12 | jz intel_br |
||
13 | jmp Bi00 ; if not AMD or Intel |
||
14 | |||
15 | amd_br: ;;;;;;;;;;;;;;;;;;;;; amd brand |
||
16 | |||
17 | xor eax,eax |
||
18 | inc eax |
||
19 | cpuid |
||
20 | |||
21 | cnnn0: |
||
532 | diamond | 22 | test bl, bl |
23 | jz cnnn1 |
||
485 | heavyiron | 24 | |
25 | rr: |
||
26 | mov byte [brand], bl ; |
||
27 | Text 60,250,0x00000000,abrand00, abrand00len-abrand00 |
||
532 | diamond | 28 | ret |
485 | heavyiron | 29 | ;jmp comppp |
30 | |||
31 | cnnn1: |
||
32 | |||
33 | mov eax, 0x80000001 ; CPUID ext. function 0x80000001 |
||
34 | cpuid |
||
35 | |||
532 | diamond | 36 | test ebx, ebx |
485 | heavyiron | 37 | je Bi00 |
532 | diamond | 38 | mov [brand], ebx ; |
485 | heavyiron | 39 | |
40 | comppp: |
||
532 | diamond | 41 | cmp byte [brand+1], 4 |
42 | jb res1 |
||
43 | jz res2 |
||
44 | ja res3 |
||
485 | heavyiron | 45 | |
46 | |||
47 | res1: |
||
48 | Text 60,250,0x00000000,abrand0, abrand0len-abrand0 |
||
532 | diamond | 49 | ret |
485 | heavyiron | 50 | |
51 | res2: |
||
52 | Text 60,250,0x00000000,abrand1, abrand1len-abrand1 |
||
532 | diamond | 53 | ret |
485 | heavyiron | 54 | |
55 | res3: |
||
56 | Text 60,250,0x00000000,abrand2, abrand2len-abrand2 |
||
532 | diamond | 57 | ret |
485 | heavyiron | 58 | ;;;;;;;;;;;;;;;;;;;;; intel brand |
59 | intel_br: |
||
60 | xor eax,eax |
||
61 | inc eax |
||
62 | cpuid |
||
532 | diamond | 63 | movzx ebx, bl |
64 | mov [brand], ebx |
||
485 | heavyiron | 65 | cmp0: |
532 | diamond | 66 | test ebx, ebx |
485 | heavyiron | 67 | je Bi00 |
68 | |||
69 | cmp1: |
||
532 | diamond | 70 | dec ebx |
485 | heavyiron | 71 | je Bi01 |
72 | |||
73 | cmp2: |
||
532 | diamond | 74 | dec ebx |
485 | heavyiron | 75 | je Bi02 |
76 | |||
77 | cmp3: |
||
532 | diamond | 78 | dec ebx |
485 | heavyiron | 79 | je Bi03 |
80 | |||
81 | cmp4: |
||
532 | diamond | 82 | dec ebx |
485 | heavyiron | 83 | je Bi04 |
84 | |||
85 | cmp6: |
||
532 | diamond | 86 | dec ebx |
87 | dec ebx |
||
485 | heavyiron | 88 | je Bi06 |
89 | |||
90 | cmp7: |
||
532 | diamond | 91 | dec ebx |
485 | heavyiron | 92 | je Bi07 |
93 | |||
94 | cmp8: |
||
532 | diamond | 95 | dec ebx |
485 | heavyiron | 96 | je Bi08 |
97 | |||
98 | cmp9: |
||
532 | diamond | 99 | dec ebx |
485 | heavyiron | 100 | je Bi09 |
101 | |||
102 | cmpA: |
||
532 | diamond | 103 | dec ebx |
485 | heavyiron | 104 | je Bi0A |
105 | |||
106 | cmpB: |
||
532 | diamond | 107 | dec ebx |
485 | heavyiron | 108 | je Bi0B |
109 | |||
110 | cmpC: |
||
532 | diamond | 111 | dec ebx |
485 | heavyiron | 112 | je Bi0C |
113 | |||
114 | cmpE: |
||
532 | diamond | 115 | dec ebx |
116 | dec ebx |
||
485 | heavyiron | 117 | je Bi0E |
118 | |||
119 | cmpF: |
||
532 | diamond | 120 | dec ebx |
485 | heavyiron | 121 | je Bi0F |
122 | |||
123 | cmp11: |
||
532 | diamond | 124 | dec ebx |
125 | dec ebx |
||
485 | heavyiron | 126 | je Bi11 |
127 | |||
128 | cmp12: |
||
532 | diamond | 129 | dec ebx |
485 | heavyiron | 130 | je Bi12 |
131 | |||
132 | cmp13: |
||
532 | diamond | 133 | dec ebx |
485 | heavyiron | 134 | je Bi13 |
135 | |||
136 | cmp14: |
||
532 | diamond | 137 | dec ebx |
485 | heavyiron | 138 | je Bi14 |
139 | |||
140 | cmp15: |
||
532 | diamond | 141 | dec ebx |
485 | heavyiron | 142 | je Bi15 |
143 | |||
144 | cmp16: |
||
532 | diamond | 145 | dec ebx |
485 | heavyiron | 146 | je Bi16 |
147 | |||
148 | cmp17: |
||
532 | diamond | 149 | dec ebx |
485 | heavyiron | 150 | je Bi17 |
151 | |||
152 | ;------------------ |
||
153 | Bi00: |
||
154 | Text 60,250,0x00000000,brand0, brand0len-brand0 |
||
155 | ;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11 |
||
532 | diamond | 156 | ret |
485 | heavyiron | 157 | |
158 | Bi01: |
||
159 | Text 60,250,0x00000000,brand01, brand01len-brand01 |
||
532 | diamond | 160 | ret |
485 | heavyiron | 161 | |
162 | Bi02: |
||
163 | Text 60,250,0x00000000,brand02, brand02len-brand02 |
||
532 | diamond | 164 | ret |
485 | heavyiron | 165 | |
166 | Bi03: |
||
167 | |||
168 | cmp [m], 8 |
||
169 | je E3 |
||
170 | Text 60,250,0x00000000,brand03, brand03len-brand03 |
||
532 | diamond | 171 | ret |
485 | heavyiron | 172 | E3: |
173 | Text 60,250,0x00000000,brand03d, brand03dlen-brand03d |
||
532 | diamond | 174 | ret |
485 | heavyiron | 175 | |
176 | Bi04: |
||
177 | Text 60,250,0x00000000,brand04, brand04len-brand04 |
||
532 | diamond | 178 | ret |
485 | heavyiron | 179 | |
180 | Bi06: |
||
181 | Text 60,250,0x00000000,brand06, brand06len-brand06 |
||
532 | diamond | 182 | ret |
485 | heavyiron | 183 | |
184 | Bi07: |
||
185 | Text 60,250,0x00000000,brand07, brand07len-brand07 |
||
532 | diamond | 186 | ret |
485 | heavyiron | 187 | |
188 | Bi08: |
||
189 | Text 60,250,0x00000000,brand08, brand08len-brand08 |
||
532 | diamond | 190 | ret |
485 | heavyiron | 191 | |
192 | Bi09: |
||
193 | Text 60,250,0x00000000,brand09, brand09len-brand09 |
||
532 | diamond | 194 | ret |
485 | heavyiron | 195 | |
196 | Bi0A: |
||
197 | Text 60,250,0x00000000,brand0A, brand0Alen-brand0A |
||
532 | diamond | 198 | ret |
485 | heavyiron | 199 | |
200 | Bi0B: |
||
201 | |||
202 | cmp [m], 13 |
||
203 | jl Eb |
||
204 | Text 60,250,0x00000000,brand0B, brand0Blen-brand0B |
||
532 | diamond | 205 | ret |
485 | heavyiron | 206 | Eb: |
207 | Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd |
||
532 | diamond | 208 | ret |
485 | heavyiron | 209 | |
210 | Bi0C: |
||
211 | Text 60,250,0x00000000,brand0C, brand0Clen-brand0C |
||
532 | diamond | 212 | ret |
485 | heavyiron | 213 | |
214 | Bi0E: |
||
215 | |||
216 | cmp [m], 13 |
||
217 | jl Ed |
||
218 | Text 60,250,0x00000000,brand0E, brand0Elen-brand0E |
||
532 | diamond | 219 | ret |
485 | heavyiron | 220 | Ed: |
221 | Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed |
||
532 | diamond | 222 | ret |
485 | heavyiron | 223 | |
224 | Bi0F: |
||
225 | Text 60,250,0x00000000,brand0F, brand0Flen-brand0F |
||
532 | diamond | 226 | ret |
485 | heavyiron | 227 | |
228 | Bi11: |
||
229 | Text 60,250,0x00000000,brand11, brand11len-brand11 |
||
532 | diamond | 230 | ret |
485 | heavyiron | 231 | |
232 | Bi12: |
||
233 | Text 60,250,0x00000000,brand12, brand12len-brand12 |
||
532 | diamond | 234 | ret |
485 | heavyiron | 235 | |
236 | Bi13: |
||
237 | Text 60,250,0x00000000,brand13, brand13len-brand13 |
||
532 | diamond | 238 | ret |
485 | heavyiron | 239 | |
240 | Bi14: |
||
241 | Text 60,250,0x00000000,brand14, brand14len-brand14 |
||
532 | diamond | 242 | ret |
485 | heavyiron | 243 | |
244 | Bi15: |
||
245 | Text 60,250,0x00000000,brand15, brand15len-brand15 |
||
532 | diamond | 246 | ret |
485 | heavyiron | 247 | |
248 | Bi16: |
||
249 | Text 60,250,0x00000000,brand16, brand16len-brand16 |
||
532 | diamond | 250 | ret |
485 | heavyiron | 251 | |
252 | Bi17: |
||
253 | Text 60,250,0x00000000,brand17, brand17len-brand17 |
||
532 | diamond | 254 | ret |