[NTOSKRNL]
[reactos.git] / ntoskrnl / ke / i386 / cpu.c
index 38539b1..7f3358c 100644 (file)
@@ -303,17 +303,10 @@ KiGetFeatureBits(VOID)
                 /* Remove support for correct PTE support. */
                 FeatureBits &= ~KF_WORKING_PTE;
             }
-            
-            /* Virtualbox claims to have no SYSENTER support,
-             * which is false for processors >= Pentium Pro */
-            if(Prcb->CpuType >= 6)
-            {
-                Reg[3] |= 0x800;
-            }
 
-            /* Check if the CPU is too old to support SYSENTER,
-             * See Intel CPUID instruction manual for details*/
-            if ((Reg[0] & 0x0FFF3FFF) < 0x00000633)
+            /* Check if the CPU is too old to support SYSENTER */
+            if ((Prcb->CpuType < 6) ||
+                ((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303)))
             {
                 /* Disable it */
                 Reg[3] &= ~0x800;
@@ -481,10 +474,9 @@ KiGetFeatureBits(VOID)
             }
         }
     }
-    
+
+#define print_supported(kf_value) ((FeatureBits & kf_value) ? #kf_value : "")
     DPRINT1("Supported CPU features : %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n",
-#define print_supported(kf_value) \
-    FeatureBits & kf_value ? #kf_value : ""
     print_supported(KF_V86_VIS),
     print_supported(KF_RDTSC),
     print_supported(KF_CR4),
@@ -746,7 +738,7 @@ KiGetCacheInformation(VOID)
                 /* Check if we support CPUID 0x80000006 */
                 CPUID(0x80000000, &Data[0], &Data[1], &Data[2], &Data[3]);
                 if (Data[0] >= 0x80000006)
-                {   
+                {
                     /* Get 2nd level cache and tlb size */
                     CPUID(0x80000006, &Data[0], &Data[1], &Data[2], &Data[3]);
                     
@@ -1359,7 +1351,7 @@ KiFlushNPXState(IN PFLOATING_SAVE_AREA SaveArea)
         
         /* Now load NPX state from the NPX area */
         FxSaveArea = KiGetThreadNpxArea(Thread);
-        Ke386FxStore(FxSaveArea);    
+        Ke386FxStore(FxSaveArea);
     }
     else
     {