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.10338.1586868767731957598 for ; Tue, 14 Apr 2020 05:52:47 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: aditya.angadi@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 6B8CE30E; Tue, 14 Apr 2020 05:52:47 -0700 (PDT) Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 411F93F73D; Tue, 14 Apr 2020 05:52:45 -0700 (PDT) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: thomas.abraham@arm.com, ard.biesheuvel@arm.com, leif@nuviainc.com, Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-platforms][PATCH v4 1/9] Platform/ARM/Sgi: Create individual Platform Description File Date: Tue, 14 Apr 2020 18:22:00 +0530 Message-Id: <20200414125208.2878-2-aditya.angadi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200414125208.2878-1-aditya.angadi@arm.com> References: <20200414125208.2878-1-aditya.angadi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vijayenthiran Subramaniam In preparation for adding support for Reference Design (RD) platforms that have different base addresses for GIC distributor or redistributor, create individual platform description files for all SGI/RD platforms and move GIC related base addresses from the common SGI/RD platform description file to individual platform description files.The existing platform description is then included by individual platform description files. With this change, the builds for each supported platform is separate. Signed-off-by: Aditya Angadi --- Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc | 5 +- Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 2 +- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 2 +- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 +- Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 2 +- Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 69 +-----= -------------- Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 5 +- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 7 +- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 3 +- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 8 +-- Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc | 51 ++++++= +++++++++ Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.fdf.inc | 10 +++ Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc | 51 ++++++= +++++++++ Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.fdf.inc | 10 +++ Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc | 51 ++++++= +++++++++ Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc | 10 +++ Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc | 51 ++++++= +++++++++ Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc | 10 +++ Platform/ARM/SgiPkg/SgiPlatform.dec | 10 +-- Platform/ARM/SgiPkg/{SgiPlatform.dsc =3D> SgiPlatform.dsc.inc} | 33 +---= ------ Platform/ARM/SgiPkg/SgiPlatform.fdf | 5 +- 21 files changed, 269 insertions(+), 128 deletions(-) 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 #include =20 +#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 @@ =20 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[CO= RE_CNT]; EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor= ; EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts; diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index 3a4d4e7b9502..e780698cdf57 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -10,7 +10,7 @@ [Defines] INF_VERSION =3D 0x0001001A BASE_NAME =3D RdE1EdgeAcpiTables - FILE_GUID =3D 2af40815-a84e-4de9-8c38-9140b354407= 3 + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gArmSgiAcpiTablesGuid MODULE_TYPE =3D USER_DEFINED VERSION_STRING =3D 1.0 =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index 58c33ecb8ec2..871697eab19e 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -10,7 +10,7 @@ [Defines] INF_VERSION =3D 0x0001001A BASE_NAME =3D RdN1EdgeAcpiTables - FILE_GUID =3D 4b0b91d0-4a05-45c4-88a7-88e170e7669= 4 + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gArmSgiAcpiTablesGuid MODULE_TYPE =3D USER_DEFINED VERSION_STRING =3D 1.0 =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Pl= atform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index 1b584b152455..61f17b3ee8ac 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -10,7 +10,7 @@ [Defines] INF_VERSION =3D 0x0001001A BASE_NAME =3D RdN1EdgeX2AcpiTables - FILE_GUID =3D 82a34150-0fc6-45f4-8ea0-f0a4660cf35= d + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gArmSgiAcpiTablesGuid MODULE_TYPE =3D USER_DEFINED VERSION_STRING =3D 1.0 =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index 097ef854df42..466e0fb658eb 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -10,7 +10,7 @@ [Defines] INF_VERSION =3D 0x0001001A BASE_NAME =3D Sgi575AcpiTables - FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gSgi575AcpiTablesFileGuid + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207= d # gArmSgiAcpiTablesGuid MODULE_TYPE =3D USER_DEFINED VERSION_STRING =3D 1.0 =20 diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 387397d74598..2f72e7152ff3 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -11,43 +11,6 @@ #include #include =20 -typedef struct { - SGI_PLATFORM_DESCRIPTOR SgiPlafromDescriptor; - CONST EFI_GUID* AcpiTableGuid; -} SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP; - -// Macro to construct the SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP structure -#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE, GUID) = \ -{ = \ - { = \ - PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE = \ - }, = \ - GUID = \ -} = \ - -STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] =3D { - ACPI_GUID_LOOKUP ( - SGI575_PART_NUM, - SGI575_CONF_NUM, - MULTI_CHIP_MODE_DISABLED, - &gSgi575AcpiTablesFileGuid), - ACPI_GUID_LOOKUP ( - RD_N1E1_EDGE_PART_NUM, - RD_N1_EDGE_CONF_ID, - MULTI_CHIP_MODE_DISABLED, - &gRdN1EdgeAcpiTablesFileGuid), - ACPI_GUID_LOOKUP ( - RD_N1E1_EDGE_PART_NUM, - RD_N1_EDGE_CONF_ID, - MULTI_CHIP_MODE_ENABLED, - &gRdN1EdgeX2AcpiTablesFileGuid), - ACPI_GUID_LOOKUP ( - RD_N1E1_EDGE_PART_NUM, - RD_E1_EDGE_CONF_ID, - MULTI_CHIP_MODE_DISABLED, - &gRdE1EdgeAcpiTablesFileGuid), -}; - VOID InitVirtioDevices ( VOID @@ -61,38 +24,8 @@ ArmSgiPkgEntryPoint ( ) { EFI_STATUS Status; - VOID *SystemIdHob; - SGI_PLATFORM_DESCRIPTOR *HobData; - UINTN Idx; - UINT32 ConfigId; - UINT32 PartNum; - UINT32 MultiChipMode; - - SystemIdHob =3D GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid); - if (SystemIdHob =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "System ID HOB is NULL\n")); - return EFI_INVALID_PARAMETER; - } - - HobData =3D (SGI_PLATFORM_DESCRIPTOR *)GET_GUID_HOB_DATA (SystemIdHob)= ; - - PartNum =3D HobData->PlatformId; - ConfigId =3D HobData->ConfigId; - MultiChipMode =3D HobData->MultiChipMode; - - Status =3D EFI_UNSUPPORTED; - - // Walk through the AcpiTableGuidLookup lookup array - for (Idx =3D 0; Idx < ARRAY_SIZE (AcpiTableGuidLookup); Idx++) { - if ((PartNum =3D=3D AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.Pl= atformId) && - (ConfigId =3D=3D AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.C= onfigId) && - (MultiChipMode =3D=3D - AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.MultiChipMode)) { - Status =3D LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[Idx].Ac= piTableGuid); - break; - } - } =20 + Status =3D LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTI= ON__)); return Status; diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Pl= atform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf index 741dcc75ed6a..9d89314a594e 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf @@ -30,10 +30,7 @@ [LibraryClasses] =20 [Guids] gArmSgiPlatformIdDescriptorGuid - gSgi575AcpiTablesFileGuid - gRdN1EdgeAcpiTablesFileGuid - gRdN1EdgeX2AcpiTablesFileGuid - gRdE1EdgeAcpiTablesFileGuid + gArmSgiAcpiTablesGuid =20 [FeaturePcd] gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/Sgi= Pkg/Include/SgiPlatform.h index e36a412155ff..d87fb2b5409f 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2018, ARM Limited. All rights reserved. +* Copyright (c) 2018-2020, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -45,11 +45,6 @@ #define SGI_SUBSYS_GENERIC_WDOG_BASE 0x2A440000 #define SGI_SUBSYS_GENERIC_WDOG_SZ SIZE_128KB =20 -// Sub System Peripherals - GIC -#define SGI_SUBSYS_GENERIC_GIC_BASE 0x30000000 -#define SGI_SUBSYS_GENERIC_GICR_BASE 0x300C0000 -#define SGI_SUBSYS_GENERIC_GIC_SZ SIZE_1MB - // Expansion AXI - Platform Peripherals - HDLCD1 #define SGI_EXP_PLAT_PERIPH_HDLCD1_BASE 0x7FF60000 #define SGI_EXP_PLAT_PERIPH_HDLCD1_SZ SIZE_64KB diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Pl= atform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf index 3db70e900d61..a918afef5fba 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2018-2020, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -42,6 +42,7 @@ [FixedPcd] =20 gArmSgiTokenSpaceGuid.PcdDramBlock2Base gArmSgiTokenSpaceGuid.PcdDramBlock2Size + gArmSgiTokenSpaceGuid.PcdGicSize =20 gArmTokenSpaceGuid.PcdSystemMemoryBase gArmTokenSpaceGuid.PcdSystemMemorySize diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/P= latform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c index 845aeaf4dd49..8d0ad4ec9c84 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2018, ARM Limited. All rights reserved. +* Copyright (c) 2018-2020, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -93,9 +93,9 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIB= UTE_DEVICE; =20 // Sub System Peripherals - GIC-600 - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_SUBSYS_GENERIC_GIC_B= ASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_SUBSYS_GENERIC_GIC_B= ASE; - VirtualMemoryTable[Index].Length =3D SGI_SUBSYS_GENERIC_GIC_S= Z; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64(PcdGicDist= ributorBase); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64(PcdGicDist= ributorBase); + VirtualMemoryTable[Index].Length =3D FixedPcdGet64(PcdGicSize= ); VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIB= UTE_DEVICE; =20 // Expansion AXI - Platform Peripherals - HDLCD1 diff --git a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc b/Platform/ARM/Sgi= Pkg/RdE1Edge/RdE1Edge.dsc new file mode 100644 index 000000000000..63b6ad230c62 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc @@ -0,0 +1,51 @@ +# +# Copyright (c) 2020, 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 RdE1Edge + PLATFORM_GUID =3D c834de39-c5b0-458b-8ea3-882427179b8= a + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + 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/RdE1Edge/RdE1Ed= ge.fdf.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc + +########################################################################= ######## +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +########################################################################= ######## + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x100000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|16 + gArmPlatformTokenSpaceGuid.PcdClusterCount|2 + +########################################################################= ######## +# +# Components Section - list of all EDK II Modules needed by this Platfor= m +# +########################################################################= ######## + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf diff --git a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.fdf.inc b/Platform/ARM= /SgiPkg/RdE1Edge/RdE1Edge.fdf.inc new file mode 100644 index 000000000000..056fc55c098a --- /dev/null +++ b/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.fdf.inc @@ -0,0 +1,10 @@ +# +# Copyright (c) 2020, 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/RdE1EdgeAc= piTables.inf diff --git a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc b/Platform/ARM/Sgi= Pkg/RdN1Edge/RdN1Edge.dsc new file mode 100644 index 000000000000..6b5215e68105 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc @@ -0,0 +1,51 @@ +# +# Copyright (c) 2020, 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 RdN1Edge + PLATFORM_GUID =3D c834de39-c5b0-458b-8ea3-882427179b8= a + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + 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/RdN1Edge/RdN1Ed= ge.fdf.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc + +########################################################################= ######## +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +########################################################################= ######## + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x100000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|4 + gArmPlatformTokenSpaceGuid.PcdClusterCount|2 + +########################################################################= ######## +# +# Components Section - list of all EDK II Modules needed by this Platfor= m +# +########################################################################= ######## + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf diff --git a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.fdf.inc b/Platform/ARM= /SgiPkg/RdN1Edge/RdN1Edge.fdf.inc new file mode 100644 index 000000000000..4b191ca55cb9 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.fdf.inc @@ -0,0 +1,10 @@ +# +# Copyright (c) 2020, 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/RdN1EdgeAc= piTables.inf diff --git a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc b/Platform/ARM= /SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc new file mode 100644 index 000000000000..ca6db012192a --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc @@ -0,0 +1,51 @@ +# +# Copyright (c) 2020, 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 RdN1EdgeX2 + PLATFORM_GUID =3D c834de39-c5b0-458b-8ea3-882427179b8= a + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + 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/RdN1EdgeX2/RdN1= EdgeX2.fdf.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc + +########################################################################= ######## +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +########################################################################= ######## + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x100000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|4 + gArmPlatformTokenSpaceGuid.PcdClusterCount|2 + +########################################################################= ######## +# +# Components Section - list of all EDK II Modules needed by this Platfor= m +# +########################################################################= ######## + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf diff --git a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc b/Platform= /ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc new file mode 100644 index 000000000000..369264a916b4 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc @@ -0,0 +1,10 @@ +# +# Copyright (c) 2020, 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/RdN1EdgeX2= AcpiTables.inf diff --git a/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc b/Platform/ARM/SgiPkg/= Sgi575/Sgi575.dsc new file mode 100644 index 000000000000..a253a5e1f15b --- /dev/null +++ b/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc @@ -0,0 +1,51 @@ +# +# Copyright (c) 2020, 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 Sgi575 + PLATFORM_GUID =3D 3a6b2eae-0275-4b6e-a5d1-bd2ba1ce1fa= e + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + 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/Sgi575/Sgi575.f= df.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc + +########################################################################= ######## +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +########################################################################= ######## + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x100000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|4 + gArmPlatformTokenSpaceGuid.PcdClusterCount|2 + +########################################################################= ######## +# +# Components Section - list of all EDK II Modules needed by this Platfor= m +# +########################################################################= ######## + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf diff --git a/Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc b/Platform/ARM/Sgi= Pkg/Sgi575/Sgi575.fdf.inc new file mode 100644 index 000000000000..3748d86efdf4 --- /dev/null +++ b/Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc @@ -0,0 +1,10 @@ +# +# Copyright (c) 2020, 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/Sgi575Acpi= Tables.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/Sg= iPlatform.dec index 9d70ec677776..97c1e40349ea 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2018-2020, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -26,10 +26,7 @@ [Guids.common] # ARM Sgi Platform ID descriptor gArmSgiPlatformIdDescriptorGuid =3D { 0xf56f152a, 0xad2a, 0x11e6, { 0x= b1, 0xa7, 0x00, 0x50, 0x56, 0x3c, 0x44, 0xcc } } gArmSgiTokenSpaceGuid =3D { 0x577d6941, 0xaea1, 0x40b4, { 0x90, 0= x93, 0x2a, 0x86, 0x61, 0x72, 0x5a, 0x57 } } - gSgi575AcpiTablesFileGuid =3D { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0= xdd, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } } - gRdN1EdgeAcpiTablesFileGuid =3D { 0x4b0b91d0, 0x4a05, 0x45c4, { 0x88, = 0xa7, 0x88, 0xe1, 0x70, 0xe7, 0x66, 0x94 } } - gRdN1EdgeX2AcpiTablesFileGuid =3D { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e= , 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } } - gRdE1EdgeAcpiTablesFileGuid =3D { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, = 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } } + gArmSgiAcpiTablesGuid =3D { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, = 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } } =20 [PcdsFeatureFlag.common] gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001 @@ -49,5 +46,8 @@ [PcdsFixedAtBuild] gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x00000000|UINT32|0x00000008 gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|0x00000000|UINT32|0x000000= 09 =20 + # GIC + gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A + [Ppis] gNtFwConfigDtInfoPpiGuid =3D { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8,= 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } } diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/Sg= iPlatform.dsc.inc similarity index 87% rename from Platform/ARM/SgiPkg/SgiPlatform.dsc rename to Platform/ARM/SgiPkg/SgiPlatform.dsc.inc index 5226c5751e98..cfda5ec33618 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -1,26 +1,9 @@ # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2018-2020, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # =20 -########################################################################= ######## -# -# Defines Section - statements that will be processed to create a Makefi= le. -# -########################################################################= ######## -[Defines] - PLATFORM_NAME =3D ArmSgi - PLATFORM_GUID =3D 3a6b2eae-0275-4b6e-a5d1-bd2ba1ce1fa= e - PLATFORM_VERSION =3D 0.1 - DSC_SPECIFICATION =3D 0x0001001B - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) - SUPPORTED_ARCHITECTURES =3D AARCH64|ARM - BUILD_TARGETS =3D NOOPT|DEBUG|RELEASE - SKUID_IDENTIFIER =3D DEFAULT - FLASH_DEFINITION =3D Platform/ARM/SgiPkg/SgiPlatform.fdf - BUILD_NUMBER =3D 1 - !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc =20 [BuildOptions] @@ -93,7 +76,7 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.comm= on.UEFI_APPLICATION, Libr =20 ########################################################################= ######## # -# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# Pcd Section - list of all EDK II PCD Entries common to all SGI/RD plat= forms # ########################################################################= ######## =20 @@ -126,10 +109,6 @@ [PcdsFixedAtBuild.common] gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000 =20 - # GIC Base Addresses - gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 - gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000 - # # PCIe # @@ -177,10 +156,6 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 gEmbeddedTokenSpaceGuid.PcdTimerPeriod|1000 =20 - # ARM Cores and Clusters - gArmPlatformTokenSpaceGuid.PcdCoreCount|4 - gArmPlatformTokenSpaceGuid.PcdClusterCount|2 - # Virtio Disk gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c130000 gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x10000 @@ -277,10 +252,6 @@ [Components.common] # ACPI Support # MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf - Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf - Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf - Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf =20 # diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/Sg= iPlatform.fdf index 3d13998015b9..9fc011a6d630 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -99,11 +99,8 @@ [FV.FvMain] # ACPI Support # INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/Sgi575Acpi= Tables.inf - INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAc= piTables.inf - INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2= AcpiTables.inf - INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAc= piTables.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +!include $(BOARD_DXE_FV_COMPONENTS) =20 # Required by PCI INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf --=20 2.17.1