https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a7255e4bf999b9d1e80f…
commit 0a7255e4bf999b9d1e80fb79bddc2acebc607e4a
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Dec 2 16:35:16 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 TSS
---
ntoskrnl/ke/amd64/kiinit.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c
index 441f5cf9433..c6810ef1253 100644
--- a/ntoskrnl/ke/amd64/kiinit.c
+++ b/ntoskrnl/ke/amd64/kiinit.c
@@ -446,6 +446,13 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Initialize the PCR */
KiInitializePcr(&KiInitialPcr, 0, &KiInitialThread.Tcb,
KiP0DoubleFaultStack);
+
+ /* Setup the TSS descriptors and entries */
+ KiInitializeTss(&KiInitialPcr,
+ KiInitialPcr.TssBase,
+ KiP0BootStack,
+ KiP0DoubleFaultStack,
+ KiP0DoubleFaultStack);
}
/* Get Pcr from loader block */
@@ -473,13 +480,6 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Initialize the module list (ntos, hal, kdcom) */
KiInitModuleList(LoaderBlock);
- /* Setup the TSS descriptors and entries */
- KiInitializeTss(Pcr,
- Pcr->TssBase,
- (PVOID)InitialStack,
- KiP0DoubleFaultStack,
- KiP0DoubleFaultStack);
-
/* Setup the IDT */
KeInitExceptions();