[ros-diffs] [ion] 24335: - Clear KPCR->TEB during bootstrap as well. - Use KPCR_PROCESSOR_NUMBER instead of 0x130.

ion at svn.reactos.org ion at svn.reactos.org
Sun Oct 1 08:46:09 CEST 2006


Author: ion
Date: Sun Oct  1 10:46:08 2006
New Revision: 24335

URL: http://svn.reactos.org/svn/reactos?rev=24335&view=rev
Log:
- Clear KPCR->TEB during bootstrap as well.
- Use KPCR_PROCESSOR_NUMBER instead of 0x130.

Modified:
    trunk/reactos/ntoskrnl/ke/i386/kiinit.c

Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?rev=24335&r1=24334&r2=24335&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Sun Oct  1 10:46:08 2006
@@ -294,7 +294,7 @@
     {
         /* If this is the boot CPU, set FS and the CPU Number*/
         Ke386SetFs(KGDT_R0_PCR);
-        __writefsdword(0x130, Cpu);
+        __writefsdword(KPCR_PROCESSOR_NUMBER, Cpu);
 
         /* Set the initial stack and idle thread as well */
         LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack;
@@ -334,6 +334,7 @@
     InitialThread->ApcState.Process = &KiInitialProcess.Pcb;
 
     /* Clear DR6/7 to cleanup bootloader debugging */
+    __writefsdword(KPCR_TEB, 0);
     __writefsdword(KPCR_DR6, 0);
     __writefsdword(KPCR_DR7, 0);
 




More information about the Ros-diffs mailing list