https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c7990051923441a35304c75a3ef964dc5c61052

commit 5c7990051923441a35304c75a3ef964dc5c61052
Author:     Justin Miller <[email protected]>
AuthorDate: Sat Mar 26 10:22:12 2022 -0700
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Thu Apr 7 22:54:32 2022 +0300

    [HALX86] Add a way to print the ProcessorTable data on bootup
---
 hal/halx86/acpi/madt.c    | 15 +++++++++++++++
 hal/halx86/apic/halinit.c |  3 +++
 hal/halx86/include/smp.h  |  3 +++
 hal/halx86/smp/mps/mps.c  | 21 +++++++++++++++++++++
 4 files changed, 42 insertions(+)

diff --git a/hal/halx86/acpi/madt.c b/hal/halx86/acpi/madt.c
index 9d4cdd070f8..183eaefcb04 100644
--- a/hal/halx86/acpi/madt.c
+++ b/hal/halx86/acpi/madt.c
@@ -28,3 +28,18 @@ HalpParseApicTables(
 {
     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);
+    }
+}
diff --git a/hal/halx86/apic/halinit.c b/hal/halx86/apic/halinit.c
index 87c6a37854d..cb0c5af7b77 100644
--- a/hal/halx86/apic/halinit.c
+++ b/hal/halx86/apic/halinit.c
@@ -59,6 +59,9 @@ HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
                                CLOCK2_LEVEL,
                                HalpClockInterrupt,
                                Latched);
+#if DBG
+    HalpPrintApicTables();
+#endif
 }
 
 VOID
diff --git a/hal/halx86/include/smp.h b/hal/halx86/include/smp.h
index 5eaccdbc285..cac946310f2 100644
--- a/hal/halx86/include/smp.h
+++ b/hal/halx86/include/smp.h
@@ -25,3 +25,6 @@ HalpParseApicTables(
 VOID
 HalpSetupProcessorsTable(
     _In_ UINT32 NTProcessorNumber);
+
+VOID
+HalpPrintApicTables(VOID);
diff --git a/hal/halx86/smp/mps/mps.c b/hal/halx86/smp/mps/mps.c
index a03c80c4db8..a55a962f02d 100644
--- a/hal/halx86/smp/mps/mps.c
+++ b/hal/halx86/smp/mps/mps.c
@@ -12,6 +12,12 @@
 #define NDEBUG
 #include <debug.h>
 
+/* GLOBALS 
********************************************************************/
+
+PROCESSOR_IDENTITY HalpStaticProcessorIdentity[MAXIMUM_PROCESSORS] = {{0}};
+PPROCESSOR_IDENTITY HalpProcessorIdentity = NULL;
+UINT32 PhysicalProcessorCount = 0;
+
 /* FUNCTIONS 
******************************************************************/
 
 VOID
@@ -20,3 +26,18 @@ HalpParseApicTables(
 {
     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);
+    }
+}

Reply via email to