*/
#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
};
L2L3CacheAndL2TLB,
APMInfo,
LongModeAddressSize,
-
+
/*
* The following are defined by the spec but not yet implemented
*/
stringToRegister(vendorString + 8));
break;
case FamilyModelSteppingBrandFeatures:
- /** Features Enabling
- * rdx, enabling most of the features except:
- * FXSR, FFXSR, Page1GB in EDX
- *
- * rcx, disabling most of the features except:
- * SSE4A, XOP, FMA4 in ECX
- */
result = CpuidResult(0x00020f51, 0x00000405,
- 0xe3d3fbff, 0x00010840);
+ 0xe3d3fbff, 0x00000001);
break;
case NameString1:
case NameString2:
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:
- /** Features Enabling
- * rdx, enabling most of the features except:
- * HTT in EDX
- *
- * rcx, disabling most of the features except:
- * SSE3, SSSE3, FMA, SSE41, XSAVE, AVX in ECX
- */
result = CpuidResult(0x00020f51, 0x00000805,
- 0xe7dbfbff, 0x14081201);
+ 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 {