[HALX86] Add a way to print the ProcessorTable data on bootup

This commit is contained in:
Justin Miller 2022-03-26 10:22:12 -07:00 committed by Stanislav Motylkov
parent a09f925c1c
commit 5c79900519
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
4 changed files with 42 additions and 0 deletions

View file

@ -28,3 +28,18 @@ HalpParseApicTables(
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID
HalpPrintApicTables(VOID)
{
UINT32 i;
DPRINT1("HAL has detected a physical processor count of: %d\n", HalpApicInfoTable.ProcessorCount);
for (i = 0; i < HalpApicInfoTable.ProcessorCount; i++)
{
DPRINT1("Information about the following processor is for processors number: %d\n"
" The BSPCheck is set to: %X\n"
" The LapicID is set to: %X\n",
i, HalpProcessorIdentity[i].BSPCheck, HalpProcessorIdentity[i].LapicId);
}
}

View file

@ -59,6 +59,9 @@ HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
CLOCK2_LEVEL, CLOCK2_LEVEL,
HalpClockInterrupt, HalpClockInterrupt,
Latched); Latched);
#if DBG
HalpPrintApicTables();
#endif
} }
VOID VOID

View file

@ -25,3 +25,6 @@ HalpParseApicTables(
VOID VOID
HalpSetupProcessorsTable( HalpSetupProcessorsTable(
_In_ UINT32 NTProcessorNumber); _In_ UINT32 NTProcessorNumber);
VOID
HalpPrintApicTables(VOID);

View file

@ -12,6 +12,12 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
/* GLOBALS ********************************************************************/
PROCESSOR_IDENTITY HalpStaticProcessorIdentity[MAXIMUM_PROCESSORS] = {{0}};
PPROCESSOR_IDENTITY HalpProcessorIdentity = NULL;
UINT32 PhysicalProcessorCount = 0;
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
VOID VOID
@ -20,3 +26,18 @@ HalpParseApicTables(
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID
HalpPrintApicTables(VOID)
{
UINT32 i;
DPRINT1("HAL has detected a physical processor count of: %d\n", PhysicalProcessorCount);
for (i = 0; i < PhysicalProcessorCount; i++)
{
DPRINT1("Information about the following processor is for processors number: %d\n"
" The BSPCheck is set to: %X\n"
" The LapicID is set to: %X\n",
i, HalpProcessorIdentity[i].BSPCheck, HalpProcessorIdentity[i].LapicId);
}
}