Author: ion
Date: Wed Aug 30 23:29:16 2006
New Revision: 23809
URL:
http://svn.reactos.org/svn/reactos?rev=23809&view=rev
Log:
- It should now be safe to remove the V86 ESP0 hack, since V86 mode works fine (tested on
VMWare/QEmu).
Modified:
trunk/reactos/ntoskrnl/include/internal/ke.h
trunk/reactos/ntoskrnl/ke/bug.c
trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
trunk/reactos/ntoskrnl/ke/i386/thread.c
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h Wed Aug 30 23:29:16 2006
@@ -48,6 +48,13 @@
PKINTERRUPT_ROUTINE ChainedDispatch;
PKINTERRUPT_ROUTINE *FlatDispatch;
} DISPATCH_INFO, *PDISPATCH_INFO;
+
+typedef PCHAR
+(NTAPI *PKE_BUGCHECK_UNICODE_TO_ANSI)(
+ IN PUNICODE_STRING Unicode,
+ IN PCHAR Ansi,
+ IN ULONG Length
+);
struct _KIRQ_TRAPFRAME;
struct _KPCR;
@@ -76,6 +83,7 @@
extern ULONG KeI386EFlagsOrMaskV86;
extern BOOLEAN KeI386VirtualIntExtensions;
extern KIDTENTRY KiIdt[];
+extern FAST_MUTEX KernelAddressSpaceLock;
/* MACROS *************************************************************************/
Modified: trunk/reactos/ntoskrnl/ke/bug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/bug.c?rev=2380…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/bug.c (original)
+++ trunk/reactos/ntoskrnl/ke/bug.c Wed Aug 30 23:29:16 2006
@@ -24,12 +24,10 @@
VOID
);
-extern FAST_MUTEX KernelAddressSpaceLock;
-
/* GLOBALS *******************************************************************/
-LIST_ENTRY BugcheckCallbackListHead = {NULL,NULL};
-LIST_ENTRY BugcheckReasonCallbackListHead = {NULL,NULL};
+LIST_ENTRY BugcheckCallbackListHead;
+LIST_ENTRY BugcheckReasonCallbackListHead;
ULONG KeBugCheckActive, KeBugCheckOwner;
LONG KeBugCheckOwnerRecursionCount;
PRTL_MESSAGE_RESOURCE_DATA KiBugCodeMessages;
@@ -37,13 +35,6 @@
ULONG KiHardwareTrigger;
PUNICODE_STRING KiBugCheckDriver;
ULONG_PTR KiBugCheckData[5];
-
-typedef PCHAR
-(NTAPI *PKE_BUGCHECK_UNICODE_TO_ANSI)(
- IN PUNICODE_STRING Unicode,
- IN PCHAR Ansi,
- IN ULONG Length
-);
/* PRIVATE FUNCTIONS *********************************************************/
Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S (original)
+++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S Wed Aug 30 23:29:16 2006
@@ -299,11 +299,6 @@
/* Save the Exception list */
push [ebx+KPCR_EXCEPTION_LIST]
-#if WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK // V86 HACK
- mov ecx, [ebx+KPCR_TSS]
- push [ecx+KTSS_ESP0]
-#endif
-
/* DPC shouldn't be active */
cmp byte ptr [ebx+KPCR_PRCB_DPC_ROUTINE_ACTIVE], 0
jnz BugCheckDpc
@@ -398,11 +393,6 @@
inc dword ptr [esi+KTHREAD_CONTEXT_SWITCHES]
//inc dword ptr [esi+KPRC_PRCB_CONTEXT_SWITCHES]
-#if WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK
- mov ebp, [ebx+KPCR_TSS]
- pop [ebp+KTSS_ESP0]
-#endif
-
/* Restore exception list */
pop [ebx+KPCR_EXCEPTION_LIST]
Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/thread.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/thread.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/thread.c Wed Aug 30 23:29:16 2006
@@ -14,9 +14,6 @@
typedef struct _KSHARED_CTXSWITCH_FRAME
{
-#if WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK // V86 HACK
- ULONG_PTR Esp0;
-#endif
PVOID ExceptionList;
KIRQL WaitIrql;
PVOID RetEip;
@@ -236,11 +233,6 @@
CtxSwitchFrame->RetEip = KiThreadStartup;
CtxSwitchFrame->WaitIrql = APC_LEVEL;
CtxSwitchFrame->ExceptionList = (PVOID)0xFFFFFFFF;
-#if WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK // V86 HACK
- CtxSwitchFrame->Esp0 = (ULONG_PTR)Thread->InitialStack -
- sizeof(FX_SAVE_AREA) -
- 0x10;
-#endif
/* Save back the new value of the kernel stack. */
DPRINT("Final Kernel Stack: %x \n", CtxSwitchFrame);