- Move MmGrowKernelStack to mm/process.c with the other functions for future use.
- Make KiServiceCheck stdcall for future use.
Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
Modified: trunk/reactos/ntoskrnl/mm/mm.c
Modified: trunk/reactos/ntoskrnl/mm/process.c

Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S
--- trunk/reactos/ntoskrnl/ke/i386/syscall.S	2006-01-11 04:45:45 UTC (rev 20777)
+++ trunk/reactos/ntoskrnl/ke/i386/syscall.S	2006-01-11 05:24:40 UTC (rev 20778)
@@ -614,12 +614,16 @@
     /* Set up Win32K Table */
     push edx
     push ebx
-    call _KiServiceCheck
+    call _KiServiceCheck@0
 
     /* FIXME: Handle failure */
     pop eax
     pop edx
 
+    /* Reset trap frame address */
+    mov ebp, esp
+    mov [esi+KTHREAD_TRAP_FRAME], ebp
+
     /* Try the Call again */
     jmp CheckValidCall
 

Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c	2006-01-11 04:45:45 UTC (rev 20777)
+++ trunk/reactos/ntoskrnl/ke/kthread.c	2006-01-11 05:24:40 UTC (rev 20778)
@@ -1467,7 +1467,8 @@
 }
 
 VOID
-KiServiceCheck (VOID)
+NTAPI
+KiServiceCheck(VOID)
 {
     PKTHREAD Thread = KeGetCurrentThread();
 

Modified: trunk/reactos/ntoskrnl/mm/mm.c
--- trunk/reactos/ntoskrnl/mm/mm.c	2006-01-11 04:45:45 UTC (rev 20777)
+++ trunk/reactos/ntoskrnl/mm/mm.c	2006-01-11 05:24:40 UTC (rev 20778)
@@ -405,24 +405,9 @@
    return (0);
 }
 
-
 /*
  * @unimplemented
  */
-NTSTATUS
-STDCALL
-MmGrowKernelStack (
-   DWORD Unknown0
-)
-{
-   UNIMPLEMENTED;
-   return (STATUS_NOT_IMPLEMENTED);
-}
-
-
-/*
- * @unimplemented
- */
 BOOLEAN
 STDCALL
 MmSetAddressRangeModified (

Modified: trunk/reactos/ntoskrnl/mm/process.c
--- trunk/reactos/ntoskrnl/mm/process.c	2006-01-11 04:45:45 UTC (rev 20777)
+++ trunk/reactos/ntoskrnl/mm/process.c	2006-01-11 05:24:40 UTC (rev 20778)
@@ -185,11 +185,24 @@
         KEBUGCHECK(0);
     }
 
+    /* Return the stack */
     return KernelStack;
 }
 
+/*
+ * @implemented
+ */
 NTSTATUS
 STDCALL
+MmGrowKernelStack(PVOID StackPointer)
+{
+    DPRINT1("We don't support expansion yet :(\n");
+    KEBUGCHECK(0);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+STDCALL
 MmCreatePeb(PEPROCESS Process)
 {
     PPEB Peb = NULL;