mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- Set the pde's for the kernel stack at thread creation time and not at any task switch.
svn path=/trunk/; revision=10604
This commit is contained in:
@@ -145,23 +145,6 @@ _Ki386ContextSwitch:
|
||||
movl KPROCESS_DIRECTORY_TABLE_BASE(%ebx), %eax
|
||||
movl %eax, %cr3
|
||||
|
||||
/*
|
||||
* Set up the PDE for the top of the new stack.
|
||||
*/
|
||||
movl $0, %ebx
|
||||
.L2: movl %edi, %esi
|
||||
shr $22, %esi
|
||||
movl 0xF03C0000(,%esi, 4), %eax
|
||||
cmpl $0, %eax
|
||||
jne .L1
|
||||
movl _MmGlobalKernelPageDirectory(,%esi, 4), %eax
|
||||
movl %eax, 0xF03C0000(,%esi, 4)
|
||||
.L1:
|
||||
addl $4096, %edi
|
||||
incl %ebx
|
||||
cmp $(MM_STACK_SIZE / 4096), %ebx
|
||||
jl .L2
|
||||
|
||||
/*
|
||||
* FIXME: Restore floating point state
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: kthread.c,v 1.49 2004/08/15 16:39:05 chorns Exp $
|
||||
/* $Id: kthread.c,v 1.50 2004/08/19 21:51:06 hbirr Exp $
|
||||
*
|
||||
* FILE: ntoskrnl/ke/kthread.c
|
||||
* PURPOSE: Microkernel thread support
|
||||
@@ -189,6 +189,8 @@ KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First)
|
||||
Thread->KernelStack = (PVOID)&init_stack_top;
|
||||
}
|
||||
|
||||
MmUpdatePageDir((PEPROCESS)Process, (PVOID)Thread->StackLimit, MM_STACK_SIZE);
|
||||
|
||||
/*
|
||||
* The Native API function will initialize the TEB field later
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user