--- trunk/reactos/ntoskrnl/ke/i386/syscall.S 2006-01-12 00:46:35 UTC (rev 20800)
+++ trunk/reactos/ntoskrnl/ke/i386/syscall.S 2006-01-12 01:16:57 UTC (rev 20801)
@@ -470,14 +470,22 @@
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
--- trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S 2006-01-12 00:46:35 UTC (rev 20800)
+++ trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S 2006-01-12 01:16:57 UTC (rev 20801)
@@ -185,6 +185,11 @@
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 */