[ros-diffs] [jgardou] 50991: [NTOSKRNL] - Print supported CPU features. - Simplify detection of non working but claimed SYSENTER support for intel processors - Workaround a virtualbox "feature" : claim that SY...

jgardou at svn.reactos.org jgardou at svn.reactos.org
Mon Mar 7 13:33:11 UTC 2011


Author: jgardou
Date: Mon Mar  7 13:33:10 2011
New Revision: 50991

URL: http://svn.reactos.org/svn/reactos?rev=50991&view=rev
Log:
[NTOSKRNL]
  - Print supported CPU features.
  - Simplify detection of non working but claimed SYSENTER support for intel processors
  - Workaround a virtualbox "feature" : claim that SYSENTER isn't supported despite the fact that it is.
Fix hang on registration of mshtml.dll in 2nd stage when using Virtualbox.

Modified:
    trunk/reactos/ntoskrnl/ke/i386/cpu.c

Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev=50991&r1=50990&r2=50991&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Mon Mar  7 13:33:10 2011
@@ -303,10 +303,16 @@
                 /* 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 */
-            if ((Prcb->CpuType < 6) ||
-                ((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303)))
+            if ((Reg[0] & 0x0FFF3FFF) < 0x00000633)
             {
                 /* Disable it */
                 Reg[3] &= ~0x800;
@@ -474,6 +480,32 @@
             }
         }
     }
+    
+    DPRINT1("Supported CPU features :\n");
+#define print_supported(kf_value) \
+    if(FeatureBits & kf_value) DPRINT1("\t" #kf_value "\n")
+    print_supported(KF_V86_VIS);
+    print_supported(KF_RDTSC);
+    print_supported(KF_CR4);
+    print_supported(KF_CMOV);
+    print_supported(KF_GLOBAL_PAGE);
+    print_supported(KF_LARGE_PAGE);
+    print_supported(KF_MTRR);
+    print_supported(KF_CMPXCHG8B);
+    print_supported(KF_MMX);
+    print_supported(KF_WORKING_PTE);
+    print_supported(KF_PAT);
+    print_supported(KF_FXSR);
+    print_supported(KF_FAST_SYSCALL);
+    print_supported(KF_XMMI);
+    print_supported(KF_3DNOW);
+    print_supported(KF_AMDK6MTRR);
+    print_supported(KF_XMMI64);
+    print_supported(KF_DTS);
+    print_supported(KF_NX_BIT);
+    print_supported(KF_NX_DISABLED);
+    print_supported(KF_NX_ENABLED);
+#undef print_supported
 
     /* Return the Feature Bits */
     return FeatureBits;




More information about the Ros-diffs mailing list