[NTOS:KE/x64] Move Initialization of TSS

This commit is contained in:
Timo Kreuzer 2023-12-02 16:35:16 +02:00
parent 160980aba1
commit 0a7255e4bf

View file

@ -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();