*/
#include "arch/x86/cpuid.hh"
+
#include "base/bitfield.hh"
#include "cpu/thread_context.hh"
enum StandardCpuidFunction {
VendorAndLargestStdFunc,
FamilyModelStepping,
+ CacheAndTLB,
+ SerialNumber,
+ CacheParams,
+ MonitorMwait,
+ ThermalPowerMgmt,
+ ExtendedFeatures,
NumStandardCpuidFuncs
};
L1CacheAndTLB,
L2L3CacheAndL2TLB,
APMInfo,
-
+ LongModeAddressSize,
+
/*
* The following are defined by the spec but not yet implemented
*/
-/* LongModeAddressSize,
- // Function 9 is reserved
+/* // Function 9 is reserved
SVMInfo = 10,
// Functions 11-24 are reserved
TLB1GBPageInfo = 25,
result = CpuidResult(0x80000018, 0x68747541,
0x69746e65, 0x444d4163);
break;
-/* case LongModeAddressSize:
- case SVMInfo:
+ case LongModeAddressSize:
+ result = CpuidResult(0x00003030, 0x00000000,
+ 0x00000000, 0x00000000);
+ break;
+/* case SVMInfo:
case TLB1GBPageInfo:
case PerformanceInfo:*/
default:
- warn("x86 cpuid: unimplemented function %u", funcNum);
+ warn("x86 cpuid family 0x8000: unimplemented function %u",
+ funcNum);
return false;
}
- } else if(family == 0x0000) {
+ } else if (family == 0x0000) {
// The standard functions
switch (funcNum) {
case VendorAndLargestStdFunc:
stringToRegister(vendorString + 8));
break;
case FamilyModelStepping:
- result = CpuidResult(0x00020f51, 0000000405,
- 0xe7d3fbff, 0x00000001);
+ result = CpuidResult(0x00020f51, 0x00000805,
+ 0xe7dbfbff, 0x00000209);
+ break;
+ case ExtendedFeatures:
+ result = CpuidResult(0x00000000, 0x01800000,
+ 0x00000000, 0x00000000);
break;
default:
- warn("x86 cpuid: unimplemented function %u", funcNum);
+ warn("x86 cpuid family 0x0000: unimplemented function %u",
+ funcNum);
return false;
}
} else {