mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:33:01 +00:00
- We do not speak about the v86 hack.
- This should fix the V86 GPF error. svn path=/trunk/; revision=23700
This commit is contained in:
parent
b23894894d
commit
38a0558e07
3 changed files with 20 additions and 0 deletions
|
@ -44,6 +44,8 @@
|
||||||
|
|
||||||
#define FRAME_EDITED 0xFFF8
|
#define FRAME_EDITED 0xFFF8
|
||||||
|
|
||||||
|
#define WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK 1
|
||||||
|
|
||||||
#ifndef __ASM__
|
#ifndef __ASM__
|
||||||
|
|
||||||
extern ULONG Ke386CacheAlignment;
|
extern ULONG Ke386CacheAlignment;
|
||||||
|
|
|
@ -299,6 +299,11 @@ BadThread:
|
||||||
/* Save the Exception list */
|
/* Save the Exception list */
|
||||||
push [ebx+KPCR_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 */
|
/* DPC shouldn't be active */
|
||||||
cmp byte ptr [ebx+KPCR_PRCB_DPC_ROUTINE_ACTIVE], 0
|
cmp byte ptr [ebx+KPCR_PRCB_DPC_ROUTINE_ACTIVE], 0
|
||||||
jnz BugCheckDpc
|
jnz BugCheckDpc
|
||||||
|
@ -393,6 +398,11 @@ SameProcess:
|
||||||
inc dword ptr [esi+KTHREAD_CONTEXT_SWITCHES]
|
inc dword ptr [esi+KTHREAD_CONTEXT_SWITCHES]
|
||||||
//inc dword ptr [esi+KPRC_PRCB_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 */
|
/* Restore exception list */
|
||||||
pop [ebx+KPCR_EXCEPTION_LIST]
|
pop [ebx+KPCR_EXCEPTION_LIST]
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
|
|
||||||
typedef struct _KSHARED_CTXSWITCH_FRAME
|
typedef struct _KSHARED_CTXSWITCH_FRAME
|
||||||
{
|
{
|
||||||
|
#if WE_DO_NOT_SPEAK_ABOUT_THE_V86_HACK // V86 HACK
|
||||||
|
ULONG_PTR Esp0;
|
||||||
|
#endif
|
||||||
PVOID ExceptionList;
|
PVOID ExceptionList;
|
||||||
KIRQL WaitIrql;
|
KIRQL WaitIrql;
|
||||||
PVOID RetEip;
|
PVOID RetEip;
|
||||||
|
@ -233,6 +236,11 @@ Ke386InitThreadWithContext(PKTHREAD Thread,
|
||||||
CtxSwitchFrame->RetEip = KiThreadStartup;
|
CtxSwitchFrame->RetEip = KiThreadStartup;
|
||||||
CtxSwitchFrame->WaitIrql = APC_LEVEL;
|
CtxSwitchFrame->WaitIrql = APC_LEVEL;
|
||||||
CtxSwitchFrame->ExceptionList = (PVOID)0xFFFFFFFF;
|
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. */
|
/* Save back the new value of the kernel stack. */
|
||||||
DPRINT("Final Kernel Stack: %x \n", CtxSwitchFrame);
|
DPRINT("Final Kernel Stack: %x \n", CtxSwitchFrame);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue