From: Jérôme Gardou Date: Mon, 7 Mar 2011 13:33:10 +0000 (+0000) Subject: [NTOSKRNL] X-Git-Tag: ReactOS-0.3.13~52 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=acd7f5a3da6b85bf5865ddd20456fd0c5061c8ff;ds=sidebyside [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. svn path=/trunk/; revision=50991 --- diff --git a/reactos/ntoskrnl/ke/i386/cpu.c b/reactos/ntoskrnl/ke/i386/cpu.c index 2606297c1b4..4b56a2b9f26 100644 --- a/reactos/ntoskrnl/ke/i386/cpu.c +++ b/reactos/ntoskrnl/ke/i386/cpu.c @@ -303,10 +303,16 @@ 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 */ - if ((Prcb->CpuType < 6) || - ((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303))) + if ((Reg[0] & 0x0FFF3FFF) < 0x00000633) { /* Disable it */ Reg[3] &= ~0x800; @@ -474,6 +480,32 @@ KiGetFeatureBits(VOID) } } } + + 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;