|
Lines 295-300
Link Here
|
| 295 |
case 0x580: |
295 |
case 0x580: |
| 296 |
strcat(cpu_model, "K6-2"); |
296 |
strcat(cpu_model, "K6-2"); |
| 297 |
break; |
297 |
break; |
|
|
298 |
case 0x590: |
| 299 |
strcat(cpu_model, "K6-III"); |
| 300 |
break; |
| 298 |
default: |
301 |
default: |
| 299 |
strcat(cpu_model, "Unknown"); |
302 |
strcat(cpu_model, "Unknown"); |
| 300 |
break; |
303 |
break; |
|
Lines 866-876
Link Here
|
| 866 |
static void |
869 |
static void |
| 867 |
print_AMD_info(void) |
870 |
print_AMD_info(void) |
| 868 |
{ |
871 |
{ |
| 869 |
u_int regs[4]; |
872 |
u_int regs[4], amd_maxregs; |
| 870 |
quad_t amd_whcr; |
873 |
quad_t amd_whcr; |
| 871 |
|
874 |
|
| 872 |
do_cpuid(0x80000000, regs); |
875 |
do_cpuid(0x80000000, regs); |
| 873 |
if (regs[0] >= 0x80000005) { |
876 |
amd_maxregs = regs[0]; |
|
|
877 |
|
| 878 |
if (amd_maxregs >= 0x80000001) { |
| 879 |
do_cpuid(0x80000001, regs); |
| 880 |
printf("AMD Extended Features=0x%b\n", regs[3], |
| 881 |
"\020" /* in hex */ |
| 882 |
"\001FPU" |
| 883 |
"\002VME" |
| 884 |
"\003DE" |
| 885 |
"\004PSE" |
| 886 |
"\005TSC" |
| 887 |
"\006K6MSR" |
| 888 |
"\007b6" |
| 889 |
"\010MCE" |
| 890 |
"\011CX8" |
| 891 |
"\012b9" |
| 892 |
"\013b10" |
| 893 |
"\014SYSCALL" |
| 894 |
"\015b12" |
| 895 |
"\016PGE" |
| 896 |
"\017b14" |
| 897 |
"\020ICMOV" |
| 898 |
"\021FCMOV" |
| 899 |
"\022b17" |
| 900 |
"\023b18" |
| 901 |
"\024b19" |
| 902 |
"\025b20" |
| 903 |
"\026b21" |
| 904 |
"\027b22" |
| 905 |
"\030MMX" |
| 906 |
"\031b24" |
| 907 |
"\032b25" |
| 908 |
"\033b26" |
| 909 |
"\034b27" |
| 910 |
"\035b28" |
| 911 |
"\036b29" |
| 912 |
"\037b30" |
| 913 |
"\0403DNow!" |
| 914 |
); |
| 915 |
} |
| 916 |
|
| 917 |
if (amd_maxregs >= 0x80000005) { |
| 874 |
do_cpuid(0x80000005, regs); |
918 |
do_cpuid(0x80000005, regs); |
| 875 |
printf("Data TLB: %d entries", (regs[1] >> 16) & 0xff); |
919 |
printf("Data TLB: %d entries", (regs[1] >> 16) & 0xff); |
| 876 |
print_AMD_assoc(regs[1] >> 24); |
920 |
print_AMD_assoc(regs[1] >> 24); |
|
Lines 884-889
Link Here
|
| 884 |
printf(", %d bytes/line", regs[3] & 0xff); |
928 |
printf(", %d bytes/line", regs[3] & 0xff); |
| 885 |
printf(", %d lines/tag", (regs[3] >> 8) & 0xff); |
929 |
printf(", %d lines/tag", (regs[3] >> 8) & 0xff); |
| 886 |
print_AMD_assoc((regs[3] >> 16) & 0xff); |
930 |
print_AMD_assoc((regs[3] >> 16) & 0xff); |
|
|
931 |
|
| 932 |
/* check for K6-III on-board L2 cache */ |
| 933 |
if (amd_maxregs >= 0x80000006) { |
| 934 |
do_cpuid(0x80000006, regs); |
| 935 |
printf("L2 (on-CPU) cache: %d kbytes", regs[2] >> 16); |
| 936 |
printf(", %d bytes/line", regs[2] & 0xff); |
| 937 |
printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); |
| 938 |
print_AMD_assoc((regs[2] >> 12) & 0x0f); |
| 939 |
} |
| 887 |
} |
940 |
} |
| 888 |
if (((cpu_id & 0xf00) == 0x500) |
941 |
if (((cpu_id & 0xf00) == 0x500) |
| 889 |
&& (((cpu_id & 0x0f0) > 0x80) |
942 |
&& (((cpu_id & 0x0f0) > 0x80) |