From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12642.1670503848911608948 for ; Thu, 08 Dec 2022 04:50:49 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: tony.nadackal@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 696FD23A; Thu, 8 Dec 2022 04:50:54 -0800 (PST) Received: from usa.arm.com (R911G5L7.arm.com [10.1.196.178]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 003583F73B; Thu, 8 Dec 2022 04:50:46 -0800 (PST) From: "Tony K Nadackal" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Thomas Abraham Subject: [edk2-devel][PATCH V2 1/1] Platform/Sgi: Add support for RD-N2-Cfg3 platform Date: Thu, 8 Dec 2022 12:50:35 +0000 Message-Id: <20221208125035.12883-1-tony.nadackal@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vijayenthiran Subramaniam 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 Signed-off-by: Tony K Nadackal --- 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[CO= RE_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[FixedPcdG= et32 (PcdGicItsCount)]; } EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE; =20 #pragma pack () @@ -134,6 +134,14 @@ STATIC EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE = Madt =3D { 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 }, }; =20 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/Plat= form/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 =3D 0x0001001A + BASE_NAME =3D RdN2Cfg3AcpiTables + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gArmSgiAcpiTablesGuid + MODULE_TYPE =3D USER_DEFINED + VERSION_STRING =3D 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/Pl= atform/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 @@ =20 gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmSgiTokenSpaceGuid.PcdGicItsCount gArmTokenSpaceGuid.PcdFvBaseAddress gArmTokenSpaceGuid.PcdArmPrimaryCore gArmTokenSpaceGuid.PcdArmPrimaryCoreMask diff --git a/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc b/Platform/ARM/Sgi= Pkg/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 Makefi= le. +# +########################################################################= ######## +[Defines] + PLATFORM_NAME =3D RdN2Cfg3 + PLATFORM_GUID =3D b890ba7d-a256-4820-9d3a-655acbb737c= 9 + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64 + BUILD_TARGETS =3D NOOPT|DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D Platform/ARM/SgiPkg/SgiPlatform.fdf + BOARD_DXE_FV_COMPONENTS =3D Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cf= g3.fdf.inc + BUILD_NUMBER =3D 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 Platfor= m +# +########################################################################= ######## + +[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=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3Ac= piTables.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/Sg= iPlatform.dec index b9be5c9060..31f4412658 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -51,6 +51,7 @@ =20 # GIC gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A + gArmSgiTokenSpaceGuid.PcdGicItsCount|6|UINT32|0x00000028 =20 gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0|UINT64|0x0000000C gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0|UINT64|0x0000000D --=20 2.25.1