Author: tkreuzer
Date: Thu Oct 22 01:22:46 2009
New Revision: 43677
URL:
http://svn.reactos.org/svn/reactos?rev=43677&view=rev
Log:
[NTOSKRNL]
- Comment out some instructions in KiRestoreProcessorControlState for now
- move the FreeLdr debugprint hack
- Don't increment RIP on an int3
- improve debugprint for KiInvalidOpcodeFault
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] Thu Oct 22
01:22:46 2009
@@ -468,8 +468,8 @@
/* Restore GDT, IDT, LDT and TSS */
__lgdt(&ProcessorState->SpecialRegisters.Gdtr.Limit);
- __lldt(&ProcessorState->SpecialRegisters.Ldtr);
- __ltr(&ProcessorState->SpecialRegisters.Tr);
+// __lldt(&ProcessorState->SpecialRegisters.Ldtr);
+// __ltr(&ProcessorState->SpecialRegisters.Tr);
__lidt(&ProcessorState->SpecialRegisters.Idtr.Limit);
__ldmxcsr(&ProcessorState->SpecialRegisters.MxCsr);
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Thu Oct 22
01:22:46 2009
@@ -701,14 +701,14 @@
/* Setup the IDT */
KeInitExceptions();
+ /* HACK: misuse this function to pass a function pointer to kdcom */
+ KdDebuggerInitialize1((PVOID)FrLdrDbgPrint);
+
/* Initialize debugging system */
KdInitSystem(0, KeLoaderBlock);
/* Check for break-in */
// if (KdPollBreakIn()) DbgBreakPointWithStatus(1);
-
- /* HACK: misuse this function to pass a function pointer to kdcom */
- KdDebuggerInitialize1((PVOID)FrLdrDbgPrint);
/* Hack! Wait for the debugger! */
while (!KdPollBreakIn());
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Thu Oct 22
01:22:46 2009
@@ -29,6 +29,9 @@
_MsgUnexpectedInterrupt:
.ascii "UnexpectedInterrupt\n\0"
+
+_MsgInvalidOpcodeFault:
+.ascii "General protection fault at %p!\n\0"
/* Helper Macros *************************************************************/
@@ -267,9 +270,6 @@
mov rdx, rbp
call _FrLdrDbgPrint[rip]
- /* Increase Rip to skip the int3 */
- inc qword ptr [rbp + KTRAP_FRAME_Rip]
-
DISPATCH_EXCEPTION STATUS_BREAKPOINT, 3, 0, 0, 0
/* Return */
@@ -310,9 +310,18 @@
push 0
.allocstack 0x8
- UNIMPLEMENTED KiInvalidOpcodeFault
-
- jmp $
+ ENTER_TRAP_FRAME (SIZE_EXCEPTION_RECORD + 0x28), 0
+
+// DISPATCH_EXCEPTION STATUS_BREAKPOINT, 3, 0, 0, 0
+
+ mov rdx, [rbp + KTRAP_FRAME_Rip]
+ lea rcx, _MsgInvalidOpcodeFault[rip]
+ call _FrLdrDbgPrint[rip]
+ jmp $
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
.endproc
.proc KiNpxNotAvailableFault