mem-cache: Add multiple eviction stats
[gem5.git] / src / arch / x86 / cpuid.cc
index de11195e007009d711b6e3dab2eb3eb860a506e1..e6a898a08c270654d64fec9065531da56ef5a89c 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 #include "arch/x86/cpuid.hh"
+
 #include "base/bitfield.hh"
 #include "cpu/thread_context.hh"
 
@@ -36,6 +37,12 @@ namespace X86ISA {
     enum StandardCpuidFunction {
         VendorAndLargestStdFunc,
         FamilyModelStepping,
+        CacheAndTLB,
+        SerialNumber,
+        CacheParams,
+        MonitorMwait,
+        ThermalPowerMgmt,
+        ExtendedFeatures,
         NumStandardCpuidFuncs
     };
 
@@ -49,7 +56,7 @@ namespace X86ISA {
         L2L3CacheAndL2TLB,
         APMInfo,
         LongModeAddressSize,
+
         /*
          * The following are defined by the spec but not yet implemented
          */
@@ -96,15 +103,8 @@ namespace X86ISA {
                         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:
@@ -145,10 +145,11 @@ namespace X86ISA {
               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:
@@ -160,18 +161,16 @@ namespace X86ISA {
                         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 {