* [edk2-devel][PATCH V2 1/1] Platform/Sgi: Add support for RD-N2-Cfg3 platform
@ 2022-12-08 12:50 Tony K Nadackal
0 siblings, 0 replies; only message in thread
From: Tony K Nadackal @ 2022-12-08 12:50 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Sami Mujawar, Thomas Abraham
From: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
The Neoverse RD-N2-Cfg3 platform is a variant of RD-N2 platform with a
different mesh size and GIC ITS count. As part of the initial platform
support, add the corresponding platform and flash description files.
A new PCD named PcdGicItsCount is introduced to specify the number of
GIC ITS blocks supported by the platform. The default value of this PCD
is set to 6 which is number of ITS blocks supported by the existing
RD-N2 variant platforms. For RD-N2-Cfg3, this PCD is set to a value of
12.
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Signed-off-by: Tony K Nadackal <tony.nadackal@arm.com>
---
Changes since v1:
- Enabled support for this change on RD-N2 platform as well.
Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc | 10 ++-
Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf | 75 ++++++++++++++++++++
Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 1 +
Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc | 56 +++++++++++++++
Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc | 10 +++
Platform/ARM/SgiPkg/SgiPlatform.dec | 1 +
7 files changed, 153 insertions(+), 1 deletion(-)
Link to github branch with the patches in this series -
https://github.com/tonykn-arm/edk2-platforms/pull/new/fork-rdn2_cfg3_v2
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
index cdf8b3f2e9..7b3777f693 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
@@ -31,7 +31,7 @@ typedef struct {
EFI_ACPI_6_4_GIC_STRUCTURE GicInterfaces[CORE_CNT];
EFI_ACPI_6_4_GIC_DISTRIBUTOR_STRUCTURE GicDistributor;
EFI_ACPI_6_4_GICR_STRUCTURE GicRedistributor;
- EFI_ACPI_6_4_GIC_ITS_STRUCTURE GicIts[6];
+ EFI_ACPI_6_4_GIC_ITS_STRUCTURE GicIts[FixedPcdGet32 (PcdGicItsCount)];
} EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE;
#pragma pack ()
@@ -134,6 +134,14 @@ STATIC EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
EFI_ACPI_6_4_GIC_ITS_INIT(3, 0x30100000),
EFI_ACPI_6_4_GIC_ITS_INIT(4, 0x30140000),
EFI_ACPI_6_4_GIC_ITS_INIT(5, 0x30180000),
+#if (FixedPcdGet32 (PcdGicItsCount) > 6 )
+ EFI_ACPI_6_4_GIC_ITS_INIT(6, 0x301C0000),
+ EFI_ACPI_6_4_GIC_ITS_INIT(7, 0x30200000),
+ EFI_ACPI_6_4_GIC_ITS_INIT(8, 0x30240000),
+ EFI_ACPI_6_4_GIC_ITS_INIT(9, 0x30280000),
+ EFI_ACPI_6_4_GIC_ITS_INIT(10, 0x302C0000),
+ EFI_ACPI_6_4_GIC_ITS_INIT(11, 0x30180000),
+#endif
},
};
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
index 66d5422df3..9d7477d5d9 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
@@ -49,6 +49,7 @@
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
+ gArmSgiTokenSpaceGuid.PcdGicItsCount
gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
gArmTokenSpaceGuid.PcdPciBusMin
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
new file mode 100644
index 0000000000..25c0ba8c53
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
@@ -0,0 +1,75 @@
+## @file
+# ACPI table data and ASL sources required to boot the platform.
+#
+# Copyright (c) 2022, Arm Ltd. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x0001001A
+ BASE_NAME = RdN2Cfg3AcpiTables
+ FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gArmSgiAcpiTablesGuid
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+
+[Sources]
+ Dbg2.aslc
+ Fadt.aslc
+ Gtdt.aslc
+ RdN2/Dsdt.asl
+ RdN2/Madt.aslc
+ RdN2/Pptt.aslc
+ Spcr.aslc
+ SsdtRos.asl
+ SsdtEvents.asl
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ ArmPlatformPkg/ArmPlatformPkg.dec
+ EmbeddedPkg/EmbeddedPkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ MdePkg/MdePkg.dec
+ Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+ gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+ gArmPlatformTokenSpaceGuid.PcdCoreCount
+ gArmPlatformTokenSpaceGuid.PcdClusterCount
+
+ gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+ gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+ gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+ gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+ gArmTokenSpaceGuid.PcdGicDistributorBase
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase
+ gArmSgiTokenSpaceGuid.PcdGicItsCount
+ gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+ gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
+ gArmTokenSpaceGuid.PcdPciBusMin
+ gArmTokenSpaceGuid.PcdPciBusMax
+
+ gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress
+ gArmSgiTokenSpaceGuid.PcdGpioController0Size
+ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt
+ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
+ gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
+ gArmSgiTokenSpaceGuid.PcdOscLpiEnable
+ gArmSgiTokenSpaceGuid.PcdOscCppcEnable
+ gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress
+ gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize
+ gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt
+ gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
+ gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
+ gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
+ gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
+ gArmSgiTokenSpaceGuid.PcdVirtioNetSize
+ gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
+ gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
index 1ca7679b41..2b4f27af65 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
@@ -53,6 +53,7 @@
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
+ gArmSgiTokenSpaceGuid.PcdGicItsCount
gArmTokenSpaceGuid.PcdFvBaseAddress
gArmTokenSpaceGuid.PcdArmPrimaryCore
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
diff --git a/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc
new file mode 100644
index 0000000000..5ee8ef626e
--- /dev/null
+++ b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2022, ARM Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ PLATFORM_NAME = RdN2Cfg3
+ PLATFORM_GUID = b890ba7d-a256-4820-9d3a-655acbb737c9
+ PLATFORM_VERSION = 0.1
+ DSC_SPECIFICATION = 0x0001001B
+ OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
+ SUPPORTED_ARCHITECTURES = AARCH64
+ BUILD_TARGETS = NOOPT|DEBUG|RELEASE
+ SKUID_IDENTIFIER = DEFAULT
+ FLASH_DEFINITION = Platform/ARM/SgiPkg/SgiPlatform.fdf
+ BOARD_DXE_FV_COMPONENTS = Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
+ BUILD_NUMBER = 1
+
+# include common definitions from SgiPlatform.dsc
+!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
+!include Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc
+
+# include common/basic libraries from MdePkg.
+!include MdePkg/MdeLibs.dsc.inc
+
+################################################################################
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+################################################################################
+
+[PcdsFixedAtBuild.common]
+ # GIC configurations
+ gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x30300000
+ gArmSgiTokenSpaceGuid.PcdGicSize|0x400000
+ gArmSgiTokenSpaceGuid.PcdGicItsCount|12
+
+ # ARM Cores and Clusters
+ gArmPlatformTokenSpaceGuid.PcdCoreCount|1
+ gArmPlatformTokenSpaceGuid.PcdClusterCount|16
+
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
diff --git a/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
new file mode 100644
index 0000000000..92973c6c50
--- /dev/null
+++ b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
@@ -0,0 +1,10 @@
+#
+# Copyright (c) 2022, ARM Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+# Per-platform additional content of the DXE phase firmware volume
+
+ # ACPI support
+ INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index b9be5c9060..31f4412658 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -51,6 +51,7 @@
# GIC
gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A
+ gArmSgiTokenSpaceGuid.PcdGicItsCount|6|UINT32|0x00000028
gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0|UINT64|0x0000000C
gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0|UINT64|0x0000000D
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-08 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 12:50 [edk2-devel][PATCH V2 1/1] Platform/Sgi: Add support for RD-N2-Cfg3 platform Tony K Nadackal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox