mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[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:
parent
90bd7eaa64
commit
82280e1435
3 changed files with 10 additions and 9 deletions
|
@ -37,7 +37,6 @@ ULONG KeLargestCacheLine = 0x40;
|
|||
ULONG KiDmaIoCoherency = 0;
|
||||
CHAR KeNumberProcessors = 0;
|
||||
KAFFINITY KeActiveProcessors = 1;
|
||||
BOOLEAN KiI386PentiumLockErrataPresent;
|
||||
BOOLEAN KiSMTProcessorsPresent;
|
||||
|
||||
/* Freeze data */
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue