[NTOSKRNL]

Alternative workaround for pentium lock errata: Instead of burdening the page fault handler, just mark the IDT page as Write-Through if the bug is present. According to http://www.rcollins.org/Errata/Dec97/F00FBug.html it shall prevent the lock up. Please test. Dedicated to elhoir.

svn path=/trunk/; revision=49018
This commit is contained in:
Timo Kreuzer 2010-10-06 14:39:56 +00:00
parent 90bd7eaa64
commit 82280e1435
3 changed files with 10 additions and 9 deletions

View file

@ -37,7 +37,6 @@ ULONG KeLargestCacheLine = 0x40;
ULONG KiDmaIoCoherency = 0;
CHAR KeNumberProcessors = 0;
KAFFINITY KeActiveProcessors = 1;
BOOLEAN KiI386PentiumLockErrataPresent;
BOOLEAN KiSMTProcessorsPresent;
/* Freeze data */

View file

@ -1176,14 +1176,6 @@ KiTrap0EHandler(IN PKTRAP_FRAME TrapFrame)
/* Save CR2 */
Cr2 = __readcr2();
/* Check for Pentium LOCK errata */
if (KiI386PentiumLockErrataPresent)
{
/* Not yet implemented */
UNIMPLEMENTED;
while (TRUE);
}
/* HACK: Check if interrupts are disabled and enable them */
if (!(TrapFrame->EFlags & EFLAGS_INTERRUPT_MASK))
{

View file

@ -567,6 +567,16 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
//
MiFirstReservedZeroingPte->u.Hard.PageFrameNumber = MI_ZERO_PTES - 1;
/* Check for Pentium LOCK errata */
if (KiI386PentiumLockErrataPresent)
{
/* Mark the 1st IDT page as Write-Through to prevent a lockup
on a FOOF instruction.
See http://www.rcollins.org/Errata/Dec97/F00FBug.html */
PointerPte = MiAddressToPte(KeGetPcr()->IDT);
PointerPte->u.Hard.WriteThrough = 1;
}
return STATUS_SUCCESS;
}