mirror of
https://github.com/reactos/reactos.git
synced 2025-07-10 07:24:13 +00:00
[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
This commit is contained in:
parent
527622e72f
commit
acd7f5a3da
1 changed files with 34 additions and 2 deletions
|
@ -304,9 +304,15 @@ KiGetFeatureBits(VOID)
|
||||||
FeatureBits &= ~KF_WORKING_PTE;
|
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 */
|
/* Check if the CPU is too old to support SYSENTER */
|
||||||
if ((Prcb->CpuType < 6) ||
|
if ((Reg[0] & 0x0FFF3FFF) < 0x00000633)
|
||||||
((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303)))
|
|
||||||
{
|
{
|
||||||
/* Disable it */
|
/* Disable it */
|
||||||
Reg[3] &= ~0x800;
|
Reg[3] &= ~0x800;
|
||||||
|
@ -475,6 +481,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 the Feature Bits */
|
||||||
return FeatureBits;
|
return FeatureBits;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue