https://git.reactos.org/?p=reactos.git;a=commitdiff;h=160980aba1abc89545889…
commit 160980aba1abc89545889e49206454dd55fe7e86
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Dec 2 16:32:20 2023 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Fri Dec 8 20:16:51 2023 +0200
[NTOS:KE/x64] Move initialization of PCR
---
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 3eb576178ac..441f5cf9433 100644
--- a/ntoskrnl/ke/amd64/kiinit.c
+++ b/ntoskrnl/ke/amd64/kiinit.c
@@ -443,6 +443,9 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
LoaderBlock->Thread = (ULONG_PTR)&KiInitialThread;
LoaderBlock->Process = (ULONG_PTR)&KiInitialProcess.Pcb;
LoaderBlock->Prcb = (ULONG_PTR)&KiInitialPcr.Prcb;
+
+ /* Initialize the PCR */
+ KiInitializePcr(&KiInitialPcr, 0, &KiInitialThread.Tcb,
KiP0DoubleFaultStack);
}
/* Get Pcr from loader block */
@@ -461,9 +464,6 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Set us as the current process */
InitialThread->ApcState.Process = (PVOID)LoaderBlock->Process;
- /* Initialize the PCR */
- KiInitializePcr(Pcr, Cpu, InitialThread, KiP0DoubleFaultStack);
-
/* Initialize the CPU features */
KiInitializeCpu(Pcr);