Author: dgorbachev
Date: Thu Jul 30 19:54:21 2009
New Revision: 42306
URL:
http://svn.reactos.org/svn/reactos?rev=42306&view=rev
Log:
- Fix a bug in GPF handler, do not hang in it.
- Initialize Esp field in TSS.
Modified:
trunk/reactos/ntoskrnl/ke/i386/cpu.c
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Thu Jul 30 19:54:21 2009
@@ -650,6 +650,7 @@
KiInitializeTSS(Tss);
Tss->CR3 = __readcr3();
Tss->Esp0 = PtrToUlong(KiDoubleFaultStack);
+ Tss->Esp = PtrToUlong(KiDoubleFaultStack);
Tss->Eip = PtrToUlong(KiTrap8);
Tss->Cs = KGDT_R0_CODE;
Tss->Fs = KGDT_R0_PCR;
@@ -679,6 +680,7 @@
KiInitializeTSS(Tss);
Tss->CR3 = __readcr3();
Tss->Esp0 = PtrToUlong(KiDoubleFaultStack);
+ Tss->Esp = PtrToUlong(KiDoubleFaultStack);
Tss->Eip = PtrToUlong(KiTrap2);
Tss->Cs = KGDT_R0_CODE;
Tss->Fs = KGDT_R0_PCR;
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Thu Jul 30 19:54:21 2009
@@ -1338,7 +1338,6 @@
.globl _KiTrap8
.func KiTrap8
_KiTrap8:
-
/* Can't really do too much */
mov eax, 8
jmp _KiSystemFatalException
@@ -1511,6 +1510,7 @@
cmp eax, offset CheckPrivilegedInstruction
jbe KmodeGpf
cmp eax, offset CheckPrivilegedInstruction2
+ jae KmodeGpf
/* FIXME: TODO */
UNHANDLED_PATH