mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +00:00
- Clear KPCR->TEB during bootstrap as well.
- Use KPCR_PROCESSOR_NUMBER instead of 0x130. svn path=/trunk/; revision=24335
This commit is contained in:
parent
aebf830821
commit
00564d63b7
1 changed files with 2 additions and 1 deletions
|
@ -294,7 +294,7 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
{
|
{
|
||||||
/* If this is the boot CPU, set FS and the CPU Number*/
|
/* If this is the boot CPU, set FS and the CPU Number*/
|
||||||
Ke386SetFs(KGDT_R0_PCR);
|
Ke386SetFs(KGDT_R0_PCR);
|
||||||
__writefsdword(0x130, Cpu);
|
__writefsdword(KPCR_PROCESSOR_NUMBER, Cpu);
|
||||||
|
|
||||||
/* Set the initial stack and idle thread as well */
|
/* Set the initial stack and idle thread as well */
|
||||||
LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack;
|
LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack;
|
||||||
|
@ -334,6 +334,7 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
InitialThread->ApcState.Process = &KiInitialProcess.Pcb;
|
InitialThread->ApcState.Process = &KiInitialProcess.Pcb;
|
||||||
|
|
||||||
/* Clear DR6/7 to cleanup bootloader debugging */
|
/* Clear DR6/7 to cleanup bootloader debugging */
|
||||||
|
__writefsdword(KPCR_TEB, 0);
|
||||||
__writefsdword(KPCR_DR6, 0);
|
__writefsdword(KPCR_DR6, 0);
|
||||||
__writefsdword(KPCR_DR7, 0);
|
__writefsdword(KPCR_DR7, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue