https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ba62dd0aaa24ebf4715e85a608d96f9bbd488992

commit ba62dd0aaa24ebf4715e85a608d96f9bbd488992
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Sat Dec 2 16:29:59 2023 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Fri Dec 8 20:16:51 2023 +0200

    [NTOS:KE/x64] Move initialization of KeLoaderBlock
---
 ntoskrnl/ke/amd64/kiinit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c
index 3f7703c8680..3eb576178ac 100644
--- a/ntoskrnl/ke/amd64/kiinit.c
+++ b/ntoskrnl/ke/amd64/kiinit.c
@@ -429,15 +429,15 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
     FrLdrDbgPrint = LoaderBlock->u.I386.CommonDataArea;
     //FrLdrDbgPrint("Hello from KiSystemStartup!!!\n");
 
-    /* Save the loader block */
-    KeLoaderBlock = LoaderBlock;
-
     /* Get the current CPU number */
     Cpu = KeNumberProcessors++; // FIXME
 
     /* LoaderBlock initialization for Cpu 0 */
     if (Cpu == 0)
     {
+        /* Save the loader block */
+        KeLoaderBlock = LoaderBlock;
+
         /* Set the initial stack, idle thread and process */
         LoaderBlock->KernelStack = (ULONG_PTR)KiP0BootStack;
         LoaderBlock->Thread = (ULONG_PTR)&KiInitialThread;

Reply via email to