- Fix more bugs in usercall_asm.S.
authorAlex Ionescu <aionescu@gmail.com>
Wed, 11 Jan 2006 10:00:09 +0000 (10:00 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Wed, 11 Jan 2006 10:00:09 +0000 (10:00 +0000)
- Silence a debug print.

svn path=/trunk/; revision=20784

reactos/ntoskrnl/ke/i386/usercall_asm.S
reactos/ntoskrnl/mm/process.c

index 9f013a6..66d2b2a 100644 (file)
@@ -30,6 +30,7 @@ _KiGetUserModeStackAddress@0:
     mov eax, fs:[KPCR_CURRENT_THREAD]
     mov eax, [eax+KTHREAD_TRAP_FRAME]
     lea eax, [eax+KTRAP_FRAME_ESP]
+    ret
 
 .endfunc
 
@@ -135,7 +136,7 @@ StackOk:
     mov [ebx+KTHREAD_CALLBACK_STACK], esp
 
     /* Align stack on 16-byte boundary */
-    and esp, ~16
+    and esp, ~15
     mov edi, esp
 
     /* Set destination and origin NPX Areas */
@@ -191,7 +192,7 @@ DontBias:
     mov [esp+KTRAP_FRAME_EIP], eax
 
     /* Set the exception list */
-    mov eax, [KPCR_EXCEPTION_LIST]
+    mov eax, fs:[KPCR_EXCEPTION_LIST]
     mov [esp+KTRAP_FRAME_EXCEPTION_LIST], eax
 
     /* Set the previous mode */
@@ -252,7 +253,6 @@ GrowFailed:
 _NtCallbackReturn2@12:
 
     /* Get the current thread and make sure we have a callback stack */
-    call _KeBugCheckEx@20
     mov eax, fs:[KPCR_CURRENT_THREAD]
     mov ecx, [eax+KTHREAD_CALLBACK_STACK]
     test ecx, ecx
@@ -283,7 +283,7 @@ _NtCallbackReturn2@12:
     cli
 
     /* Get the initial stack and restore it */
-    mov esi, fs:[KPCR_INITIAL_STACK]
+    mov esi, [eax+KTHREAD_INITIAL_STACK]
     mov [eax+KTHREAD_INITIAL_STACK], ebx
 
     /* Set desination and origin NPX Frames */
index 0ac708d..c44d9a5 100644 (file)
@@ -215,9 +215,6 @@ MmGrowKernelStack(PVOID StackPointer)
     Thread->Tcb.StackLimit -= KERNEL_STACK_SIZE;
 
     /* Return success */
-    DPRINT1("Thread, Thread Limit, Stack %p %p %p\n", KeGetCurrentThread(),
-                                                      KeGetCurrentThread()->StackLimit,
-                                                      StackPointer);
     return STATUS_SUCCESS;
 }