mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[NTOS:KE][AMD64] Move KD initialization after HalInitializeProcessor call (#9177)
This is needed for PCI debugging devices whose KD modules depend on the functions registered in HalpRegisterKdSupportFunctions(). Also it's consistent with what x86 does, and also what Win7 x64 does (the KdInitSystem is invoked after the HalInitializeProcessor call). Necessary for PR #9156 on AMD64. CORE-20385
This commit is contained in:
@@ -536,17 +536,8 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
|
||||
/* Setup the IDT */
|
||||
KeInitExceptions();
|
||||
|
||||
/* Initialize debugging system */
|
||||
KdInitSystem(0, KeLoaderBlock);
|
||||
|
||||
/* Check for break-in */
|
||||
if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
|
||||
}
|
||||
|
||||
DPRINT1("Pcr = %p, Gdt = %p, Idt = %p, Tss = %p\n",
|
||||
Pcr, Pcr->GdtBase, Pcr->IdtBase, Pcr->TssBase);
|
||||
|
||||
/* Acquire lock */
|
||||
while (InterlockedBitTestAndSet64((PLONG64)&KiFreezeExecutionLock, 0))
|
||||
{
|
||||
@@ -563,6 +554,18 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
/* Release lock */
|
||||
InterlockedAnd64((PLONG64)&KiFreezeExecutionLock, 0);
|
||||
|
||||
if (Cpu == 0)
|
||||
{
|
||||
/* Initialize debugging system */
|
||||
KdInitSystem(0, KeLoaderBlock);
|
||||
|
||||
/* Check for break-in */
|
||||
if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
|
||||
}
|
||||
|
||||
DPRINT1("Pcr = %p, Gdt = %p, Idt = %p, Tss = %p\n",
|
||||
Pcr, Pcr->GdtBase, Pcr->IdtBase, Pcr->TssBase);
|
||||
|
||||
/* Raise to HIGH_LEVEL */
|
||||
KfRaiseIrql(HIGH_LEVEL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user