mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[KD] [KD64] Introduce KdpPrintBanner and use it in all places where we print the (now consistent) banner instead of copying the code over and over again.
I still don't like that we're copying code between KD and KD64 instead of sharing it.
But as both modules are totally distinct at the moment, I won't be the one introducing shared functions between them.
This is a follow up to 50ae5e7c52
, which TortoiseGit accidentally turned into a "Message only" commit...
Never hit ALT+Y by mistake! ;)
This commit is contained in:
parent
50ae5e7c52
commit
a7d388c350
2 changed files with 32 additions and 35 deletions
|
@ -96,6 +96,18 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
return NumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
return NumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* See also: kd64\kdinit.c */
|
||||||
|
static VOID
|
||||||
|
INIT_FUNCTION
|
||||||
|
KdpPrintBanner(IN SIZE_T MemSizeMBs)
|
||||||
|
{
|
||||||
|
DPRINT1("-----------------------------------------------------\n");
|
||||||
|
DPRINT1("ReactOS " KERNEL_VERSION_STR " (Build " KERNEL_VERSION_BUILD_STR ") (Commit " KERNEL_VERSION_COMMIT_HASH ")\n");
|
||||||
|
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
||||||
|
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
||||||
|
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, KeLoaderBlock->NtHalPathName, KeLoaderBlock->ArcHalDeviceName, KeLoaderBlock->NtBootPathName);
|
||||||
|
}
|
||||||
|
|
||||||
/* FILE DEBUG LOG FUNCTIONS **************************************************/
|
/* FILE DEBUG LOG FUNCTIONS **************************************************/
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -243,15 +255,8 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
KeInitializeSpinLock(&KdpDebugLogSpinLock);
|
KeInitializeSpinLock(&KdpDebugLogSpinLock);
|
||||||
|
|
||||||
/* Display separator + ReactOS version at start of the debug log */
|
/* Display separator + ReactOS version at start of the debug log */
|
||||||
DPRINT1("-----------------------------------------------------\n");
|
|
||||||
DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
|
|
||||||
MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
||||||
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
KdpPrintBanner(MemSizeMBs);
|
||||||
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
|
||||||
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName,
|
|
||||||
KeLoaderBlock->NtHalPathName,
|
|
||||||
KeLoaderBlock->ArcHalDeviceName,
|
|
||||||
KeLoaderBlock->NtBootPathName);
|
|
||||||
}
|
}
|
||||||
else if (BootPhase == 2)
|
else if (BootPhase == 2)
|
||||||
{
|
{
|
||||||
|
@ -381,15 +386,8 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
||||||
|
|
||||||
/* Display separator + ReactOS version at start of the debug log */
|
/* Display separator + ReactOS version at start of the debug log */
|
||||||
DPRINT1("-----------------------------------------------------\n");
|
|
||||||
DPRINT1("ReactOS " KERNEL_VERSION_STR " (Build " KERNEL_VERSION_BUILD_STR ") (Commit " KERNEL_VERSION_COMMIT_HASH "\n");
|
|
||||||
MemSizeMBs = KdpGetMemorySizeInMBs(KeLoaderBlock);
|
MemSizeMBs = KdpGetMemorySizeInMBs(KeLoaderBlock);
|
||||||
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
KdpPrintBanner(MemSizeMBs);
|
||||||
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
|
||||||
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName,
|
|
||||||
KeLoaderBlock->NtHalPathName,
|
|
||||||
KeLoaderBlock->ArcHalDeviceName,
|
|
||||||
KeLoaderBlock->NtBootPathName);
|
|
||||||
}
|
}
|
||||||
else if (BootPhase == 2)
|
else if (BootPhase == 2)
|
||||||
{
|
{
|
||||||
|
@ -556,15 +554,8 @@ KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
KeInitializeSpinLock(&KdpDmesgLogSpinLock);
|
KeInitializeSpinLock(&KdpDmesgLogSpinLock);
|
||||||
|
|
||||||
/* Display separator + ReactOS version at start of the debug log */
|
/* Display separator + ReactOS version at start of the debug log */
|
||||||
DPRINT1("-----------------------------------------------------\n");
|
|
||||||
DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
|
|
||||||
MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
||||||
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
KdpPrintBanner(MemSizeMBs);
|
||||||
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
|
||||||
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName,
|
|
||||||
KeLoaderBlock->NtHalPathName,
|
|
||||||
KeLoaderBlock->ArcHalDeviceName,
|
|
||||||
KeLoaderBlock->NtBootPathName);
|
|
||||||
}
|
}
|
||||||
else if (BootPhase == 2)
|
else if (BootPhase == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,22 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
return NumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
return NumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* See also: kd\kdio.c */
|
||||||
|
static VOID
|
||||||
|
INIT_FUNCTION
|
||||||
|
KdpPrintBanner(IN SIZE_T MemSizeMBs)
|
||||||
|
{
|
||||||
|
DPRINT1("-----------------------------------------------------\n");
|
||||||
|
DPRINT1("ReactOS " KERNEL_VERSION_STR " (Build " KERNEL_VERSION_BUILD_STR ") (Commit " KERNEL_VERSION_COMMIT_HASH ")\n");
|
||||||
|
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
||||||
|
|
||||||
|
if (KeLoaderBlock)
|
||||||
|
{
|
||||||
|
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
||||||
|
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, KeLoaderBlock->NtHalPathName, KeLoaderBlock->ArcHalDeviceName, KeLoaderBlock->NtBootPathName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -375,18 +391,8 @@ KdInitSystem(IN ULONG BootPhase,
|
||||||
SharedUserData->KdDebuggerEnabled = TRUE;
|
SharedUserData->KdDebuggerEnabled = TRUE;
|
||||||
|
|
||||||
/* Display separator + ReactOS version at start of the debug log */
|
/* Display separator + ReactOS version at start of the debug log */
|
||||||
DPRINT1("-----------------------------------------------------\n");
|
|
||||||
DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
|
|
||||||
MemSizeMBs = KdpGetMemorySizeInMBs(KeLoaderBlock);
|
MemSizeMBs = KdpGetMemorySizeInMBs(KeLoaderBlock);
|
||||||
DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs);
|
KdpPrintBanner(MemSizeMBs);
|
||||||
if (KeLoaderBlock)
|
|
||||||
{
|
|
||||||
DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions);
|
|
||||||
DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName,
|
|
||||||
KeLoaderBlock->NtHalPathName,
|
|
||||||
KeLoaderBlock->ArcHalDeviceName,
|
|
||||||
KeLoaderBlock->NtBootPathName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check if the debugger should be disabled initially */
|
/* Check if the debugger should be disabled initially */
|
||||||
if (DisableKdAfterInit)
|
if (DisableKdAfterInit)
|
||||||
|
|
Loading…
Reference in a new issue