https://git.reactos.org/?p=reactos.git;a=commitdiff;h=777a2d94da285f9ab6126…
commit 777a2d94da285f9ab612680ebb9f5d412b74fb68
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Mar 7 18:00:20 2020 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Nov 16 08:55:02 2020 +0100
[NTOS:KD] Import KdpCallInitRoutine() into KdDebuggerInitialize1()
---
ntoskrnl/kd/kdinit.c | 31 -------------------------------
ntoskrnl/kd/kdmain.c | 24 +++++++++++++++++++++++-
2 files changed, 23 insertions(+), 32 deletions(-)
diff --git a/ntoskrnl/kd/kdinit.c b/ntoskrnl/kd/kdinit.c
index d50f9fd0558..c5b4bf08c25 100644
--- a/ntoskrnl/kd/kdinit.c
+++ b/ntoskrnl/kd/kdinit.c
@@ -111,35 +111,6 @@ KdRegisterDebuggerDataBlock(IN ULONG Tag,
IN PDBGKD_DEBUG_DATA_HEADER64 DataHeader,
IN ULONG Size);
-CODE_SEG("INIT")
-VOID
-NTAPI
-KdpCallInitRoutine(ULONG BootPhase)
-{
- PLIST_ENTRY CurrentEntry;
- PKD_DISPATCH_TABLE CurrentTable;
-
- /* Call the registered handlers */
- CurrentEntry = KdProviders.Flink;
- while (CurrentEntry != &KdProviders)
- {
- /* Get the current table */
- CurrentTable = CONTAINING_RECORD(CurrentEntry,
- KD_DISPATCH_TABLE,
- KdProvidersList);
-
- /* Call it */
- CurrentTable->KdpInitRoutine(CurrentTable, BootPhase);
-
- /* Next Table */
- CurrentEntry = CurrentEntry->Flink;
- }
-
- /* Call the Wrapper Init Routine */
- if (WrapperInitRoutine)
- WrapperTable.KdpInitRoutine(&WrapperTable, BootPhase);
-}
-
BOOLEAN
NTAPI
KdInitSystem(IN ULONG BootPhase,
@@ -155,8 +126,6 @@ KdInitSystem(IN ULONG BootPhase,
/* Check if this is Phase 1 */
if (BootPhase)
{
- /* Call the Initialization Routines of the Registered Providers */
- KdpCallInitRoutine(BootPhase);
return TRUE;
}
diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c
index 5cf6e00bd57..b2ebe1b661f 100644
--- a/ntoskrnl/kd/kdmain.c
+++ b/ntoskrnl/kd/kdmain.c
@@ -581,7 +581,29 @@ NTAPI
KdDebuggerInitialize1(
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
{
- return STATUS_NOT_IMPLEMENTED;
+ PLIST_ENTRY CurrentEntry;
+ PKD_DISPATCH_TABLE CurrentTable;
+
+ /* Call the registered handlers */
+ CurrentEntry = KdProviders.Flink;
+ while (CurrentEntry != &KdProviders)
+ {
+ /* Get the current table */
+ CurrentTable = CONTAINING_RECORD(CurrentEntry,
+ KD_DISPATCH_TABLE,
+ KdProvidersList);
+
+ /* Call it */
+ CurrentTable->KdpInitRoutine(CurrentTable, 1);
+
+ /* Next Table */
+ CurrentEntry = CurrentEntry->Flink;
+ }
+
+ /* Call the Wrapper Init Routine */
+ if (WrapperInitRoutine)
+ WrapperTable.KdpInitRoutine(&WrapperTable, 1);
+ return STATUS_SUCCESS;
}
/* EOF */