public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: devel@edk2.groups.io, aditya.angadi@arm.com
Cc: thomas.abraham@arm.com, leif@nuviainc.com,
	Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v4 1/9] Platform/ARM/Sgi: Create individual Platform Description File
Date: Mon, 27 Apr 2020 13:01:39 +0200	[thread overview]
Message-ID: <132a8ddf-a0d7-3bf3-8fbd-3b0b4bd4d084@arm.com> (raw)
In-Reply-To: <20200414125208.2878-2-aditya.angadi@arm.com>

On 4/14/20 2:52 PM, Aditya Angadi via groups.io wrote:
> From: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> 
> 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 <aditya.angadi@arm.com>

Can you split this up please? There are a lot of different things going 
on at the same time AFAICT.

> ---
>   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 => 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 <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;
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/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                    = 0x0001001A
>     BASE_NAME                      = RdE1EdgeAcpiTables
> -  FILE_GUID                      = 2af40815-a84e-4de9-8c38-9140b3544073
> +  FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gArmSgiAcpiTablesGuid
>     MODULE_TYPE                    = USER_DEFINED
>     VERSION_STRING                 = 1.0
>   
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/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                    = 0x0001001A
>     BASE_NAME                      = RdN1EdgeAcpiTables
> -  FILE_GUID                      = 4b0b91d0-4a05-45c4-88a7-88e170e76694
> +  FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gArmSgiAcpiTablesGuid
>     MODULE_TYPE                    = USER_DEFINED
>     VERSION_STRING                 = 1.0
>   
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/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                    = 0x0001001A
>     BASE_NAME                      = RdN1EdgeX2AcpiTables
> -  FILE_GUID                      = 82a34150-0fc6-45f4-8ea0-f0a4660cf35d
> +  FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gArmSgiAcpiTablesGuid
>     MODULE_TYPE                    = USER_DEFINED
>     VERSION_STRING                 = 1.0
>   
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/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                    = 0x0001001A
>     BASE_NAME                      = Sgi575AcpiTables
> -  FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gSgi575AcpiTablesFileGuid
> +  FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gArmSgiAcpiTablesGuid
>     MODULE_TYPE                    = USER_DEFINED
>     VERSION_STRING                 = 1.0
>   
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/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 <Library/HobLib.h>
>   #include <SgiPlatform.h>
>   
> -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[] = {
> -  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 = GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid);
> -  if (SystemIdHob == NULL) {
> -    DEBUG ((DEBUG_ERROR, "System ID HOB is NULL\n"));
> -    return EFI_INVALID_PARAMETER;
> -  }
> -
> -  HobData = (SGI_PLATFORM_DESCRIPTOR *)GET_GUID_HOB_DATA (SystemIdHob);
> -
> -  PartNum = HobData->PlatformId;
> -  ConfigId = HobData->ConfigId;
> -  MultiChipMode = HobData->MultiChipMode;
> -
> -  Status = EFI_UNSUPPORTED;
> -
> -  // Walk through the AcpiTableGuidLookup lookup array
> -  for (Idx = 0; Idx < ARRAY_SIZE (AcpiTableGuidLookup); Idx++) {
> -    if ((PartNum == AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.PlatformId) &&
> -        (ConfigId == AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.ConfigId)  &&
> -        (MultiChipMode ==
> -         AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.MultiChipMode)) {
> -      Status = LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[Idx].AcpiTableGuid);
> -      break;
> -    }
> -  }
>   
> +  Status = LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid);
>     if (EFI_ERROR (Status)) {
>       DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTION__));
>       return Status;
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/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]
>   
>   [Guids]
>     gArmSgiPlatformIdDescriptorGuid
> -  gSgi575AcpiTablesFileGuid
> -  gRdN1EdgeAcpiTablesFileGuid
> -  gRdN1EdgeX2AcpiTablesFileGuid
> -  gRdE1EdgeAcpiTablesFileGuid
> +  gArmSgiAcpiTablesGuid
>   
>   [FeaturePcd]
>     gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
> diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/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
>   
> -// 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/Platform/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]
>   
>     gArmSgiTokenSpaceGuid.PcdDramBlock2Base
>     gArmSgiTokenSpaceGuid.PcdDramBlock2Size
> +  gArmSgiTokenSpaceGuid.PcdGicSize
>   
>     gArmTokenSpaceGuid.PcdSystemMemoryBase
>     gArmTokenSpaceGuid.PcdSystemMemorySize
> diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/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      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
>   
>     // Sub System Peripherals - GIC-600
> -  VirtualMemoryTable[++Index].PhysicalBase  = SGI_SUBSYS_GENERIC_GIC_BASE;
> -  VirtualMemoryTable[Index].VirtualBase     = SGI_SUBSYS_GENERIC_GIC_BASE;
> -  VirtualMemoryTable[Index].Length          = SGI_SUBSYS_GENERIC_GIC_SZ;
> +  VirtualMemoryTable[++Index].PhysicalBase  = FixedPcdGet64(PcdGicDistributorBase);
> +  VirtualMemoryTable[Index].VirtualBase     = FixedPcdGet64(PcdGicDistributorBase);
> +  VirtualMemoryTable[Index].Length          = FixedPcdGet64(PcdGicSize);
>     VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
>   
>     // Expansion AXI - Platform Peripherals - HDLCD1
> diff --git a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc b/Platform/ARM/SgiPkg/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 Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = RdE1Edge
> +  PLATFORM_GUID                  = c834de39-c5b0-458b-8ea3-882427179b8a
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x0001001B
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> +  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> +  BOARD_DXE_FV_COMPONENTS        = Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.fdf.inc
> +  BUILD_NUMBER                   = 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 Platform
> +#
> +################################################################################
> +
> +[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=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> diff --git a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc b/Platform/ARM/SgiPkg/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 Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = RdN1Edge
> +  PLATFORM_GUID                  = c834de39-c5b0-458b-8ea3-882427179b8a
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x0001001B
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> +  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> +  BOARD_DXE_FV_COMPONENTS        = Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.fdf.inc
> +  BUILD_NUMBER                   = 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 Platform
> +#
> +################################################################################
> +
> +[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=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.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 Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = RdN1EdgeX2
> +  PLATFORM_GUID                  = c834de39-c5b0-458b-8ea3-882427179b8a
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x0001001B
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> +  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> +  BOARD_DXE_FV_COMPONENTS        = Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc
> +  BUILD_NUMBER                   = 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 Platform
> +#
> +################################################################################
> +
> +[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=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.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 Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = Sgi575
> +  PLATFORM_GUID                  = 3a6b2eae-0275-4b6e-a5d1-bd2ba1ce1fae
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x0001001B
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> +  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> +  BOARD_DXE_FV_COMPONENTS        = Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc
> +  BUILD_NUMBER                   = 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 Platform
> +#
> +################################################################################
> +
> +[Components.common]
> +  Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> diff --git a/Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc b/Platform/ARM/SgiPkg/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=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.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 = { 0xf56f152a, 0xad2a, 0x11e6, { 0xb1, 0xa7, 0x00, 0x50, 0x56, 0x3c, 0x44, 0xcc } }
>     gArmSgiTokenSpaceGuid      = { 0x577d6941, 0xaea1, 0x40b4, { 0x90, 0x93, 0x2a, 0x86, 0x61, 0x72, 0x5a, 0x57 } }
> -  gSgi575AcpiTablesFileGuid  = { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } }
> -  gRdN1EdgeAcpiTablesFileGuid = { 0x4b0b91d0, 0x4a05, 0x45c4, { 0x88, 0xa7, 0x88, 0xe1, 0x70, 0xe7, 0x66, 0x94 } }
> -  gRdN1EdgeX2AcpiTablesFileGuid = { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e, 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } }
> -  gRdE1EdgeAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
> +  gArmSgiAcpiTablesGuid = { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } }
>   
>   [PcdsFeatureFlag.common]
>     gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
> @@ -49,5 +46,8 @@ [PcdsFixedAtBuild]
>     gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x00000000|UINT32|0x00000008
>     gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|0x00000000|UINT32|0x00000009
>   
> +  # GIC
> +  gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A
> +
>   [Ppis]
>     gNtFwConfigDtInfoPpiGuid     = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.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
>   #
>   
> -################################################################################
> -#
> -# Defines Section - statements that will be processed to create a Makefile.
> -#
> -################################################################################
> -[Defines]
> -  PLATFORM_NAME                  = ArmSgi
> -  PLATFORM_GUID                  = 3a6b2eae-0275-4b6e-a5d1-bd2ba1ce1fae
> -  PLATFORM_VERSION               = 0.1
> -  DSC_SPECIFICATION              = 0x0001001B
> -  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> -  SUPPORTED_ARCHITECTURES        = AARCH64|ARM
> -  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> -  SKUID_IDENTIFIER               = DEFAULT
> -  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> -  BUILD_NUMBER                   = 1
> -
>   !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>   
>   [BuildOptions]
> @@ -93,7 +76,7 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, Libr
>   
>   ################################################################################
>   #
> -# 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 platforms
>   #
>   ################################################################################
>   
> @@ -126,10 +109,6 @@ [PcdsFixedAtBuild.common]
>     gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
>     gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000
>   
> -  # GIC Base Addresses
> -  gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
> -  gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
> -
>     #
>     # PCIe
>     #
> @@ -177,10 +156,6 @@ [PcdsFixedAtBuild.common]
>     gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
>     gEmbeddedTokenSpaceGuid.PcdTimerPeriod|1000
>   
> -  # 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
>   
>     #
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.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=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> -  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> -  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> -  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
>     INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
> +!include $(BOARD_DXE_FV_COMPONENTS)
>   
>     # Required by PCI
>     INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
> 


  reply	other threads:[~2020-04-27 11:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 12:51 [edk2-platforms][PATCH v4 0/9]Platform/Arm/Sgi: Add platform support for RD-Daniel Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 1/9] Platform/ARM/Sgi: Create individual Platform Description File Aditya Angadi
