From 4f1804b0c0e4e29a8c8294aa8f4cc0a7a6b2231d Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 1 Oct 2006 15:22:42 +0000 Subject: [PATCH] - Use __readfsdword instead of de-referencing the Boot PCR, which is not queried for Application CPUs. (And put the Goto back where it was). Thanks to Thomas Weidenmueller for noticing. svn path=/trunk/; revision=24344 --- reactos/ntoskrnl/ke/i386/kiinit.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/ke/i386/kiinit.c b/reactos/ntoskrnl/ke/i386/kiinit.c index 0b8f006a7a7..c81368c333d 100644 --- a/reactos/ntoskrnl/ke/i386/kiinit.c +++ b/reactos/ntoskrnl/ke/i386/kiinit.c @@ -311,13 +311,12 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Initialize the machine type */ KiInitializeMachineType(); + /* Skip initial setup if this isn't the Boot CPU */ + if (Cpu) goto AppCpuInit; + /* Get GDT, IDT, PCR and TSS pointers */ KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss); - /* Skip initial setup if this isn't the Boot CPU */ - if (Cpu) - goto AppCpuInit; - /* Setup the TSS descriptors and entries */ Ki386InitializeTss(Tss, Idt, Gdt); @@ -361,7 +360,7 @@ AppCpuInit: HalInitializeProcessor(Cpu, KeLoaderBlock); /* Set active processors */ - KeActiveProcessors |= Pcr->SetMember; + KeActiveProcessors |= __readfsdword(KPCR_SET_MEMBER); KeNumberProcessors++; /* Check if this is the boot CPU */