The number of processing elements is hardcoded in the MADT ACPI table
of the RD-E1-Edge platform. Remove the hardcoded value and obtain the
core count on platform from PCDs instead.

Signed-off-by: Aditya Angadi <aditya.ang...@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc 
b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
index 48e7a61478e8..58378b570b12 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
@@ -14,6 +14,9 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
+#define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
+                    FixedPcdGet32 (PcdCoreCount))
+
 // EFI_ACPI_6_2_GIC_STRUCTURE
 #define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,      
\
   PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency)           
\
@@ -85,7 +88,7 @@
 
 typedef struct {
   EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
-  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[32];
+  EFI_ACPI_6_2_GIC_STRUCTURE                            
GicInterfaces[CORE_CNT];
   EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
   EFI_ACPI_6_2_GICR_STRUCTURE                           GicRedistributor;
   EFI_ACPI_6_2_GIC_ITS_STRUCTURE                        GicIts;
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58615): https://edk2.groups.io/g/devel/message/58615
Mute This Topic: https://groups.io/mt/73997066/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to