2020-04-27 11:01   ` Ard Biesheuvel [this message]
2020-04-27 14:54     ` [edk2-devel] " Aditya Angadi
2020-04-27 14:55       ` Ard Biesheuvel
2020-05-03  4:49         ` Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 2/9] Platform/ARM/Sgi: Move the GIC related ACPI helper macros Aditya Angadi
2020-04-27 11:04   ` [edk2-devel] " Ard Biesheuvel
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 3/9] Platform/ARM/Sgi: Move common platform description to SSDT Aditya Angadi
2020-04-27 11:06   ` [edk2-devel] " Ard Biesheuvel
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 4/9] Platform/ARM/Sgi: Add support for remote numa memory nodes Aditya Angadi
2020-04-28 12:28   ` [edk2-devel] " Ard Biesheuvel
2020-04-28 13:15     ` Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 5/9] Platform/ARM/Sgi: Add ACPI tables for Rd-Daniel Config-M Aditya Angadi
2020-04-28 12:30   ` Ard Biesheuvel
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 6/9] Platform/ARM/Sgi: Add initial support for RD-Daniel Config-M platform Aditya Angadi
2020-04-28 12:32   ` Ard Biesheuvel
2020-04-28 13:18     ` Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 7/9] Platform/ARM/Sgi: Add ACPI tables for RD-Daniel Config-XLR Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 8/9] Platform/ARM/Sgi: Add initial support for RD-Daniel Config-XLR platform Aditya Angadi
2020-04-14 12:52 ` [edk2-platforms][PATCH v4 9/9] Platform/ARM/Sgi: Add SRAT table for RdN1Edge dual-chip platform Aditya Angadi
2020-04-14 13:50 ` [edk2-devel] [edk2-platforms][PATCH v4 0/9]Platform/Arm/Sgi: Add platform support for RD-Daniel Ard Biesheuvel
2020-04-14 14:17   ` Aditya Angadi
2020-04-15  4:34 ` Thomas Abraham
2020-04-22 12:12   ` Aditya Angadi
     [not found]   ` <16082330BC63CB95.30042@groups.io>
2020-04-26 10:12     ` Aditya Angadi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=132a8ddf-a0d7-3bf3-8fbd-3b0b4bd4d084@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox