mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
Do not crash on Pentium.
svn path=/trunk/; revision=39959
This commit is contained in:
parent
5d5bd6fb04
commit
a8274cb5f7
1 changed files with 11 additions and 0 deletions
|
@ -107,6 +107,17 @@ NTAPI
|
|||
HalpSwitchToRealModeTrapHandlers(VOID)
|
||||
{
|
||||
ULONG Handler;
|
||||
PHARDWARE_PTE IdtPte;
|
||||
|
||||
/* On i586, the first 7 entries of IDT are write-protected, unprotect them. */
|
||||
if (KeGetCurrentPrcb()->CpuType == 5)
|
||||
{
|
||||
IdtPte = GetPteAddress(((PKIPCR)KeGetPcr())->IDT);
|
||||
IdtPte->Write = 1;
|
||||
|
||||
/* Flush the TLB by resetting CR3 */
|
||||
__writecr3(__readcr3());
|
||||
}
|
||||
|
||||
/* Save the current Invalid Opcode and General Protection Fault Handlers */
|
||||
HalpGpfHandler = ((((PKIPCR)KeGetPcr())->IDT[13].ExtendedOffset << 16) &
|
||||
|
|
Loading…
Reference in a new issue