From: Alex Ionescu Date: Thu, 12 Jan 2006 01:16:57 +0000 (+0000) Subject: - Add the ktrap_frame hack back because it's still missing parts until it can be... X-Git-Tag: backups/expat-rbuild@40467~367 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=426c237aa63959c3e99258db85183dbeaadf72f9 - Add the ktrap_frame hack back because it's still missing parts until it can be removed. Sorry for not noticing earlier and breaking boot, it only happens on vmware (I guess due to the way it handles the CPU differently). svn path=/trunk/; revision=20801 --- diff --git a/reactos/ntoskrnl/ke/i386/syscall.S b/reactos/ntoskrnl/ke/i386/syscall.S index 18ea36e1771..850a3635379 100644 --- a/reactos/ntoskrnl/ke/i386/syscall.S +++ b/reactos/ntoskrnl/ke/i386/syscall.S @@ -470,14 +470,22 @@ V86_Exit_Return: ja RestoreAll // ==================== END IF FULL RESTORE NEEDED ====================// +//badbadbad + add esp, 0x30 + pop gs + pop es + pop ds + add esp, 0x14 +//badbadbad + /* Restore FS */ RestoreFs: - lea esp, [ebp+KTRAP_FRAME_FS] + //lea esp, [ebp+KTRAP_FRAME_FS] pop fs CommonStackClean: /* Skip debug information and unsaved registers */ - lea esp, [ebp+KTRAP_FRAME_EDI] + //lea esp, [ebp+KTRAP_FRAME_EDI] pop edi pop esi pop ebx diff --git a/reactos/ntoskrnl/ke/i386/usercall_asm.S b/reactos/ntoskrnl/ke/i386/usercall_asm.S index 35d33835cc7..f20e70ef87b 100644 --- a/reactos/ntoskrnl/ke/i386/usercall_asm.S +++ b/reactos/ntoskrnl/ke/i386/usercall_asm.S @@ -185,6 +185,11 @@ DontBias: lea esi, [edx+KTRAP_FRAME_FS] rep movsd + /* TODO: Ugly hack because of some missing logic in syscall.s */ + mov dword ptr [esp+KTRAP_FRAME_GS], 0 + mov dword ptr [esp+KTRAP_FRAME_DS], KGDT_R3_DATA + RPL_MASK + mov dword ptr [esp+KTRAP_FRAME_ES], KGDT_R3_DATA + RPL_MASK + /* FIXME: Copy debug registers if needed */ /* Get user-mode dispatcher address and set it as EIP */