2 Copyright © 2000, The AROS Development Team. All rights reserved.
5 Desc: Probe installed Intel CPUs and display relevant information
9 /* BIG TO DO - SEPERATE THE INDIVIDUAL PROCESSOR FAMILY "PROBES" INTO RUNTIME SHARED LIBS OR SIMILAR */
11 /****************************************************************************************************
14 i386 compatable families...
15 Intel P5/P54C/P55C/P24T/P6/P2/P3/PM/Itanium(IA-64)
17 *****************************************************************************************************/
21 /********************************************
23 ********************************************/
25 #define i386_intel_MAXBRANDS 23
26 char *i386_intel_Brands
[i386_intel_MAXBRANDS
] = {
28 "0.18 µm Intel Celeron processor",
29 "0.18 µm Intel Pentium III processor",
30 "0.18 µm Intel Pentium III Xeon processor/0.13 µm Intel Celeron",
31 "0.13 µm Intel Pentium III processor",
34 "0.13 µm Intel Celeron mobile processor",
35 "0.18 µm Intel Pentium 4 processor/0.13 µm Intel Celeron 4 mobile (0F24h)",
36 "0.13 µm Intel Pentium 4 processor",
37 "0.18 µm Intel Celeron 4 ",
38 "0.18 µm Intel Pentium 4 Xeon MP/0.13 µm Intel Pentium 4 Xeon ",
39 "0.13 µm Intel Pentium 4 Xeon MP",
41 "0.13 µm Intel Pentium 4 mobile (production)",
42 "0.13 µm Intel Celeron 4 mobile (0F27h)/0.13 µm Intel Pentium 4 mobile (samples)",
49 "0.13 µm Intel Pentium M",
52 /********************************************
54 ********************************************/
56 char *Intel_feature_flags
[] = {
57 "FPU : Floating Point Unit",
58 "VME : Virtual 8086 Mode Enhancements",
59 "DE : Debugging Extensions",
60 "PSE : Page Size Extensions",
61 "TSC : Time Stamp Counter",
62 "MSR : Model Specific Registers",
63 "PAE : Physical Address Extension",
64 "MCE : Machine Check Exception",
65 "CX8 : COMPXCHG8B Instruction",
66 "APIC : On-chip Advanced Programmable Interrupt Controller present and enabled",
68 "SEP : Fast System Call",
69 "MTRR : Memory Type Range Registers",
70 "PGE : PTE Global Flag",
71 "MCA : Machine Check Architecture",
72 "CMOV : Conditional Move and Compare Instructions",
73 "FGPAT : Page Attribute Table",
74 "PSE-36 : 36-bit Page Size Extension",
75 "PN : Processor Serial Number present and enabled",
76 "CLFSH : CFLUSH instruction",
79 "ACPI : Thermal Monitor and Clock Ctrl",
80 "MMX : MMX instruction set",
81 "FXSR : Fast FP/MMX Streaming SIMD Extensions save/restore",
82 "SSE : Streaming SIMD Extensions instruction set",
83 "SSE2 : SSE2 extensions",
85 "HT : Hyper Threading",
86 "TM : Thermal monitor",
91 /********************************************
92 Intel specific information
93 ********************************************/
95 /* Decode Intel TLB and cache info descriptors */
97 char *i386_intel_TLB_decode ( int tlb
, char *BUFF_STR
)
100 if(tlb
!= 0) sprintf( BUFF_STR
,"%02x: ",tlb
);
102 sprintf( BUFF_STR
," ");
109 sprintf( BUFF_STR
,"Instruction TLB: 4KB pages, 4-way set assoc, 32 entries\n" );
112 sprintf( BUFF_STR
,"Instruction TLB: 4MB pages, 4-way set assoc, 2 entries\n" );
115 sprintf( BUFF_STR
,"Data TLB: 4KB pages, 4-way set assoc, 64 entries\n" );
118 sprintf( BUFF_STR
,"Data TLB: 4MB pages, 4-way set assoc, 8 entries\n" );
121 sprintf( BUFF_STR
,"1st-level instruction cache: 8KB, 4-way set assoc, 32 byte line size\n" );
124 sprintf( BUFF_STR
,"1st-level instruction cache: 16KB, 4-way set assoc, 32 byte line size\n" );
127 sprintf( BUFF_STR
,"1st-level data cache: 8KB, 2-way set assoc, 32 byte line size\n" );
130 sprintf( BUFF_STR
,"1st-level data cache: 16KB, 4-way set assoc, 32 byte line size\n" );
135 sprintf( BUFF_STR
,"No 2nd-level cache, or if 2nd-level cache exists, no 3rd-level cache\n" );
138 sprintf( BUFF_STR
,"2nd-level cache: 128KB, 4-way set assoc, 32 byte line size\n" );
141 sprintf( BUFF_STR
,"2nd-level cache: 256KB, 4-way set assoc, 32 byte line size\n" );
144 sprintf( BUFF_STR
,"2nd-level cache: 512KB, 4-way set assoc, 32 byte line size\n" );
147 sprintf( BUFF_STR
,"2nd-level cache: 1MB, 4-way set assoc, 32 byte line size\n" );
150 sprintf( BUFF_STR
,"2nd-level cache: 2MB, 4-way set assoc, 32 byte line size\n" );
155 sprintf( BUFF_STR
,"Instruction TLB: 4KB and 2MB or 4MB pages, 64 entries\n" );
158 sprintf( BUFF_STR
,"Instruction TLB: 4KB and 2MB or 4MB pages, 128 entries\n" );
161 sprintf( BUFF_STR
,"Instruction TLB: 4KB and 2MB or 4MB pages, 256 entries\n" );
164 sprintf( BUFF_STR
,"Data TLB: 4KB and 4MB pages, 64 entries\n" );
167 sprintf( BUFF_STR
,"Data TLB: 4KB and 4MB pages, 128 entries\n" );
170 sprintf( BUFF_STR
,"Data TLB: 4KB and 4MB pages, 256 entries\n" );
175 sprintf( BUFF_STR
,"1st-level data cache: 8KB, 4-way set assoc, 64 byte line size\n" );
178 sprintf( BUFF_STR
,"1st-level data cache: 16KB, 4-way set assoc, 64 byte line size\n" );
181 sprintf( BUFF_STR
,"1st-level data cache: 32KB, 4-way set assoc, 64 byte line size\n" );
186 sprintf( BUFF_STR
,"Trace cache: 12K-micro-op, 4-way set assoc\n" );
189 sprintf( BUFF_STR
,"Trace cache: 16K-micro-op, 4-way set assoc\n" );
192 sprintf( BUFF_STR
,"Trace cache: 32K-micro-op, 4-way set assoc\n" );
197 sprintf( BUFF_STR
,"2nd-level cache: 128KB, 8-way set assoc, sectored, 64 byte line size\n" );
200 sprintf( BUFF_STR
,"2nd-level cache: 256KB, 8-way set assoc, sectored, 64 byte line size\n" );
203 sprintf( BUFF_STR
,"2nd-level cache: 512KB, 8-way set assoc, sectored, 64 byte line size\n" );
206 sprintf( BUFF_STR
,"2nd-level cache: 1MB, 8-way set assoc, sectored, 64 byte line size\n" );
211 sprintf( BUFF_STR
,"2nd-level cache: 256KB, 8-way set assoc, 32 byte line size\n" );
214 sprintf( BUFF_STR
,"2nd-level cache: 512KB, 8-way set assoc 32 byte line size\n" );
217 sprintf( BUFF_STR
,"2nd-level cache: 1MB, 8-way set assoc, 32 byte line size\n" );
220 sprintf( BUFF_STR
,"2nd-level cache: 2MB, 8-way set assoc, 32 byte line size\n" );
225 sprintf( BUFF_STR
,"unknown TLB/cache descriptor\n" );
232 /********************************************/
234 void parse_i386_Intel ( int maxi
, struct i386_compat_intern
* CPUi386
)
236 struct CPU_INTERN_DATA
*global
;
237 ULONG __unused__ speed
, maxei
,unused
;
238 int __unused__ family
= 0;
239 char *BUFF_STR
, *Intel_CPU_NAME
, *Intel_CPU_IDENTITY
, *Intel_CPU_FEATURES
, *Intel_CPU_CACHE
, *Intel_CPU_ADDR
;
240 int Intel_CPU_NAME_cnt
, Intel_CPU_IDENTITY_cnt
, Intel_CPU_FEATURES_cnt
, Intel_CPU_CACHE_cnt
, Intel_CPU_ADDR_cnt
;
242 if ((global
= AllocMem(sizeof(struct CPU_INTERN_DATA
),MEMF_PUBLIC
|MEMF_CLEAR
)))
244 Intel_CPU_NAME
= global
->CPU_NAME
;
245 Intel_CPU_IDENTITY
= global
->CPU_IDENTITY
;
246 Intel_CPU_FEATURES
= global
->CPU_FEATURES
;
247 Intel_CPU_CACHE
= global
->CPU_CACHE
;
248 Intel_CPU_ADDR
= global
->CPU_ADDR
;
249 BUFF_STR
= global
->CPU_BUFF
;
251 Intel_CPU_NAME_cnt
= Intel_CPU_IDENTITY_cnt
= Intel_CPU_FEATURES_cnt
= Intel_CPU_CACHE_cnt
= Intel_CPU_ADDR_cnt
= 0;
253 Intel_CPU_FEATURES_cnt
= AddBufferLine( Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, " Intel-specific functions\n" );
255 if ( maxi
>= 1 ) /* Family/model/type etc */
257 int clf
,apic_id
,feature_flags
;
258 int extended_model
= -1,extended_family
= -1;
259 unsigned long eax
,ebx
,edx
,unused
;
260 int stepping
,model
,family
,type
,reserved
,brand
,siblings
;
263 i386_cpuid( 1, eax
, ebx
, unused
, edx
);
265 sprintf( BUFF_STR
," Version %08lx:\n",eax
);
266 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
268 stepping
= eax
& 0xf;
269 model
= (eax
>> 4) & 0xf;
270 family
= (eax
>> 8) & 0xf;
271 type
= (eax
>> 12) & 0x3;
272 reserved
= eax
>> 14;
274 clf
= (ebx
>> 8) & 0xff;
275 siblings
= (ebx
>> 16) & 0xff;
276 apic_id
= (ebx
>> 24) & 0xff;
280 sprintf( BUFF_STR
," Type [%d] - ",type
);
281 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
285 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Primary");
288 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Overdrive");
291 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Secondary");
294 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Reserved");
298 sprintf( BUFF_STR
," Family [%d] - ",family
);
299 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
303 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "i386" );
306 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "i486" );
309 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium" );
312 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium Pro" );
315 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium 4" );
317 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "\n");
321 extended_family
= (eax
>> 20) & 0xff;
322 sprintf( BUFF_STR
," Extended family %d",extended_family
);
323 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
325 switch ( extended_family
)
328 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Intel P4" );
331 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Intel Itanium 2 (IA-64)" );
336 sprintf( BUFF_STR
," Model %d - ",model
);
337 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
346 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX-25/33");
349 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX-50");
352 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486SX");
355 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX2");
358 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486SL");
361 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486SX2");
364 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX2-WB (write-back enhanced)");
367 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX4");
370 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "486DX4-WB (write-back enhanced)");
378 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P5 A-step");
381 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P5");
384 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P54C");
387 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P24T Overdrive");
390 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P55C");
393 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P54C");
396 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "P55C (0.25µm)");
404 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium Pro (P6 A-step)");
407 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium Pro (P6)");
410 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium II Model 3 (0.28 µm)");
413 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium II Model 5/Xeon/Celeron (0.25 µm)");
416 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Celeron (PII with on-die L2 cache)");
419 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium III/Pentium III Xeon external L2 cache (0.25 µm)");
422 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium III/Pentium III Xeon with 256 KB on-die L2 cache (0.18 µm)");
425 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "PM - with 1 MB on-die L2 cache (0.13 µm)");
428 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium III with 1 or 2 MB on-die L2 cache (0.18 µm)");
431 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium III with 256 or 512 KB on-die L2 cache (0.13 µm)");
440 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium 4/Celeron (0.18)");
443 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium 4/Celeron (0.13)");
446 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "Pentium 4 (0.09)");
452 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "\n");
456 extended_model
= (eax
>> 16) & 0xf;
457 sprintf( BUFF_STR
," Extended model %d\n",extended_model
);
458 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
461 sprintf( BUFF_STR
," Stepping %d\n",stepping
);
462 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
464 sprintf( BUFF_STR
," Reserved %d\n\n",reserved
);
465 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
470 sprintf( BUFF_STR
," Brand index: %d [",brand
);
471 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
472 if (brand
< i386_intel_MAXBRANDS
)
474 sprintf( BUFF_STR
,"%s]\n",i386_intel_Brands
[brand
]);
475 Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, BUFF_STR
);
477 else Intel_CPU_IDENTITY_cnt
= AddBufferLine(Intel_CPU_IDENTITY_cnt
, Intel_CPU_IDENTITY
, "not in table]\n");
480 i386_cpuid( 0x80000000, eax
, ebx
, unused
, edx
);
481 if ( eax
& 0x80000000 ) /* Extended feature/signature bits supported */
484 if( maxe
>= 0x80000004 )
488 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, " Extended brand string: \"" );
489 for( i
=0x80000002; i
<=0x80000004 ;i
++ )
491 unsigned long eax
,ebx
,ecx
,edx
;
493 i386_cpuid(i
,eax
,ebx
,ecx
,edx
);
494 Intel_CPU_NAME_cnt
= i386_sprintregs(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, eax
,ebx
,ecx
,edx
);
496 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, "\"\n");
501 sprintf( BUFF_STR
," CLFLUSH instruction cache line size: %d\n", clf
);
502 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, BUFF_STR
);
507 sprintf( BUFF_STR
," Initial APIC ID: %d\n", apic_id
);
508 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, BUFF_STR
);
511 if ( feature_flags
& (1<<28) )
513 sprintf( BUFF_STR
," Hyper threading siblings: %d\n", siblings
);
514 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, BUFF_STR
);
517 sprintf( BUFF_STR
,"\n Feature flags [%08x]:\n", feature_flags
);
518 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, BUFF_STR
);
521 if( feature_flags
& (1<<i
) )
523 sprintf( BUFF_STR
," %s\n", Intel_feature_flags
[i
] );
524 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, BUFF_STR
);
527 Intel_CPU_FEATURES_cnt
= AddBufferLine(Intel_CPU_FEATURES_cnt
, Intel_CPU_FEATURES
, "\n");
530 if ( maxi
>= 2 ) /* Decode TLB and cache info */
535 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, " TLB and cache info:\n");
536 for( i
=0; i
<ntlb
;i
++ )
538 unsigned long eax
,ebx
,ecx
,edx
;
540 i386_cpuid(2,eax
,ebx
,ecx
,edx
);
542 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( eax
>> 8, BUFF_STR
));
543 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( eax
>> 16, BUFF_STR
));
544 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( eax
>> 24, BUFF_STR
));
546 if (( ebx
& 0x80000000 ) == 0 )
548 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ebx
, BUFF_STR
));
549 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ebx
>> 8, BUFF_STR
));
550 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ebx
>> 16, BUFF_STR
));
551 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ebx
>> 24, BUFF_STR
));
553 if (( ecx
& 0x80000000 ) == 0 )
555 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ecx
, BUFF_STR
));
556 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ecx
>> 8, BUFF_STR
));
557 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ecx
>> 16, BUFF_STR
));
558 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( ecx
>> 24, BUFF_STR
));
560 if (( edx
& 0x80000000 ) == 0 )
562 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( edx
, BUFF_STR
));
563 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( edx
>> 8, BUFF_STR
));
564 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( edx
>> 16, BUFF_STR
));
565 Intel_CPU_CACHE_cnt
= AddBufferLine(Intel_CPU_CACHE_cnt
, Intel_CPU_CACHE
, i386_intel_TLB_decode( edx
>> 24, BUFF_STR
));
570 if ( maxi
>= 3 ) /* Pentium III CPU serial number */
572 unsigned long signature
,unused
,ecx
,edx
;
574 i386_cpuid(1,signature
,unused
,unused
,unused
);
575 i386_cpuid(3,unused
,unused
,ecx
,edx
);
577 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, " Processor serial: ");
579 sprintf( BUFF_STR
,"%04lX",signature
>> 16);
580 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
581 sprintf( BUFF_STR
,"-%04lX",signature
& 0xffff);
582 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
583 sprintf( BUFF_STR
,"-%04lX",edx
>> 16);
584 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
585 sprintf( BUFF_STR
,"-%04lX",edx
& 0xffff);
586 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
587 sprintf( BUFF_STR
,"-%04lX",ecx
>> 16);
588 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
589 sprintf( BUFF_STR
,"-%04lX\n",ecx
& 0xffff);
590 Intel_CPU_NAME_cnt
= AddBufferLine(Intel_CPU_NAME_cnt
, Intel_CPU_NAME
, BUFF_STR
);
593 /** DUMP ALL THE INFORMATION WE HAVE GATHERED **/
595 if ( Intel_CPU_NAME_cnt
> 0 ) printf( Intel_CPU_NAME
); /* CPUs Retail Name */
597 speed
= i386_approx_mhz();
599 /* TODO : Calculate FSB .. */
601 if ( Intel_CPU_IDENTITY_cnt
> 0 ) printf( Intel_CPU_IDENTITY
); /* CPUs Internal Name */
602 if ( Intel_CPU_FEATURES_cnt
> 0 ) printf( Intel_CPU_FEATURES
); /* CPUs Feature Set */
603 if ( Intel_CPU_ADDR_cnt
> 0 ) printf( Intel_CPU_ADDR
); /* CPUs Address Range */
604 if ( Intel_CPU_CACHE_cnt
> 0 ) printf( Intel_CPU_CACHE
); /* CPUs Cache Details */
608 printf( "ERROR: Couldn't allocate memory to parse CPU information .." );
611 FreeMem(global
,sizeof(struct CPU_INTERN_DATA
));