public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel
@ 2020-03-25 10:52 Aditya Angadi
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi

This patch series adds support for Arm's RD-Daniel platform. There are two
configurations of this platform being added in this series - Config-M and
Config-XLR. RD-Daniel is the next Arm's reference design subsystem.

The first four patches consolidate the code in SgiPkg in preparation for
adding support for the RD-Daniel platform. The next four patches add support
for the RD-Daniel platforms.

Aditya Angadi (7):
  Platform/ARM/SgiPkg: move the GIC related ACPI helper macros
  Platform/ARM/SgiPkg: move common platform description to SSDT
  Platform/ARM/SgiPkg: remove PcdCoreCount and PcdClusterCount
  Platform/ARM/SgiPkg: add ACPI tables for Rd-Daniel Config-M
  Platform/ARM/Sgi: add initial support for RD-Daniel Config-M platform
  Platform/ARM/SgiPkg: add ACPI tables for RD-Daniel Config-XLR
  Platform/ARM/Sgi: add initial support for RD-Daniel Config-XLR
    platform

Thomas Abraham (1):
  Maintainers.txt: Update Arm platform reviewers list

Vijayenthiran Subramaniam (1):
  Platform/ARM/SgiPkg: create individual Platform Description File

 Maintainers.txt                               |   1 +
 .../SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl   | 118 ++++++++++++++
 .../SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc  | 134 ++++++++++++++++
 ...iTables.inf => RdDanielCfgMAcpiTables.inf} |  20 ++-
 .../SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl | 125 +++++++++++++++
 .../AcpiTables/RdDanielCfgXlr/Madt.aslc       | 150 ++++++++++++++++++
 ...ables.inf => RdDanielCfgXlrAcpiTables.inf} |  20 ++-
 .../ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl   |  70 +-------
 .../ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc  |  73 +--------
 .../SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf  |   5 +-
 .../ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl   |  69 +-------
 .../ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc  |  75 +--------
 .../SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf  |   5 +-
 .../SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc    |  69 +-------
 .../AcpiTables/RdN1EdgeX2AcpiTables.inf       |   3 +-
 .../ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc    |   9 +-
 .../SgiPkg/AcpiTables/Sgi575AcpiTables.inf    |   4 +-
 .../{RdN1Edge/Dsdt.asl => SsdtRos.asl}        |  67 ++------
 .../SgiPkg/Drivers/PlatformDxe/PlatformDxe.c  |  10 ++
 .../Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
 Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h   |  70 +++++++-
 Platform/ARM/SgiPkg/Include/SgiPlatform.h     |  12 +-
 .../Library/PlatformLib/PlatformLib.inf       |   6 +-
 .../Library/PlatformLib/PlatformLibMem.c      |   8 +-
 Platform/ARM/SgiPkg/RdDaniel.dsc              |  37 +++++
 Platform/ARM/SgiPkg/RdE1Edge.dsc              |  37 +++++
 Platform/ARM/SgiPkg/RdN1Edge.dsc              |  37 +++++
 Platform/ARM/SgiPkg/Sgi575.dsc                |  37 +++++
 Platform/ARM/SgiPkg/SgiPlatform.dec           |   7 +-
 Platform/ARM/SgiPkg/SgiPlatform.dsc           |  31 +---
 Platform/ARM/SgiPkg/SgiPlatform.fdf           |   2 +
 31 files changed, 848 insertions(+), 465 deletions(-)
 create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
 create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
 copy Platform/ARM/SgiPkg/AcpiTables/{RdN1EdgeX2AcpiTables.inf => RdDanielCfgMAcpiTables.inf} (67%)
 create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
 create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
 copy Platform/ARM/SgiPkg/AcpiTables/{RdN1EdgeX2AcpiTables.inf => RdDanielCfgXlrAcpiTables.inf} (67%)
 copy Platform/ARM/SgiPkg/AcpiTables/{RdN1Edge/Dsdt.asl => SsdtRos.asl} (57%)
 create mode 100644 Platform/ARM/SgiPkg/RdDaniel.dsc
 create mode 100644 Platform/ARM/SgiPkg/RdE1Edge.dsc
 create mode 100644 Platform/ARM/SgiPkg/RdN1Edge.dsc
 create mode 100644 Platform/ARM/SgiPkg/Sgi575.dsc

-- 
2.17.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:33   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC Aditya Angadi
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel
  Cc: Vijayenthiran Subramaniam, Leif Lindholm, Ard Biesheuvel,
	Aditya Angadi

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.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 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.dsc                         | 37 ++++++++++++++++++++
 Platform/ARM/SgiPkg/RdN1Edge.dsc                         | 37 ++++++++++++++++++++
 Platform/ARM/SgiPkg/Sgi575.dsc                           | 37 ++++++++++++++++++++
 Platform/ARM/SgiPkg/SgiPlatform.dec                      |  5 ++-
 Platform/ARM/SgiPkg/SgiPlatform.dsc                      | 25 ++-----------
 8 files changed, 124 insertions(+), 35 deletions(-)

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.dsc b/Platform/ARM/SgiPkg/RdE1Edge.dsc
new file mode 100644
index 000000000000..082cbb0157f7
--- /dev/null
+++ b/Platform/ARM/SgiPkg/RdE1Edge.dsc
@@ -0,0 +1,37 @@
+#
+#  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                  = ArmSgi
+  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
+  BUILD_NUMBER                   = 1
+
+# include common definitions from SgiPlatform.dsc
+!include Platform/ARM/SgiPkg/SgiPlatform.dsc
+
+################################################################################
+#
+# 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
diff --git a/Platform/ARM/SgiPkg/RdN1Edge.dsc b/Platform/ARM/SgiPkg/RdN1Edge.dsc
new file mode 100644
index 000000000000..6774990ad6f6
--- /dev/null
+++ b/Platform/ARM/SgiPkg/RdN1Edge.dsc
@@ -0,0 +1,37 @@
+#
+#  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                  = ArmSgi
+  PLATFORM_GUID                  = dbc75915-03df-4640-8f3d-3d3abf7c119b
+  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 common definitions from SgiPlatform.dsc
+!include Platform/ARM/SgiPkg/SgiPlatform.dsc
+
+################################################################################
+#
+# 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
diff --git a/Platform/ARM/SgiPkg/Sgi575.dsc b/Platform/ARM/SgiPkg/Sgi575.dsc
new file mode 100644
index 000000000000..3c1904c2da91
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Sgi575.dsc
@@ -0,0 +1,37 @@
+#
+#  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                  = 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 common definitions from SgiPlatform.dsc
+!include Platform/ARM/SgiPkg/SgiPlatform.dsc
+
+################################################################################
+#
+# 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
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index 9d70ec677776..4ac3dec91e3d 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
 #
@@ -49,5 +49,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
index 5226c5751e98..4e1fcefb1442 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -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
   #
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:35   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common Aditya Angadi
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

Move the ACPI helper macros defines related to GIC structure,
distributor, redistributor and ITS to SgiAcpiHeader.h as these are
common across ARM SGI/RD platforms.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc   | 68 +------------------
 Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc   | 68 +------------------
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 57 +---------------
 Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h         | 70 +++++++++++++++++++-
 4 files changed, 72 insertions(+), 191 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
index 48e7a61478e8..987254928535 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
@@ -1,7 +1,7 @@
 /** @file
 *  Multiple APIC Description Table (MADT)
 *
-*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -14,72 +14,6 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
-// 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)           \
-  {                                                                            \
-    EFI_ACPI_6_2_GIC,                     /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    GicId,                                /* CPUInterfaceNumber */             \
-    AcpiCpuUid,                           /* AcpiProcessorUid */               \
-    Flags,                                /* Flags */                          \
-    0,                                    /* ParkingProtocolVersion */         \
-    PmuIrq,                               /* PerformanceInterruptGsiv */       \
-    0,                                    /* ParkedAddress */                  \
-    GicBase,                              /* PhysicalBaseAddress */            \
-    GicVBase,                             /* GICV */                           \
-    GicHBase,                             /* GICH */                           \
-    GsivId,                               /* VGICMaintenanceInterrupt */       \
-    GicRBase,                             /* GICRBaseAddress */                \
-    Mpidr,                                /* MPIDR */                          \
-    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
-  GicDistVector, GicVersion)                                                   \
-  {                                                                            \
-    EFI_ACPI_6_2_GICD,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
-    GicDistHwId,                          /* GicId */                          \
-    GicDistBase,                          /* PhysicalBaseAddress */            \
-    GicDistVector,                        /* SystemVectorBase */               \
-    GicVersion,                           /* GicVersion */                     \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
-  {                                                                            \
-    EFI_ACPI_6_2_GICR,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
-    RedisDiscLength                       /* DiscoveryRangeLength */           \
-  }
-
-// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
-#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
-  {                                                                            \
-    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    GicItsId,                             /* GicItsId */                       \
-    GicItsBase,                           /* PhysicalBaseAddress */            \
-    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
-  }
-
 // Multiple APIC Description Table
 #pragma pack (1)
 
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
index 6312743a479c..05eb78c5616a 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
@@ -1,7 +1,7 @@
 /** @file
 *  Multiple APIC Description Table (MADT)
 *
-*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -17,72 +17,6 @@
 #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)           \
-  {                                                                            \
-    EFI_ACPI_6_2_GIC,                     /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    GicId,                                /* CPUInterfaceNumber */             \
-    AcpiCpuUid,                           /* AcpiProcessorUid */               \
-    Flags,                                /* Flags */                          \
-    0,                                    /* ParkingProtocolVersion */         \
-    PmuIrq,                               /* PerformanceInterruptGsiv */       \
-    0,                                    /* ParkedAddress */                  \
-    GicBase,                              /* PhysicalBaseAddress */            \
-    GicVBase,                             /* GICV */                           \
-    GicHBase,                             /* GICH */                           \
-    GsivId,                               /* VGICMaintenanceInterrupt */       \
-    GicRBase,                             /* GICRBaseAddress */                \
-    Mpidr,                                /* MPIDR */                          \
-    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
-  GicDistVector, GicVersion)                                                   \
-  {                                                                            \
-    EFI_ACPI_6_2_GICD,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
-    GicDistHwId,                          /* GicId */                          \
-    GicDistBase,                          /* PhysicalBaseAddress */            \
-    GicDistVector,                        /* SystemVectorBase */               \
-    GicVersion,                           /* GicVersion */                     \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
-  {                                                                            \
-    EFI_ACPI_6_2_GICR,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
-    RedisDiscLength                       /* DiscoveryRangeLength */           \
-  }
-
-// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
-#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
-  {                                                                            \
-    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    GicItsId,                             /* GicItsId */                       \
-    GicItsBase,                           /* PhysicalBaseAddress */            \
-    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
-  }
-
 // Multiple APIC Description Table
 #pragma pack (1)
 
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
index d4538233d760..47368931e367 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
@@ -1,7 +1,7 @@
 /** @file
 *  Multiple APIC Description Table (MADT)
 *
-*  Copyright (c) 2019, ARM Limited. All rights reserved.
+*  Copyright (c) 2019-2020, ARM Limited. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -19,61 +19,6 @@
 
 #define CHIP_CNT   2
 
-// 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)           \
-  {                                                                            \
-    EFI_ACPI_6_2_GIC,                     /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    GicId,                                /* CPUInterfaceNumber */             \
-    AcpiCpuUid,                           /* AcpiProcessorUid */               \
-    Flags,                                /* Flags */                          \
-    0,                                    /* ParkingProtocolVersion */         \
-    PmuIrq,                               /* PerformanceInterruptGsiv */       \
-    0,                                    /* ParkedAddress */                  \
-    GicBase,                              /* PhysicalBaseAddress */            \
-    GicVBase,                             /* GICV */                           \
-    GicHBase,                             /* GICH */                           \
-    GsivId,                               /* VGICMaintenanceInterrupt */       \
-    GicRBase,                             /* GICRBaseAddress */                \
-    Mpidr,                                /* MPIDR */                          \
-    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
-  GicDistVector, GicVersion)                                                   \
-  {                                                                            \
-    EFI_ACPI_6_2_GICD,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
-    GicDistHwId,                          /* GicId */                          \
-    GicDistBase,                          /* PhysicalBaseAddress */            \
-    GicDistVector,                        /* SystemVectorBase */               \
-    GicVersion,                           /* GicVersion */                     \
-    {                                                                          \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
-      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
-      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
-    }                                                                          \
-  }
-
-// EFI_ACPI_6_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
-  {                                                                            \
-    EFI_ACPI_6_2_GICR,                    /* Type */                           \
-    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
-    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
-    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
-    RedisDiscLength                       /* DiscoveryRangeLength */           \
-  }
-
 // Multiple APIC Description Table
 #pragma pack (1)
 
diff --git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
index 5083dde15dd5..ecb0d4eccf24 100644
--- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
+++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.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
 *
@@ -9,6 +9,8 @@
 #ifndef __SGI_ACPI_HEADER__
 #define __SGI_ACPI_HEADER__
 
+#include <IndustryStandard/Acpi.h>
+
 //
 // ACPI table information used to initialize tables.
 //
@@ -32,4 +34,70 @@
     EFI_ACPI_ARM_CREATOR_REVISION   /* UINT32  CreatorRevision */ \
   }
 
+// 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)           \
+  {                                                                            \
+    EFI_ACPI_6_2_GIC,                     /* Type */                           \
+    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
+    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
+    GicId,                                /* CPUInterfaceNumber */             \
+    AcpiCpuUid,                           /* AcpiProcessorUid */               \
+    Flags,                                /* Flags */                          \
+    0,                                    /* ParkingProtocolVersion */         \
+    PmuIrq,                               /* PerformanceInterruptGsiv */       \
+    0,                                    /* ParkedAddress */                  \
+    GicBase,                              /* PhysicalBaseAddress */            \
+    GicVBase,                             /* GICV */                           \
+    GicHBase,                             /* GICH */                           \
+    GsivId,                               /* VGICMaintenanceInterrupt */       \
+    GicRBase,                             /* GICRBaseAddress */                \
+    Mpidr,                                /* MPIDR */                          \
+    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
+    {                                                                          \
+      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
+      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
+      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
+    }                                                                          \
+  }
+
+// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
+#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
+  GicDistVector, GicVersion)                                                   \
+  {                                                                            \
+    EFI_ACPI_6_2_GICD,                    /* Type */                           \
+    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
+    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
+    GicDistHwId,                          /* GicId */                          \
+    GicDistBase,                          /* PhysicalBaseAddress */            \
+    GicDistVector,                        /* SystemVectorBase */               \
+    GicVersion,                           /* GicVersion */                     \
+    {                                                                          \
+      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
+      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
+      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
+    }                                                                          \
+  }
+
+// EFI_ACPI_6_2_GICR_STRUCTURE
+#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
+  {                                                                            \
+    EFI_ACPI_6_2_GICR,                    /* Type */                           \
+    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
+    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
+    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
+    RedisDiscLength                       /* DiscoveryRangeLength */           \
+  }
+
+// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
+#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
+  {                                                                            \
+    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
+    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
+    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
+    GicItsId,                             /* GicItsId */                       \
+    GicItsBase,                           /* PhysicalBaseAddress */            \
+    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
+  }
+
 #endif /* __SGI_ACPI_HEADER__ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:36   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Aditya Angadi
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

Move common platform description entries in platfrom specific DSDT to
a SSDT that can be reused on all SGI/RD platforms.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl                  | 70 +-------------------
 Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf             |  3 +-
 Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl                  | 69 +------------------
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf             |  3 +-
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf           |  1 +
 Platform/ARM/SgiPkg/AcpiTables/{RdN1Edge/Dsdt.asl => SsdtRos.asl} | 67 ++++---------------
 6 files changed, 19 insertions(+), 194 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
index 5583e610973b..d66c7cbf4183 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
@@ -1,7 +1,7 @@
 /** @file
 *  Differentiated System Description Table Fields (DSDT)
 *
-*  Copyright (c) 2018, ARM Ltd. All rights reserved.
+*  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -208,73 +208,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
       Name (_STA, 0xF)
     }
 
-    // UART PL011
-    Device (COM0) {
-      Name (_HID, "ARMH0011")
-      Name (_CID, "ARMH0011")
-      Name (_UID, Zero)
-      Name (_STA, 0xF)
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (
-          ReadWrite,
-          FixedPcdGet64 (PcdSerialDbgRegisterBase),
-          0x1000
-        )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
-      })
-    }
-
-    // SMSC 91C111
-    Device (ETH0) {
-      Name (_HID, "LNRO0003")
-      Name (_UID, Zero)
-      Name (_STA, 0xF)
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (ReadWrite, 0x18000000, 0x1000)
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 }
-      })
-      Name (_DSD, Package() {
-        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
-        Package () {
-          Package (2) {"reg-io-width", 4 },
-        }
-      })
-    }
-
-    // VIRTIO DISK
-    Device (VR00) {
-      Name (_HID, "LNRO0005")
-      Name (_UID, 0)
-      Name (_CCA, 1)    // mark the device coherent
-
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (
-          ReadWrite,
-          FixedPcdGet32 (PcdVirtioBlkBaseAddress),
-          FixedPcdGet32 (PcdVirtioBlkSize)
-        )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
-          FixedPcdGet32 (PcdVirtioBlkInterrupt)
-        }
-      })
-    }
-
-    // VIRTIO NET
-    Device (VR01) {
-      Name (_HID, "LNRO0005")
-      Name (_UID, 1)
-      Name (_CCA, 1)    // mark the device coherent
-
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (
-          ReadWrite,
-          FixedPcdGet32 (PcdVirtioNetBaseAddress),
-          FixedPcdGet32 (PcdVirtioNetSize)
-        )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
-          FixedPcdGet32 (PcdVirtioNetInterrupt)
-        }
-      })
-    }
   } // Scope(_SB)
 }
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
index 3a4d4e7b9502..b08d7c2df5c7 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
@@ -1,7 +1,7 @@
 ## @file
 #  ACPI table data and ASL sources required to boot the platform.
 #
-#  Copyright (c) 2018, ARM Ltd. All rights reserved.
+#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -16,6 +16,7 @@ [Defines]
 
 [Sources]
   Dbg2.aslc
+  SsdtRos.asl
   Fadt.aslc
   Gtdt.aslc
   Iort.aslc
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
index 45316d5005f4..cb05eed35878 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
@@ -1,7 +1,7 @@
 /** @file
 *  Differentiated System Description Table Fields (DSDT)
 *
-*  Copyright (c) 2018, ARM Ltd. All rights reserved.
+*  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -62,72 +62,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
       Name (_STA, 0xF)
     }
 
-    // UART PL011
-    Device (COM0) {
-      Name (_HID, "ARMH0011")
-      Name (_CID, "ARMH0011")
-      Name (_UID, Zero)
-      Name (_STA, 0xF)
-      Name (_CRS, ResourceTemplate () {
-        Memory32Fixed (
-          ReadWrite,
-          FixedPcdGet64 (PcdSerialDbgRegisterBase),
-          0x1000
-          )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
-      })
-    }
-
-    // SMSC 91C111
-    Device (ETH0) {
-      Name (_HID, "LNRO0003")
-      Name (_UID, Zero)
-      Name (_STA, 0xF)
-      Name (_CRS, ResourceTemplate () {
-        Memory32Fixed (ReadWrite, 0x18000000, 0x1000)
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 }
-      })
-      Name (_DSD, Package() {
-        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
-                Package() {
-                  Package(2) {"reg-io-width", 4 },
-                }
-      })
-    }
-
-    // VIRTIO DISK
-    Device (VR00) {
-      Name (_HID, "LNRO0005")
-      Name (_UID, 0)
-      Name (_CCA, 1)    // mark the device coherent
-
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (
-          ReadWrite,
-          FixedPcdGet32 (PcdVirtioBlkBaseAddress),
-          FixedPcdGet32 (PcdVirtioBlkSize)
-        )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
-          FixedPcdGet32 (PcdVirtioBlkInterrupt)
-        }
-      })
-    }
-
-    // VIRTIO NET
-    Device (VR01) {
-      Name (_HID, "LNRO0005")
-      Name (_UID, 1)
-      Name (_CCA, 1)    // mark the device coherent
-
-      Name (_CRS, ResourceTemplate() {
-        Memory32Fixed (ReadWrite,
-          FixedPcdGet32 (PcdVirtioNetBaseAddress),
-          FixedPcdGet32 (PcdVirtioNetSize)
-        )
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
-          FixedPcdGet32 (PcdVirtioNetInterrupt)
-        }
-      })
-    }
   } // Scope(_SB)
 }
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
index 58c33ecb8ec2..61b07bffccf3 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
@@ -1,7 +1,7 @@
 ## @file
 #  ACPI table data and ASL sources required to boot the platform.
 #
-#  Copyright (c) 2018, ARM Ltd. All rights reserved.
+#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -16,6 +16,7 @@ [Defines]
 
 [Sources]
   Dbg2.aslc
+  SsdtRos.asl
   Fadt.aslc
   Gtdt.aslc
   Iort.aslc
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
index 1b584b152455..a4d5904f671c 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
@@ -16,6 +16,7 @@ [Defines]
 
 [Sources]
   Dbg2.aslc
+  SsdtRos.asl
   Fadt.aslc
   Gtdt.aslc
   Iort.aslc
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
similarity index 57%
copy from Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
copy to Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
index 45316d5005f4..95ae23c1f547 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
@@ -1,67 +1,24 @@
 /** @file
-*  Differentiated System Description Table Fields (DSDT)
+*  Secondary System Description Table Fields (SSDT)
 *
-*  Copyright (c) 2018, ARM Ltd. All rights reserved.
+*  Copyright (c) 2020, ARM Ltd. All rights reserved.
 *
-*  SPDX-License-Identifier: BSD-2-Clause-Patent
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 *
 **/
 
 #include "SgiPlatform.h"
 #include "SgiAcpiHeader.h"
 
-DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
+DefinitionBlock ("SsdtRosTable.aml", "SSDT", 1, "ARMLTD", "ARMSGI",
                  EFI_ACPI_ARM_OEM_REVISION) {
   Scope (_SB) {
-
-    Device (CP00) { // Neoverse-N1: Cluster 0, Cpu 0
-      Name (_HID, "ACPI0007")
-      Name (_UID, 0)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP01) { // Neoverse-N1: Cluster 0, Cpu 1
-      Name (_HID, "ACPI0007")
-      Name (_UID, 1)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP02) { // Neoverse-N1: Cluster 0, Cpu 2
-      Name (_HID, "ACPI0007")
-      Name (_UID, 2)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP03) { // Neoverse-N1: Cluster 0, Cpu 3
-      Name (_HID, "ACPI0007")
-      Name (_UID, 3)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP04) { // Neoverse-N1: Cluster 1, Cpu 0
-      Name (_HID, "ACPI0007")
-      Name (_UID, 4)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP05) { // Neoverse-N1: Cluster 1, Cpu 1
-      Name (_HID, "ACPI0007")
-      Name (_UID, 5)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP06) { // Neoverse-N1: Cluster 1, Cpu 2
-      Name (_HID, "ACPI0007")
-      Name (_UID, 6)
-      Name (_STA, 0xF)
-    }
-
-    Device (CP07) { // Neoverse-N1: Cluster 1, Cpu 3
-      Name (_HID, "ACPI0007")
-      Name (_UID, 7)
-      Name (_STA, 0xF)
-    }
-
     // UART PL011
     Device (COM0) {
       Name (_HID, "ARMH0011")
@@ -73,7 +30,7 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
           ReadWrite,
           FixedPcdGet64 (PcdSerialDbgRegisterBase),
           0x1000
-          )
+        )
         Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
       })
     }
@@ -129,5 +86,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
         }
       })
     }
-  } // Scope(_SB)
+  }
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (2 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:37   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

The number of CPUs depend on the SGI/RD platform. So instead of
defining a Fixed PCD to specify the value of core and cluster count,
let each platform define these values.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc       |  7 ++++++-
 Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf   |  2 --
 Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc       |  7 ++++---
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf   |  2 --
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc     | 12 ++++++------
 Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf |  2 --
 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc         |  9 +++++----
 Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf     |  4 +---
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |  3 ---
 Platform/ARM/SgiPkg/SgiPlatform.dsc                     |  4 ----
 10 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
index 987254928535..a9540f2e0374 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
@@ -14,12 +14,17 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
+#define CLUSTER_COUNT                 2
+#define CORES_PER_CLUSTER             8
+#define THREADS_PER_CORE              2
+#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER * THREADS_PER_CORE)
+
 // Multiple APIC Description Table
 #pragma pack (1)
 
 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_COUNT];
   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 b08d7c2df5c7..742ca9e68335 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
@@ -34,8 +34,6 @@ [Packages]
   Platform/ARM/SgiPkg/SgiPlatform.dec
 
 [FixedPcd]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-  gArmPlatformTokenSpaceGuid.PcdClusterCount
   gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
   gArmPlatformTokenSpaceGuid.PL011UartInterrupt
 
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
index 05eb78c5616a..d8ec0ce421dc 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
@@ -14,15 +14,16 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
-#define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
-                    FixedPcdGet32 (PcdCoreCount))
+#define CLUSTER_COUNT                 2
+#define CORES_PER_CLUSTER             4
+#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
 
 // Multiple APIC Description Table
 #pragma pack (1)
 
 typedef struct {
   EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
-  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_CNT];
+  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
   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/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
index 61b07bffccf3..206479f9428e 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
@@ -34,8 +34,6 @@ [Packages]
   Platform/ARM/SgiPkg/SgiPlatform.dec
 
 [FixedPcd]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-  gArmPlatformTokenSpaceGuid.PcdClusterCount
   gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
   gArmPlatformTokenSpaceGuid.PL011UartInterrupt
 
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
index 47368931e367..add972437496 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
@@ -14,19 +14,19 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
-#define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
-                    FixedPcdGet32 (PcdCoreCount))
-
-#define CHIP_CNT   2
+#define CLUSTER_COUNT                 2
+#define CORES_PER_CLUSTER             4
+#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
+#define CHIP_COUNT   2
 
 // Multiple APIC Description Table
 #pragma pack (1)
 
 typedef struct {
   EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER  Header;
-  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_CNT * CHIP_CNT];
+  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_COUNT * CHIP_COUNT];
   EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE               GicDistributor;
-  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_CNT];
+  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_COUNT];
 } EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
 
 #pragma pack ()
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
index a4d5904f671c..8aec5e094e1a 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
@@ -34,8 +34,6 @@ [Packages]
   Platform/ARM/SgiPkg/SgiPlatform.dec
 
 [FixedPcd]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-  gArmPlatformTokenSpaceGuid.PcdClusterCount
   gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
   gArmPlatformTokenSpaceGuid.PL011UartInterrupt
 
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
index dedabaaecdf4..ca259247785f 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
@@ -1,7 +1,7 @@
 /** @file
 *  Multiple APIC Description Table (MADT)
 *
-*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -14,8 +14,9 @@
 #include <Library/PcdLib.h>
 #include <IndustryStandard/Acpi.h>
 
-#define CORES   (FixedPcdGet32 (PcdClusterCount) * \
-                 FixedPcdGet32 (PcdCoreCount))
+#define CLUSTER_COUNT                     2
+#define CORES_PER_CLUSTER                 4
+#define CORE_COUNT                        (CLUSTER_COUNT * CORES_PER_CLUSTER)
 
 // EFI_ACPI_6_1_GIC_STRUCTURE
 #define EFI_ACPI_6_1_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,      \
@@ -90,7 +91,7 @@
 
 typedef struct {
   EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
-  EFI_ACPI_6_1_GIC_STRUCTURE                            GicInterfaces[CORES];
+  EFI_ACPI_6_1_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
   EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
   EFI_ACPI_6_1_GICR_STRUCTURE                           GicRedistributor;
   EFI_ACPI_6_1_GIC_ITS_STRUCTURE                        GicIts;
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
index 097ef854df42..df390c152648 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
@@ -1,7 +1,7 @@
 ## @file
 #  ACPI table data and ASL sources required to boot the platform.
 #
-#  Copyright (c) 2018, ARM Ltd. All rights reserved.
+#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -33,8 +33,6 @@ [Packages]
   Platform/ARM/SgiPkg/SgiPlatform.dec
 
 [FixedPcd]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-  gArmPlatformTokenSpaceGuid.PcdClusterCount
   gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
   gArmPlatformTokenSpaceGuid.PL011UartInterrupt
 
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
index a918afef5fba..fe96f5385d57 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
@@ -37,9 +37,6 @@ [Sources.AARCH64]
   AArch64/Helper.S | GCC
 
 [FixedPcd]
-  gArmPlatformTokenSpaceGuid.PcdClusterCount
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-
   gArmSgiTokenSpaceGuid.PcdDramBlock2Base
   gArmSgiTokenSpaceGuid.PcdDramBlock2Size
   gArmSgiTokenSpaceGuid.PcdGicSize
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 4e1fcefb1442..7b95acb9db46 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -156,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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (3 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:40   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support Aditya Angadi
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

Add Madt and Dsdt ACPI tables for RD-Daniel Config-M platform.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl      | 118 +++++++++++++++++
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc     | 134 ++++++++++++++++++++
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf |  63 +++++++++
 Platform/ARM/SgiPkg/SgiPlatform.dec                       |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc                       |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf                       |   1 +
 6 files changed, 318 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
new file mode 100644
index 000000000000..57873ef5cfa2
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
@@ -0,0 +1,118 @@
+/** @file
+*  Differentiated System Description Table Fields (DSDT)
+*
+*  Copyright (c) 2020, ARM Ltd. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include "SgiPlatform.h"
+#include "SgiAcpiHeader.h"
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
+                 EFI_ACPI_ARM_OEM_REVISION) {
+  Scope (_SB) {
+    Device (CP00) { // Zeus core 0
+      Name (_HID, "ACPI0007")
+      Name (_UID, 0)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP01) { // Zeus core 1
+      Name (_HID, "ACPI0007")
+      Name (_UID, 1)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP02) { // Zeus core 2
+      Name (_HID, "ACPI0007")
+      Name (_UID, 2)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP03) { // Zeus core 3
+      Name (_HID, "ACPI0007")
+      Name (_UID, 3)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP04) { // Zeus core 4
+      Name (_HID, "ACPI0007")
+      Name (_UID, 4)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP05) { // Zeus core 5
+      Name (_HID, "ACPI0007")
+      Name (_UID, 5)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP06) { // Zeus core 6
+      Name (_HID, "ACPI0007")
+      Name (_UID, 6)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP07) { // Zeus core 7
+      Name (_HID, "ACPI0007")
+      Name (_UID, 7)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP08) { // Zeus core 8
+      Name (_HID, "ACPI0007")
+      Name (_UID, 8)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP09) { // Zeus core 9
+      Name (_HID, "ACPI0007")
+      Name (_UID, 9)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP10) { // Zeus core 10
+      Name (_HID, "ACPI0007")
+      Name (_UID, 10)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP11) { // Zeus core 11
+      Name (_HID, "ACPI0007")
+      Name (_UID, 11)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP12) { // Zeus core 12
+      Name (_HID, "ACPI0007")
+      Name (_UID, 12)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP13) { // Zeus core 13
+      Name (_HID, "ACPI0007")
+      Name (_UID, 13)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP14) { // Zeus core 14
+      Name (_HID, "ACPI0007")
+      Name (_UID, 14)
+      Name (_STA, 0xF)
+    }
+
+   Device (CP15) { // Zeus core 15
+      Name (_HID, "ACPI0007")
+      Name (_UID, 15)
+      Name (_STA, 0xF)
+    }
+  } // Scope(_SB)
+}
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
new file mode 100644
index 000000000000..3027b8d223b4
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
@@ -0,0 +1,134 @@
+/** @file
+*  Multiple APIC Description Table (MADT)
+*
+*  Copyright (c) 2020, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include "SgiPlatform.h"
+#include "SgiAcpiHeader.h"
+#include <Library/AcpiLib.h>
+#include <Library/ArmLib.h>
+#include <Library/PcdLib.h>
+#include <IndustryStandard/Acpi.h>
+
+#define CLUSTER_COUNT           16
+#define CORES_PER_CLUSTER       1
+#define CORE_COUNT              (CLUSTER_COUNT * CORES_PER_CLUSTER)
+
+// Multiple APIC Description Table
+#pragma pack (1)
+
+typedef struct {
+  EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
+  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
+  EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
+  EFI_ACPI_6_2_GICR_STRUCTURE                           GicRedistributor;
+} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+  {
+    ARM_ACPI_HEADER (
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE,
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
+    ),
+    // MADT specific fields
+    0, // LocalApicAddress
+    0  // Flags
+  },
+  {
+    // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,
+    //                                          PmuIrq, GicBase, GicVBase,
+    //                                          GicHBase, GsivId, GicRBase,
+    //                                          Efficiency)
+    // Note: The GIC Structure of the primary CPU must be the first entry
+    // (see note in 5.2.12.14 GICC Structure of ACPI v6.2).
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
+      0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
+      0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
+      0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
+      0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core4
+      0, 4, GET_MPID(0x400, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core5
+      0, 5, GET_MPID(0x500, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core6
+      0, 6, GET_MPID(0x600, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core7
+      0, 7, GET_MPID(0x700, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core8
+      0, 8, GET_MPID(0x800, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core9
+      0, 9, GET_MPID(0x900, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core10
+      0, 10, GET_MPID(0xa00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core11
+      0, 11, GET_MPID(0xb00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core12
+      0, 12, GET_MPID(0xc00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core13
+      0, 13, GET_MPID(0xd00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core14
+      0, 14, GET_MPID(0xe00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core15
+      0, 15, GET_MPID(0xf00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+  },
+  // GIC Distributor Entry
+  EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase),
+                                    0, 3),
+  // GIC Redistributor
+  EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase),
+                                      SIZE_16MB),
+};
+
+//
+// Reference the table being generated to prevent the optimizer from removing
+// the data structure from the executable
+//
+VOID* CONST ReferenceAcpiTable = &Madt;
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
new file mode 100644
index 000000000000..73b6c7ffafbb
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
@@ -0,0 +1,63 @@
+## @file
+#  ACPI table data and ASL sources required to boot the platform.
+#
+#  Copyright (c) 2020, ARM Ltd. All rights reserved.
+#
+#  This program and the accompanying materials are licensed and made available
+#  under the terms and conditions of the BSD License which accompanies this
+#  distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x0001001A
+  BASE_NAME                      = RdDanielCfgMAcpiTables
+  FILE_GUID                      = 163132b3-8ec1-48f7-b4d1-49306c3f4d51
+  MODULE_TYPE                    = USER_DEFINED
+  VERSION_STRING                 = 1.0
+
+[Sources]
+  Dbg2.aslc
+  SsdtRos.asl
+  Fadt.aslc
+  Gtdt.aslc
+  Iort.aslc
+  Mcfg.aslc
+  RdDanielCfgM/Dsdt.asl
+  RdDanielCfgM/Madt.aslc
+  Spcr.aslc
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+  gArmTokenSpaceGuid.PcdGicDistributorBase
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
+  gArmTokenSpaceGuid.PcdPciBusMin
+  gArmTokenSpaceGuid.PcdPciBusMax
+
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
+  gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioNetSize
+  gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index 4ac3dec91e3d..a89bf26365d7 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -30,6 +30,7 @@ [Guids.common]
   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 } }
+  gRdDanielCfgMAcpiTablesFileGuid = { 0x163132b3, 0x8ec1, 0x48f7, {0xb4, 0xd1, 0x49, 0x30, 0x6c, 0x3f, 0x4d, 0x51} }
 
 [PcdsFeatureFlag.common]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 7b95acb9db46..74fe1a4533bd 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -256,6 +256,7 @@ [Components.common]
   Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
   Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
   Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
+  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   #
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 3d13998015b9..48192917e22e 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -103,6 +103,7 @@ [FV.FvMain]
   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 RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   # Required by PCI
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (4 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:39   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

Add information in the SGI platform descriptor HOB to pick the correct
ACPI table to install for RD-Daniel Config-M

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   |  5 +++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |  1 +
 Platform/ARM/SgiPkg/Include/SgiPlatform.h               |  4 +++
 Platform/ARM/SgiPkg/RdDaniel.dsc                        | 37 ++++++++++++++++++++
 4 files changed, 47 insertions(+)

diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 387397d74598..7e0de765f753 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -46,6 +46,11 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = {
       RD_E1_EDGE_CONF_ID,
       MULTI_CHIP_MODE_DISABLED,
       &gRdE1EdgeAcpiTablesFileGuid),
+  ACPI_GUID_LOOKUP (
+      RD_DANIEL_PART_NUM,
+      RD_DANIEL_CFGM_CONF_ID,
+      MULTI_CHIP_MODE_DISABLED,
+      &gRdDanielCfgMAcpiTablesFileGuid),
 };
 
 VOID
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
index 741dcc75ed6a..82569820b78c 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
@@ -34,6 +34,7 @@ [Guids]
   gRdN1EdgeAcpiTablesFileGuid
   gRdN1EdgeX2AcpiTablesFileGuid
   gRdE1EdgeAcpiTablesFileGuid
+  gRdDanielCfgMAcpiTablesFileGuid
 
 [FeaturePcd]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
index d87fb2b5409f..b6a427b8b657 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -70,6 +70,10 @@
 #define RD_N1_EDGE_CONF_ID                        0x1
 #define RD_E1_EDGE_CONF_ID                        0x2
 
+//RDDANIEL Platform Identification values
+#define RD_DANIEL_PART_NUM                        0x78A
+#define RD_DANIEL_CFGM_CONF_ID                    0x1
+
 #define SGI_CONFIG_MASK                           0x0F
 #define SGI_CONFIG_SHIFT                          0x1C
 #define SGI_PART_NUM_MASK                         0xFFF
diff --git a/Platform/ARM/SgiPkg/RdDaniel.dsc b/Platform/ARM/SgiPkg/RdDaniel.dsc
new file mode 100644
index 000000000000..83e7ccd0bc05
--- /dev/null
+++ b/Platform/ARM/SgiPkg/RdDaniel.dsc
@@ -0,0 +1,37 @@
+#
+#  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                  = ArmSgi
+  PLATFORM_GUID                  = d301ac4e-0828-4cef-b754-34ca9b6781b5
+  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 common definitions from SgiPlatform.dsc
+!include Platform/ARM/SgiPkg/SgiPlatform.dsc
+
+################################################################################
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+################################################################################
+
+[PcdsFixedAtBuild.common]
+  # GIC Base Addresses
+  gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x30140000
+  gArmSgiTokenSpaceGuid.PcdGicSize|0x200000
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (5 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:45   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support Aditya Angadi
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

RD-Daniel Config-XLR is a platform in which four identical chips are
connected via a high speed CCIX link. Add Madt and Dsdt tables for the
same.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl      | 125 ++++++++++++++++
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc     | 150 ++++++++++++++++++++
 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf |  63 ++++++++
 Platform/ARM/SgiPkg/SgiPlatform.dec                         |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc                         |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf                         |   1 +
 6 files changed, 341 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
new file mode 100644
index 000000000000..23ada55ec4a1
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
@@ -0,0 +1,125 @@
+/** @file
+*  Differentiated System Description Table Fields (DSDT)
+*
+*  Copyright (c) 2020, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include "SgiPlatform.h"
+#include "SgiAcpiHeader.h"
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
+                 EFI_ACPI_ARM_OEM_REVISION) {
+  Scope (_SB) {
+
+    Device (CP00) { // Zeus core 0
+      Name (_HID, "ACPI0007")
+      Name (_UID, 0)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP01) { // Zeus core 1
+      Name (_HID, "ACPI0007")
+      Name (_UID, 1)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP02) { // Zeus core 2
+      Name (_HID, "ACPI0007")
+      Name (_UID, 2)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP03) { // Zeus core 3
+      Name (_HID, "ACPI0007")
+      Name (_UID, 3)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP04) { // Zeus core 4
+      Name (_HID, "ACPI0007")
+      Name (_UID, 4)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP05) { // Zeus core 5
+      Name (_HID, "ACPI0007")
+      Name (_UID, 5)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP06) { // Zeus core 6
+      Name (_HID, "ACPI0007")
+      Name (_UID, 6)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP07) { // Zeus core 7
+      Name (_HID, "ACPI0007")
+      Name (_UID, 7)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP08) { // Zeus core 8
+      Name (_HID, "ACPI0007")
+      Name (_UID, 8)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP09) { // Zeus core 9
+      Name (_HID, "ACPI0007")
+      Name (_UID, 9)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP10) { // Zeus core 10
+      Name (_HID, "ACPI0007")
+      Name (_UID, 10)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP11) { // Zeus core 11
+      Name (_HID, "ACPI0007")
+      Name (_UID, 11)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP12) { // Zeus core 12
+      Name (_HID, "ACPI0007")
+      Name (_UID, 12)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP13) { // Zeus core 13
+      Name (_HID, "ACPI0007")
+      Name (_UID, 13)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP14) { // Zeus core 14
+      Name (_HID, "ACPI0007")
+      Name (_UID, 14)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP15) { // Zeus core 15
+      Name (_HID, "ACPI0007")
+      Name (_UID, 15)
+      Name (_STA, 0xF)
+    }
+
+    Device (CP16) { // Zeus core 16
+      Name (_HID, "ACPI0007")
+      Name (_UID, 16)
+      Name (_STA, 0xF)
+    }
+  } // Scope(_SB)
+}
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
new file mode 100644
index 000000000000..e3784b55f2e5
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
@@ -0,0 +1,150 @@
+/** @file
+*  Multiple APIC Description Table (MADT)
+*
+*  Copyright (c) 2020, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include "SgiPlatform.h"
+#include "SgiAcpiHeader.h"
+#include <Library/AcpiLib.h>
+#include <Library/ArmLib.h>
+#include <Library/PcdLib.h>
+#include <IndustryStandard/Acpi.h>
+
+#define CLUSTER_COUNT                 4
+#define CORES_PER_CLUSTER             1
+#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
+#define CHIP_COUNT                    4
+
+// Multiple APIC Description Table
+#pragma pack (1)
+
+typedef struct {
+  EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER  Header;
+  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_COUNT * CHIP_COUNT];
+  EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE               GicDistributor;
+  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_COUNT];
+} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+  {
+    ARM_ACPI_HEADER (
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE,
+      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
+    ),
+    // MADT specific fields
+    0, // LocalApicAddress
+    0  // Flags
+  },
+  {
+    // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,
+    //                                          PmuIrq, GicBase, GicVBase,
+    //                                          GicHBase, GsivId, GicRBase,
+    //                                          Efficiency)
+    // Note: The GIC Structure of the primary CPU must be the first entry
+    // (see note in 5.2.12.14 GICC Structure of ACPI v6.2).
+    //Chip 0
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
+      0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
+      0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
+      0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
+      0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+
+    // Chip 1
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
+      0, 0, GET_MPID(0x01000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
+      0, 1, GET_MPID(0x01000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
+      0, 2, GET_MPID(0x01000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
+      0, 3, GET_MPID(0x01000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+
+    // Chip 2
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
+      0, 0, GET_MPID(0x02000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
+      0, 1, GET_MPID(0x02000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
+      0, 2, GET_MPID(0x02000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
+      0, 3, GET_MPID(0x02000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+
+    // Chip 3
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
+      0, 0, GET_MPID(0x03000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
+      0, 1, GET_MPID(0x03000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
+      0, 2, GET_MPID(0x03000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
+      0, 3, GET_MPID(0x03000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
+      FixedPcdGet32 (PcdGicDistributorBase),
+      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
+  },
+  // GIC Distributor Entry
+  EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase),
+                                    0, 3),
+  {
+    // GIC Redistributor
+    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(0),
+                                        SIZE_16MB),
+    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(1),
+                                        SIZE_16MB),
+    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(2),
+                                        SIZE_16MB),
+    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(3),
+                                        SIZE_16MB)
+  }
+};
+
+//
+// Reference the table being generated to prevent the optimizer from removing
+// the data structure from the executable
+//
+VOID* CONST ReferenceAcpiTable = &Madt;
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
new file mode 100644
index 000000000000..6a5f77b91f3c
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
@@ -0,0 +1,63 @@
+## @file
+#  ACPI table data and ASL sources required to boot the platform.
+#
+#  Copyright (c) 2020, ARM Ltd. All rights reserved.
+#
+#  This program and the accompanying materials are licensed and made available
+#  under the terms and conditions of the BSD License which accompanies this
+#  distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x0001001A
+  BASE_NAME                      = RdDanielCfgXlrAcpiTables
+  FILE_GUID                      = 42d46c2e-b6ad-4a37-bb8d-c8acc350ac2b
+  MODULE_TYPE                    = USER_DEFINED
+  VERSION_STRING                 = 1.0
+
+[Sources]
+  Dbg2.aslc
+  SsdtRos.asl
+  Fadt.aslc
+  Gtdt.aslc
+  Iort.aslc
+  Mcfg.aslc
+  RdDanielCfgXlr/Dsdt.asl
+  RdDanielCfgXlr/Madt.aslc
+  Spcr.aslc
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+  gArmTokenSpaceGuid.PcdGicDistributorBase
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
+  gArmTokenSpaceGuid.PcdPciBusMin
+  gArmTokenSpaceGuid.PcdPciBusMax
+
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
+  gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioNetSize
+  gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
+
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index a89bf26365d7..b2fc8d9b790c 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -31,6 +31,7 @@ [Guids.common]
   gRdN1EdgeX2AcpiTablesFileGuid = { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e, 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } }
   gRdE1EdgeAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
   gRdDanielCfgMAcpiTablesFileGuid = { 0x163132b3, 0x8ec1, 0x48f7, {0xb4, 0xd1, 0x49, 0x30, 0x6c, 0x3f, 0x4d, 0x51} }
+  gRdDanielCfgXlrAcpiTablesFileGuid = { 0x42d46c2e, 0xb6ad, 0x4a37, {0xbb, 0x8d, 0xc8, 0xac, 0xc3, 0x50, 0xac, 0x2b }}
 
 [PcdsFeatureFlag.common]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 74fe1a4533bd..80d1bf773bda 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -257,6 +257,7 @@ [Components.common]
   Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
   Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
   Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
+  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   #
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 48192917e22e..351c2dc9b445 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -104,6 +104,7 @@ [FV.FvMain]
   INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
   INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
   INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
+  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   # Required by PCI
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (6 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:46   ` Ard Biesheuvel
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform Aditya Angadi
  2020-03-29 16:41 ` [edk2-devel] [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Thomas Abraham
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel; +Cc: Aditya Angadi, Leif Lindholm, Ard Biesheuvel

For RD-Daniel Config-XLR, use multichip mode information from the SGI
platform descriptor HOB to pick the correct ACPI table to be installed.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   | 5 +++++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 1 +
 Platform/ARM/SgiPkg/Include/SgiPlatform.h               | 1 +
 3 files changed, 7 insertions(+)

diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 7e0de765f753..b1f5714b934d 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -51,6 +51,11 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = {
       RD_DANIEL_CFGM_CONF_ID,
       MULTI_CHIP_MODE_DISABLED,
       &gRdDanielCfgMAcpiTablesFileGuid),
+  ACPI_GUID_LOOKUP (
+      RD_DANIEL_PART_NUM,
+      RD_DANIEL_CFGXLR_CONF_ID,
+      MULTI_CHIP_MODE_ENABLED,
+      &gRdDanielCfgXlrAcpiTablesFileGuid),
 };
 
 VOID
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
index 82569820b78c..00cbe608c219 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
@@ -35,6 +35,7 @@ [Guids]
   gRdN1EdgeX2AcpiTablesFileGuid
   gRdE1EdgeAcpiTablesFileGuid
   gRdDanielCfgMAcpiTablesFileGuid
+  gRdDanielCfgXlrAcpiTablesFileGuid
 
 [FeaturePcd]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
index b6a427b8b657..9822858f6ea0 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -73,6 +73,7 @@
 //RDDANIEL Platform Identification values
 #define RD_DANIEL_PART_NUM                        0x78A
 #define RD_DANIEL_CFGM_CONF_ID                    0x1
+#define RD_DANIEL_CFGXLR_CONF_ID                  0x2
 
 #define SGI_CONFIG_MASK                           0x0F
 #define SGI_CONFIG_SHIFT                          0x1C
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (7 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support Aditya Angadi
@ 2020-03-25 10:52 ` Aditya Angadi
  2020-03-31 10:48   ` Ard Biesheuvel
  2020-03-29 16:41 ` [edk2-devel] [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Thomas Abraham
  9 siblings, 1 reply; 22+ messages in thread
From: Aditya Angadi @ 2020-03-25 10:52 UTC (permalink / raw)
  To: devel
  Cc: Thomas Abraham, Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
	Aditya Angadi

From: Thomas Abraham <thomas.abraham@arm.com>

Update the reviewers list for Arm platforms.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index a19a64fc42d0..475f7d530b85 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -94,6 +94,7 @@ M: Leif Lindholm <leif@nuviainc.com>
 ARM
 F: Platform/ARM/
 R: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+R: Thomas Abraham <thomas.abraham@arm.com>
 M: Leif Lindholm <leif@nuviainc.com>
 
 BeagleBoard:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [edk2-devel] [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel
  2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
                   ` (8 preceding siblings ...)
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform Aditya Angadi
@ 2020-03-29 16:41 ` Thomas Abraham
  9 siblings, 0 replies; 22+ messages in thread
From: Thomas Abraham @ 2020-03-29 16:41 UTC (permalink / raw)
  To: devel, aditya.angadi

Hi Aditya,

On Wed, Mar 25, 2020 at 4:23 PM Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> This patch series adds support for Arm's RD-Daniel platform. There are two
> configurations of this platform being added in this series - Config-M and
> Config-XLR. RD-Daniel is the next Arm's reference design subsystem.
>
> The first four patches consolidate the code in SgiPkg in preparation for
> adding support for the RD-Daniel platform. The next four patches add support
> for the RD-Daniel platforms.
>
> Aditya Angadi (7):
>   Platform/ARM/SgiPkg: move the GIC related ACPI helper macros
>   Platform/ARM/SgiPkg: move common platform description to SSDT
>   Platform/ARM/SgiPkg: remove PcdCoreCount and PcdClusterCount
>   Platform/ARM/SgiPkg: add ACPI tables for Rd-Daniel Config-M
>   Platform/ARM/Sgi: add initial support for RD-Daniel Config-M platform
>   Platform/ARM/SgiPkg: add ACPI tables for RD-Daniel Config-XLR
>   Platform/ARM/Sgi: add initial support for RD-Daniel Config-XLR
>     platform
>
> Thomas Abraham (1):
>   Maintainers.txt: Update Arm platform reviewers list
>
> Vijayenthiran Subramaniam (1):
>   Platform/ARM/SgiPkg: create individual Platform Description File

Few comments on this patch series.
- The patch subject of all the patches seem to be have been truncated.
- Copyright message in patches that add new files is incorrect.
- Patches 2/9 and 4/9 are missing on the list.

Could you check about these and post the next version.

Thanks,
Thomas.

>
>  Maintainers.txt                               |   1 +
>  .../SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl   | 118 ++++++++++++++
>  .../SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc  | 134 ++++++++++++++++
>  ...iTables.inf => RdDanielCfgMAcpiTables.inf} |  20 ++-
>  .../SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl | 125 +++++++++++++++
>  .../AcpiTables/RdDanielCfgXlr/Madt.aslc       | 150 ++++++++++++++++++
>  ...ables.inf => RdDanielCfgXlrAcpiTables.inf} |  20 ++-
>  .../ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl   |  70 +-------
>  .../ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc  |  73 +--------
>  .../SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf  |   5 +-
>  .../ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl   |  69 +-------
>  .../ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc  |  75 +--------
>  .../SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf  |   5 +-
>  .../SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc    |  69 +-------
>  .../AcpiTables/RdN1EdgeX2AcpiTables.inf       |   3 +-
>  .../ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc    |   9 +-
>  .../SgiPkg/AcpiTables/Sgi575AcpiTables.inf    |   4 +-
>  .../{RdN1Edge/Dsdt.asl => SsdtRos.asl}        |  67 ++------
>  .../SgiPkg/Drivers/PlatformDxe/PlatformDxe.c  |  10 ++
>  .../Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
>  Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h   |  70 +++++++-
>  Platform/ARM/SgiPkg/Include/SgiPlatform.h     |  12 +-
>  .../Library/PlatformLib/PlatformLib.inf       |   6 +-
>  .../Library/PlatformLib/PlatformLibMem.c      |   8 +-
>  Platform/ARM/SgiPkg/RdDaniel.dsc              |  37 +++++
>  Platform/ARM/SgiPkg/RdE1Edge.dsc              |  37 +++++
>  Platform/ARM/SgiPkg/RdN1Edge.dsc              |  37 +++++
>  Platform/ARM/SgiPkg/Sgi575.dsc                |  37 +++++
>  Platform/ARM/SgiPkg/SgiPlatform.dec           |   7 +-
>  Platform/ARM/SgiPkg/SgiPlatform.dsc           |  31 +---
>  Platform/ARM/SgiPkg/SgiPlatform.fdf           |   2 +
>  31 files changed, 848 insertions(+), 465 deletions(-)
>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
>  copy Platform/ARM/SgiPkg/AcpiTables/{RdN1EdgeX2AcpiTables.inf => RdDanielCfgMAcpiTables.inf} (67%)
>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
>  copy Platform/ARM/SgiPkg/AcpiTables/{RdN1EdgeX2AcpiTables.inf => RdDanielCfgXlrAcpiTables.inf} (67%)
>  copy Platform/ARM/SgiPkg/AcpiTables/{RdN1Edge/Dsdt.asl => SsdtRos.asl} (57%)
>  create mode 100644 Platform/ARM/SgiPkg/RdDaniel.dsc
>  create mode 100644 Platform/ARM/SgiPkg/RdE1Edge.dsc
>  create mode 100644 Platform/ARM/SgiPkg/RdN1Edge.dsc
>  create mode 100644 Platform/ARM/SgiPkg/Sgi575.dsc
>
> --
> 2.17.1
>
>
> ------------
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#56274): https://edk2.groups.io/g/devel/message/56274
> Mute This Topic: https://groups.io/mt/72538017/1785013
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [ta.omasab@gmail.com]
> ------------
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
@ 2020-03-31 10:33   ` Ard Biesheuvel
  2020-03-31 10:42     ` Ard Biesheuvel
  0 siblings, 1 reply; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:33 UTC (permalink / raw)
  To: Aditya Angadi
  Cc: edk2-devel-groups-io, Vijayenthiran Subramaniam, Leif Lindholm

Hello Aditya,

Could you please use a meaningful subject line for this patch?

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> 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.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> ---
>  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.dsc                         | 37 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/RdN1Edge.dsc                         | 37 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/Sgi575.dsc                           | 37 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/SgiPlatform.dec                      |  5 ++-
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                      | 25 ++-----------
>  8 files changed, 124 insertions(+), 35 deletions(-)
>
> 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);

Please use a space before '('

>    VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
>
>    // Expansion AXI - Platform Peripherals - HDLCD1
> diff --git a/Platform/ARM/SgiPkg/RdE1Edge.dsc b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> new file mode 100644
> index 000000000000..082cbb0157f7
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> @@ -0,0 +1,37 @@
> +#
> +#  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                  = ArmSgi
> +  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

If you are going to split these into separate DSCs, please do this
first in a separate patch, and update the PLATFORM_NAME accordingly.

If there is no need to use separate FDFs than you can keep using a
shared one. If there is, please do the split in the same patch.

> +  BUILD_NUMBER                   = 1
> +
> +# include common definitions from SgiPlatform.dsc
> +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> +

Please rename that file to use a .dsc.inc extension to make it clear
this is an include file

> +################################################################################
> +#
> +# 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
> diff --git a/Platform/ARM/SgiPkg/RdN1Edge.dsc b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> new file mode 100644
> index 000000000000..6774990ad6f6
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> @@ -0,0 +1,37 @@
> +#
> +#  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                  = ArmSgi
> +  PLATFORM_GUID                  = dbc75915-03df-4640-8f3d-3d3abf7c119b
> +  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 common definitions from SgiPlatform.dsc
> +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> +
> +################################################################################
> +#
> +# 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
> diff --git a/Platform/ARM/SgiPkg/Sgi575.dsc b/Platform/ARM/SgiPkg/Sgi575.dsc
> new file mode 100644
> index 000000000000..3c1904c2da91
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/Sgi575.dsc
> @@ -0,0 +1,37 @@
> +#
> +#  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                  = 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 common definitions from SgiPlatform.dsc
> +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> +
> +################################################################################
> +#
> +# 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
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
> index 9d70ec677776..4ac3dec91e3d 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
>  #
> @@ -49,5 +49,8 @@ [PcdsFixedAtBuild]
>    gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x00000000|UINT32|0x00000008
>    gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|0x00000000|UINT32|0x00000009
>
> +  # GIC
> +  gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A

Wouldn't a UINT32 be sufficient to describe the size of a MMIO block?

> +
>  [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
> index 5226c5751e98..4e1fcefb1442 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> @@ -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
>    #
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC Aditya Angadi
@ 2020-03-31 10:35   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:35 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> Move the ACPI helper macros defines related to GIC structure,
> distributor, redistributor and ITS to SgiAcpiHeader.h as these are
> common across ARM SGI/RD platforms.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

> ---
>  Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc   | 68 +------------------
>  Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc   | 68 +------------------
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 57 +---------------
>  Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h         | 70 +++++++++++++++++++-
>  4 files changed, 72 insertions(+), 191 deletions(-)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> index 48e7a61478e8..987254928535 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Multiple APIC Description Table (MADT)
>  *
> -*  Copyright (c) 2018, ARM Limited. All rights reserved.
> +*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -14,72 +14,6 @@
>  #include <Library/PcdLib.h>
>  #include <IndustryStandard/Acpi.h>
>
> -// 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)           \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GIC,                     /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    GicId,                                /* CPUInterfaceNumber */             \
> -    AcpiCpuUid,                           /* AcpiProcessorUid */               \
> -    Flags,                                /* Flags */                          \
> -    0,                                    /* ParkingProtocolVersion */         \
> -    PmuIrq,                               /* PerformanceInterruptGsiv */       \
> -    0,                                    /* ParkedAddress */                  \
> -    GicBase,                              /* PhysicalBaseAddress */            \
> -    GicVBase,                             /* GICV */                           \
> -    GicHBase,                             /* GICH */                           \
> -    GsivId,                               /* VGICMaintenanceInterrupt */       \
> -    GicRBase,                             /* GICRBaseAddress */                \
> -    Mpidr,                                /* MPIDR */                          \
> -    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
> -  GicDistVector, GicVersion)                                                   \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICD,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
> -    GicDistHwId,                          /* GicId */                          \
> -    GicDistBase,                          /* PhysicalBaseAddress */            \
> -    GicDistVector,                        /* SystemVectorBase */               \
> -    GicVersion,                           /* GicVersion */                     \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GICR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICR,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
> -    RedisDiscLength                       /* DiscoveryRangeLength */           \
> -  }
> -
> -// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    GicItsId,                             /* GicItsId */                       \
> -    GicItsBase,                           /* PhysicalBaseAddress */            \
> -    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
> -  }
> -
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> index 6312743a479c..05eb78c5616a 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Multiple APIC Description Table (MADT)
>  *
> -*  Copyright (c) 2018, ARM Limited. All rights reserved.
> +*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -17,72 +17,6 @@
>  #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)           \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GIC,                     /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    GicId,                                /* CPUInterfaceNumber */             \
> -    AcpiCpuUid,                           /* AcpiProcessorUid */               \
> -    Flags,                                /* Flags */                          \
> -    0,                                    /* ParkingProtocolVersion */         \
> -    PmuIrq,                               /* PerformanceInterruptGsiv */       \
> -    0,                                    /* ParkedAddress */                  \
> -    GicBase,                              /* PhysicalBaseAddress */            \
> -    GicVBase,                             /* GICV */                           \
> -    GicHBase,                             /* GICH */                           \
> -    GsivId,                               /* VGICMaintenanceInterrupt */       \
> -    GicRBase,                             /* GICRBaseAddress */                \
> -    Mpidr,                                /* MPIDR */                          \
> -    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
> -  GicDistVector, GicVersion)                                                   \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICD,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
> -    GicDistHwId,                          /* GicId */                          \
> -    GicDistBase,                          /* PhysicalBaseAddress */            \
> -    GicDistVector,                        /* SystemVectorBase */               \
> -    GicVersion,                           /* GicVersion */                     \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GICR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICR,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
> -    RedisDiscLength                       /* DiscoveryRangeLength */           \
> -  }
> -
> -// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    GicItsId,                             /* GicItsId */                       \
> -    GicItsBase,                           /* PhysicalBaseAddress */            \
> -    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
> -  }
> -
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> index d4538233d760..47368931e367 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Multiple APIC Description Table (MADT)
>  *
> -*  Copyright (c) 2019, ARM Limited. All rights reserved.
> +*  Copyright (c) 2019-2020, ARM Limited. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -19,61 +19,6 @@
>
>  #define CHIP_CNT   2
>
> -// 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)           \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GIC,                     /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    GicId,                                /* CPUInterfaceNumber */             \
> -    AcpiCpuUid,                           /* AcpiProcessorUid */               \
> -    Flags,                                /* Flags */                          \
> -    0,                                    /* ParkingProtocolVersion */         \
> -    PmuIrq,                               /* PerformanceInterruptGsiv */       \
> -    0,                                    /* ParkedAddress */                  \
> -    GicBase,                              /* PhysicalBaseAddress */            \
> -    GicVBase,                             /* GICV */                           \
> -    GicHBase,                             /* GICH */                           \
> -    GsivId,                               /* VGICMaintenanceInterrupt */       \
> -    GicRBase,                             /* GICRBaseAddress */                \
> -    Mpidr,                                /* MPIDR */                          \
> -    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
> -  GicDistVector, GicVersion)                                                   \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICD,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
> -    GicDistHwId,                          /* GicId */                          \
> -    GicDistBase,                          /* PhysicalBaseAddress */            \
> -    GicDistVector,                        /* SystemVectorBase */               \
> -    GicVersion,                           /* GicVersion */                     \
> -    {                                                                          \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> -      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> -      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> -    }                                                                          \
> -  }
> -
> -// EFI_ACPI_6_2_GICR_STRUCTURE
> -#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
> -  {                                                                            \
> -    EFI_ACPI_6_2_GICR,                    /* Type */                           \
> -    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
> -    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> -    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
> -    RedisDiscLength                       /* DiscoveryRangeLength */           \
> -  }
> -
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
> diff --git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> index 5083dde15dd5..ecb0d4eccf24 100644
> --- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
> +++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.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
>  *
> @@ -9,6 +9,8 @@
>  #ifndef __SGI_ACPI_HEADER__
>  #define __SGI_ACPI_HEADER__
>
> +#include <IndustryStandard/Acpi.h>
> +
>  //
>  // ACPI table information used to initialize tables.
>  //
> @@ -32,4 +34,70 @@
>      EFI_ACPI_ARM_CREATOR_REVISION   /* UINT32  CreatorRevision */ \
>    }
>
> +// 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)           \
> +  {                                                                            \
> +    EFI_ACPI_6_2_GIC,                     /* Type */                           \
> +    sizeof (EFI_ACPI_6_2_GIC_STRUCTURE),  /* Length */                         \
> +    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> +    GicId,                                /* CPUInterfaceNumber */             \
> +    AcpiCpuUid,                           /* AcpiProcessorUid */               \
> +    Flags,                                /* Flags */                          \
> +    0,                                    /* ParkingProtocolVersion */         \
> +    PmuIrq,                               /* PerformanceInterruptGsiv */       \
> +    0,                                    /* ParkedAddress */                  \
> +    GicBase,                              /* PhysicalBaseAddress */            \
> +    GicVBase,                             /* GICV */                           \
> +    GicHBase,                             /* GICH */                           \
> +    GsivId,                               /* VGICMaintenanceInterrupt */       \
> +    GicRBase,                             /* GICRBaseAddress */                \
> +    Mpidr,                                /* MPIDR */                          \
> +    Efficiency,                           /* ProcessorPowerEfficiencyClass */  \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> +      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> +      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> +    }                                                                          \
> +  }
> +
> +// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
> +#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase,            \
> +  GicDistVector, GicVersion)                                                   \
> +  {                                                                            \
> +    EFI_ACPI_6_2_GICD,                    /* Type */                           \
> +    sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE),                           \
> +    EFI_ACPI_RESERVED_WORD,               /* Reserved1 */                      \
> +    GicDistHwId,                          /* GicId */                          \
> +    GicDistBase,                          /* PhysicalBaseAddress */            \
> +    GicDistVector,                        /* SystemVectorBase */               \
> +    GicVersion,                           /* GicVersion */                     \
> +    {                                                                          \
> +      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[0] */                   \
> +      EFI_ACPI_RESERVED_BYTE,             /* Reserved2[1] */                   \
> +      EFI_ACPI_RESERVED_BYTE              /* Reserved2[2] */                   \
> +    }                                                                          \
> +  }
> +
> +// EFI_ACPI_6_2_GICR_STRUCTURE
> +#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength)  \
> +  {                                                                            \
> +    EFI_ACPI_6_2_GICR,                    /* Type */                           \
> +    sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */                         \
> +    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> +    RedisRegionAddr,                      /* DiscoveryRangeBaseAddress */      \
> +    RedisDiscLength                       /* DiscoveryRangeLength */           \
> +  }
> +
> +// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
> +#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase)                        \
> +  {                                                                            \
> +    EFI_ACPI_6_2_GIC_ITS,                 /* Type */                           \
> +    sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE),                                   \
> +    EFI_ACPI_RESERVED_WORD,               /* Reserved */                       \
> +    GicItsId,                             /* GicItsId */                       \
> +    GicItsBase,                           /* PhysicalBaseAddress */            \
> +    EFI_ACPI_RESERVED_DWORD               /* DiscoveryRangeLength */           \
> +  }
> +
>  #endif /* __SGI_ACPI_HEADER__ */
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common Aditya Angadi
@ 2020-03-31 10:36   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:36 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> Move common platform description entries in platfrom specific DSDT to

platform

> a SSDT that can be reused on all SGI/RD platforms.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

> ---
>  Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl                  | 70 +-------------------
>  Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf             |  3 +-
>  Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl                  | 69 +------------------
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf             |  3 +-
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf           |  1 +
>  Platform/ARM/SgiPkg/AcpiTables/{RdN1Edge/Dsdt.asl => SsdtRos.asl} | 67 ++++---------------
>  6 files changed, 19 insertions(+), 194 deletions(-)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
> index 5583e610973b..d66c7cbf4183 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Dsdt.asl
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Differentiated System Description Table Fields (DSDT)
>  *
> -*  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +*  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -208,73 +208,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
>        Name (_STA, 0xF)
>      }
>
> -    // UART PL011
> -    Device (COM0) {
> -      Name (_HID, "ARMH0011")
> -      Name (_CID, "ARMH0011")
> -      Name (_UID, Zero)
> -      Name (_STA, 0xF)
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (
> -          ReadWrite,
> -          FixedPcdGet64 (PcdSerialDbgRegisterBase),
> -          0x1000
> -        )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
> -      })
> -    }
> -
> -    // SMSC 91C111
> -    Device (ETH0) {
> -      Name (_HID, "LNRO0003")
> -      Name (_UID, Zero)
> -      Name (_STA, 0xF)
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (ReadWrite, 0x18000000, 0x1000)
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 }
> -      })
> -      Name (_DSD, Package() {
> -        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> -        Package () {
> -          Package (2) {"reg-io-width", 4 },
> -        }
> -      })
> -    }
> -
> -    // VIRTIO DISK
> -    Device (VR00) {
> -      Name (_HID, "LNRO0005")
> -      Name (_UID, 0)
> -      Name (_CCA, 1)    // mark the device coherent
> -
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (
> -          ReadWrite,
> -          FixedPcdGet32 (PcdVirtioBlkBaseAddress),
> -          FixedPcdGet32 (PcdVirtioBlkSize)
> -        )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
> -          FixedPcdGet32 (PcdVirtioBlkInterrupt)
> -        }
> -      })
> -    }
> -
> -    // VIRTIO NET
> -    Device (VR01) {
> -      Name (_HID, "LNRO0005")
> -      Name (_UID, 1)
> -      Name (_CCA, 1)    // mark the device coherent
> -
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (
> -          ReadWrite,
> -          FixedPcdGet32 (PcdVirtioNetBaseAddress),
> -          FixedPcdGet32 (PcdVirtioNetSize)
> -        )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
> -          FixedPcdGet32 (PcdVirtioNetInterrupt)
> -        }
> -      })
> -    }
>    } // Scope(_SB)
>  }
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> index 3a4d4e7b9502..b08d7c2df5c7 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  ACPI table data and ASL sources required to boot the platform.
>  #
> -#  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -16,6 +16,7 @@ [Defines]
>
>  [Sources]
>    Dbg2.aslc
> +  SsdtRos.asl
>    Fadt.aslc
>    Gtdt.aslc
>    Iort.aslc
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
> index 45316d5005f4..cb05eed35878 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Differentiated System Description Table Fields (DSDT)
>  *
> -*  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +*  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -62,72 +62,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
>        Name (_STA, 0xF)
>      }
>
> -    // UART PL011
> -    Device (COM0) {
> -      Name (_HID, "ARMH0011")
> -      Name (_CID, "ARMH0011")
> -      Name (_UID, Zero)
> -      Name (_STA, 0xF)
> -      Name (_CRS, ResourceTemplate () {
> -        Memory32Fixed (
> -          ReadWrite,
> -          FixedPcdGet64 (PcdSerialDbgRegisterBase),
> -          0x1000
> -          )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
> -      })
> -    }
> -
> -    // SMSC 91C111
> -    Device (ETH0) {
> -      Name (_HID, "LNRO0003")
> -      Name (_UID, Zero)
> -      Name (_STA, 0xF)
> -      Name (_CRS, ResourceTemplate () {
> -        Memory32Fixed (ReadWrite, 0x18000000, 0x1000)
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 }
> -      })
> -      Name (_DSD, Package() {
> -        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> -                Package() {
> -                  Package(2) {"reg-io-width", 4 },
> -                }
> -      })
> -    }
> -
> -    // VIRTIO DISK
> -    Device (VR00) {
> -      Name (_HID, "LNRO0005")
> -      Name (_UID, 0)
> -      Name (_CCA, 1)    // mark the device coherent
> -
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (
> -          ReadWrite,
> -          FixedPcdGet32 (PcdVirtioBlkBaseAddress),
> -          FixedPcdGet32 (PcdVirtioBlkSize)
> -        )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
> -          FixedPcdGet32 (PcdVirtioBlkInterrupt)
> -        }
> -      })
> -    }
> -
> -    // VIRTIO NET
> -    Device (VR01) {
> -      Name (_HID, "LNRO0005")
> -      Name (_UID, 1)
> -      Name (_CCA, 1)    // mark the device coherent
> -
> -      Name (_CRS, ResourceTemplate() {
> -        Memory32Fixed (ReadWrite,
> -          FixedPcdGet32 (PcdVirtioNetBaseAddress),
> -          FixedPcdGet32 (PcdVirtioNetSize)
> -        )
> -        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
> -          FixedPcdGet32 (PcdVirtioNetInterrupt)
> -        }
> -      })
> -    }
>    } // Scope(_SB)
>  }
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> index 58c33ecb8ec2..61b07bffccf3 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  ACPI table data and ASL sources required to boot the platform.
>  #
> -#  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -16,6 +16,7 @@ [Defines]
>
>  [Sources]
>    Dbg2.aslc
> +  SsdtRos.asl
>    Fadt.aslc
>    Gtdt.aslc
>    Iort.aslc
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> index 1b584b152455..a4d5904f671c 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> @@ -16,6 +16,7 @@ [Defines]
>
>  [Sources]
>    Dbg2.aslc
> +  SsdtRos.asl
>    Fadt.aslc
>    Gtdt.aslc
>    Iort.aslc
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
> similarity index 57%
> copy from Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
> copy to Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
> index 45316d5005f4..95ae23c1f547 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl
> +++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
> @@ -1,67 +1,24 @@
>  /** @file
> -*  Differentiated System Description Table Fields (DSDT)
> +*  Secondary System Description Table Fields (SSDT)
>  *
> -*  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +*  Copyright (c) 2020, ARM Ltd. All rights reserved.
>  *
> -*  SPDX-License-Identifier: BSD-2-Clause-Patent
> +*  This program and the accompanying materials are licensed and made available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution.  The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
>  *
>  **/
>
>  #include "SgiPlatform.h"
>  #include "SgiAcpiHeader.h"
>
> -DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
> +DefinitionBlock ("SsdtRosTable.aml", "SSDT", 1, "ARMLTD", "ARMSGI",
>                   EFI_ACPI_ARM_OEM_REVISION) {
>    Scope (_SB) {
> -
> -    Device (CP00) { // Neoverse-N1: Cluster 0, Cpu 0
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 0)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP01) { // Neoverse-N1: Cluster 0, Cpu 1
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 1)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP02) { // Neoverse-N1: Cluster 0, Cpu 2
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 2)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP03) { // Neoverse-N1: Cluster 0, Cpu 3
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 3)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP04) { // Neoverse-N1: Cluster 1, Cpu 0
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 4)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP05) { // Neoverse-N1: Cluster 1, Cpu 1
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 5)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP06) { // Neoverse-N1: Cluster 1, Cpu 2
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 6)
> -      Name (_STA, 0xF)
> -    }
> -
> -    Device (CP07) { // Neoverse-N1: Cluster 1, Cpu 3
> -      Name (_HID, "ACPI0007")
> -      Name (_UID, 7)
> -      Name (_STA, 0xF)
> -    }
> -
>      // UART PL011
>      Device (COM0) {
>        Name (_HID, "ARMH0011")
> @@ -73,7 +30,7 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
>            ReadWrite,
>            FixedPcdGet64 (PcdSerialDbgRegisterBase),
>            0x1000
> -          )
> +        )
>          Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 }
>        })
>      }
> @@ -129,5 +86,5 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
>          }
>        })
>      }
> -  } // Scope(_SB)
> +  }
>  }
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Aditya Angadi
@ 2020-03-31 10:37   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:37 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> The number of CPUs depend on the SGI/RD platform. So instead of

depends

> defining a Fixed PCD to specify the value of core and cluster count,
> let each platform define these values.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

> ---
>  Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc       |  7 ++++++-
>  Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf   |  2 --
>  Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc       |  7 ++++---
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf   |  2 --
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc     | 12 ++++++------
>  Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf |  2 --
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc         |  9 +++++----
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf     |  4 +---
>  Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |  3 ---
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                     |  4 ----
>  10 files changed, 22 insertions(+), 30 deletions(-)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> index 987254928535..a9540f2e0374 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
> @@ -14,12 +14,17 @@
>  #include <Library/PcdLib.h>
>  #include <IndustryStandard/Acpi.h>
>
> +#define CLUSTER_COUNT                 2
> +#define CORES_PER_CLUSTER             8
> +#define THREADS_PER_CORE              2
> +#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER * THREADS_PER_CORE)
> +
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
>  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_COUNT];
>    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 b08d7c2df5c7..742ca9e68335 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> @@ -34,8 +34,6 @@ [Packages]
>    Platform/ARM/SgiPkg/SgiPlatform.dec
>
>  [FixedPcd]
> -  gArmPlatformTokenSpaceGuid.PcdCoreCount
> -  gArmPlatformTokenSpaceGuid.PcdClusterCount
>    gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
>    gArmPlatformTokenSpaceGuid.PL011UartInterrupt
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> index 05eb78c5616a..d8ec0ce421dc 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
> @@ -14,15 +14,16 @@
>  #include <Library/PcdLib.h>
>  #include <IndustryStandard/Acpi.h>
>
> -#define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
> -                    FixedPcdGet32 (PcdCoreCount))
> +#define CLUSTER_COUNT                 2
> +#define CORES_PER_CLUSTER             4
> +#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
>
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
>  typedef struct {
>    EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
> -  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_CNT];
> +  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
>    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/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> index 61b07bffccf3..206479f9428e 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
> @@ -34,8 +34,6 @@ [Packages]
>    Platform/ARM/SgiPkg/SgiPlatform.dec
>
>  [FixedPcd]
> -  gArmPlatformTokenSpaceGuid.PcdCoreCount
> -  gArmPlatformTokenSpaceGuid.PcdClusterCount
>    gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
>    gArmPlatformTokenSpaceGuid.PL011UartInterrupt
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> index 47368931e367..add972437496 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
> @@ -14,19 +14,19 @@
>  #include <Library/PcdLib.h>
>  #include <IndustryStandard/Acpi.h>
>
> -#define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
> -                    FixedPcdGet32 (PcdCoreCount))
> -
> -#define CHIP_CNT   2
> +#define CLUSTER_COUNT                 2
> +#define CORES_PER_CLUSTER             4
> +#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
> +#define CHIP_COUNT   2
>
>  // Multiple APIC Description Table
>  #pragma pack (1)
>
>  typedef struct {
>    EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER  Header;
> -  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_CNT * CHIP_CNT];
> +  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_COUNT * CHIP_COUNT];
>    EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE               GicDistributor;
> -  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_CNT];
> +  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_COUNT];
>  } EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
>
>  #pragma pack ()
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> index a4d5904f671c..8aec5e094e1a 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
> @@ -34,8 +34,6 @@ [Packages]
>    Platform/ARM/SgiPkg/SgiPlatform.dec
>
>  [FixedPcd]
> -  gArmPlatformTokenSpaceGuid.PcdCoreCount
> -  gArmPlatformTokenSpaceGuid.PcdClusterCount
>    gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
>    gArmPlatformTokenSpaceGuid.PL011UartInterrupt
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
> index dedabaaecdf4..ca259247785f 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
> @@ -1,7 +1,7 @@
>  /** @file
>  *  Multiple APIC Description Table (MADT)
>  *
> -*  Copyright (c) 2018, ARM Limited. All rights reserved.
> +*  Copyright (c) 2018-2020, ARM Limited. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -14,8 +14,9 @@
>  #include <Library/PcdLib.h>
>  #include <IndustryStandard/Acpi.h>
>
> -#define CORES   (FixedPcdGet32 (PcdClusterCount) * \
> -                 FixedPcdGet32 (PcdCoreCount))
> +#define CLUSTER_COUNT                     2
> +#define CORES_PER_CLUSTER                 4
> +#define CORE_COUNT                        (CLUSTER_COUNT * CORES_PER_CLUSTER)
>
>  // EFI_ACPI_6_1_GIC_STRUCTURE
>  #define EFI_ACPI_6_1_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,      \
> @@ -90,7 +91,7 @@
>
>  typedef struct {
>    EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
> -  EFI_ACPI_6_1_GIC_STRUCTURE                            GicInterfaces[CORES];
> +  EFI_ACPI_6_1_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
>    EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
>    EFI_ACPI_6_1_GICR_STRUCTURE                           GicRedistributor;
>    EFI_ACPI_6_1_GIC_ITS_STRUCTURE                        GicIts;
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> index 097ef854df42..df390c152648 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  ACPI table data and ASL sources required to boot the platform.
>  #
> -#  Copyright (c) 2018, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2018-2020, ARM Ltd. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -33,8 +33,6 @@ [Packages]
>    Platform/ARM/SgiPkg/SgiPlatform.dec
>
>  [FixedPcd]
> -  gArmPlatformTokenSpaceGuid.PcdCoreCount
> -  gArmPlatformTokenSpaceGuid.PcdClusterCount
>    gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
>    gArmPlatformTokenSpaceGuid.PL011UartInterrupt
>
> diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
> index a918afef5fba..fe96f5385d57 100644
> --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
> +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
> @@ -37,9 +37,6 @@ [Sources.AARCH64]
>    AArch64/Helper.S | GCC
>
>  [FixedPcd]
> -  gArmPlatformTokenSpaceGuid.PcdClusterCount
> -  gArmPlatformTokenSpaceGuid.PcdCoreCount
> -
>    gArmSgiTokenSpaceGuid.PcdDramBlock2Base
>    gArmSgiTokenSpaceGuid.PcdDramBlock2Size
>    gArmSgiTokenSpaceGuid.PcdGicSize
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> index 4e1fcefb1442..7b95acb9db46 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> @@ -156,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
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support Aditya Angadi
@ 2020-03-31 10:39   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:39 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> Add information in the SGI platform descriptor HOB to pick the correct
> ACPI table to install for RD-Daniel Config-M
>

This description does not make sense. You are adding a completely new
SGI flavour called 'Daniel' in this patch, right? Please make that a
separate patch.

> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> ---
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   |  5 +++
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |  1 +
>  Platform/ARM/SgiPkg/Include/SgiPlatform.h               |  4 +++
>  Platform/ARM/SgiPkg/RdDaniel.dsc                        | 37 ++++++++++++++++++++
>  4 files changed, 47 insertions(+)
>
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> index 387397d74598..7e0de765f753 100644
> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> @@ -46,6 +46,11 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = {
>        RD_E1_EDGE_CONF_ID,
>        MULTI_CHIP_MODE_DISABLED,
>        &gRdE1EdgeAcpiTablesFileGuid),
> +  ACPI_GUID_LOOKUP (
> +      RD_DANIEL_PART_NUM,
> +      RD_DANIEL_CFGM_CONF_ID,
> +      MULTI_CHIP_MODE_DISABLED,
> +      &gRdDanielCfgMAcpiTablesFileGuid),
>  };
>
>  VOID
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> index 741dcc75ed6a..82569820b78c 100644
> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> @@ -34,6 +34,7 @@ [Guids]
>    gRdN1EdgeAcpiTablesFileGuid
>    gRdN1EdgeX2AcpiTablesFileGuid
>    gRdE1EdgeAcpiTablesFileGuid
> +  gRdDanielCfgMAcpiTablesFileGuid
>
>  [FeaturePcd]
>    gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
> diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> index d87fb2b5409f..b6a427b8b657 100644
> --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> @@ -70,6 +70,10 @@
>  #define RD_N1_EDGE_CONF_ID                        0x1
>  #define RD_E1_EDGE_CONF_ID                        0x2
>
> +//RDDANIEL Platform Identification values
> +#define RD_DANIEL_PART_NUM                        0x78A
> +#define RD_DANIEL_CFGM_CONF_ID                    0x1
> +
>  #define SGI_CONFIG_MASK                           0x0F
>  #define SGI_CONFIG_SHIFT                          0x1C
>  #define SGI_PART_NUM_MASK                         0xFFF
> diff --git a/Platform/ARM/SgiPkg/RdDaniel.dsc b/Platform/ARM/SgiPkg/RdDaniel.dsc
> new file mode 100644
> index 000000000000..83e7ccd0bc05
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/RdDaniel.dsc
> @@ -0,0 +1,37 @@
> +#
> +#  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                  = ArmSgi
> +  PLATFORM_GUID                  = d301ac4e-0828-4cef-b754-34ca9b6781b5
> +  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 common definitions from SgiPlatform.dsc
> +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> +
> +################################################################################
> +#
> +# Pcd Section - list of all EDK II PCD Entries defined by this Platform
> +#
> +################################################################################
> +
> +[PcdsFixedAtBuild.common]
> +  # GIC Base Addresses
> +  gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
> +  gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x30140000
> +  gArmSgiTokenSpaceGuid.PcdGicSize|0x200000
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
@ 2020-03-31 10:40   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:40 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> Add Madt and Dsdt ACPI tables for RD-Daniel Config-M platform.
>

OK, it seems I was reviewing the patches out of order. The DSC you add
in the next patch should be added here.

> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> ---
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl      | 118 +++++++++++++++++
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc     | 134 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf |  63 +++++++++
>  Platform/ARM/SgiPkg/SgiPlatform.dec                       |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                       |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.fdf                       |   1 +
>  6 files changed, 318 insertions(+)
>
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
> new file mode 100644
> index 000000000000..57873ef5cfa2
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Dsdt.asl
> @@ -0,0 +1,118 @@
> +/** @file
> +*  Differentiated System Description Table Fields (DSDT)
> +*
> +*  Copyright (c) 2020, ARM Ltd. All rights reserved.
> +*
> +*  This program and the accompanying materials are licensed and made available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution.  The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +*
> +**/
> +
> +#include "SgiPlatform.h"
> +#include "SgiAcpiHeader.h"
> +
> +DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
> +                 EFI_ACPI_ARM_OEM_REVISION) {
> +  Scope (_SB) {
> +    Device (CP00) { // Zeus core 0
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 0)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP01) { // Zeus core 1
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 1)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP02) { // Zeus core 2
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 2)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP03) { // Zeus core 3
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 3)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP04) { // Zeus core 4
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 4)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP05) { // Zeus core 5
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 5)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP06) { // Zeus core 6
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 6)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP07) { // Zeus core 7
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 7)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP08) { // Zeus core 8
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 8)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP09) { // Zeus core 9
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 9)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP10) { // Zeus core 10
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 10)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP11) { // Zeus core 11
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 11)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP12) { // Zeus core 12
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 12)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP13) { // Zeus core 13
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 13)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP14) { // Zeus core 14
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 14)
> +      Name (_STA, 0xF)
> +    }
> +
> +   Device (CP15) { // Zeus core 15
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 15)
> +      Name (_STA, 0xF)
> +    }
> +  } // Scope(_SB)
> +}
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
> new file mode 100644
> index 000000000000..3027b8d223b4
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgM/Madt.aslc
> @@ -0,0 +1,134 @@
> +/** @file
> +*  Multiple APIC Description Table (MADT)
> +*
> +*  Copyright (c) 2020, ARM Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials are licensed and made available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution.  The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +*
> +**/
> +
> +#include "SgiPlatform.h"
> +#include "SgiAcpiHeader.h"
> +#include <Library/AcpiLib.h>
> +#include <Library/ArmLib.h>
> +#include <Library/PcdLib.h>
> +#include <IndustryStandard/Acpi.h>
> +
> +#define CLUSTER_COUNT           16
> +#define CORES_PER_CLUSTER       1
> +#define CORE_COUNT              (CLUSTER_COUNT * CORES_PER_CLUSTER)
> +
> +// Multiple APIC Description Table
> +#pragma pack (1)
> +
> +typedef struct {
> +  EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER   Header;
> +  EFI_ACPI_6_2_GIC_STRUCTURE                            GicInterfaces[CORE_COUNT];
> +  EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
> +  EFI_ACPI_6_2_GICR_STRUCTURE                           GicRedistributor;
> +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
> +
> +#pragma pack ()
> +
> +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
> +  {
> +    ARM_ACPI_HEADER (
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE,
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
> +    ),
> +    // MADT specific fields
> +    0, // LocalApicAddress
> +    0  // Flags
> +  },
> +  {
> +    // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,
> +    //                                          PmuIrq, GicBase, GicVBase,
> +    //                                          GicHBase, GsivId, GicRBase,
> +    //                                          Efficiency)
> +    // Note: The GIC Structure of the primary CPU must be the first entry
> +    // (see note in 5.2.12.14 GICC Structure of ACPI v6.2).
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
> +      0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
> +      0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
> +      0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
> +      0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core4
> +      0, 4, GET_MPID(0x400, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core5
> +      0, 5, GET_MPID(0x500, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core6
> +      0, 6, GET_MPID(0x600, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core7
> +      0, 7, GET_MPID(0x700, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core8
> +      0, 8, GET_MPID(0x800, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core9
> +      0, 9, GET_MPID(0x900, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core10
> +      0, 10, GET_MPID(0xa00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core11
> +      0, 11, GET_MPID(0xb00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core12
> +      0, 12, GET_MPID(0xc00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core13
> +      0, 13, GET_MPID(0xd00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core14
> +      0, 14, GET_MPID(0xe00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core15
> +      0, 15, GET_MPID(0xf00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +  },
> +  // GIC Distributor Entry
> +  EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase),
> +                                    0, 3),
> +  // GIC Redistributor
> +  EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase),
> +                                      SIZE_16MB),
> +};
> +
> +//
> +// Reference the table being generated to prevent the optimizer from removing
> +// the data structure from the executable
> +//
> +VOID* CONST ReferenceAcpiTable = &Madt;
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
> new file mode 100644
> index 000000000000..73b6c7ffafbb
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
> @@ -0,0 +1,63 @@
> +## @file
> +#  ACPI table data and ASL sources required to boot the platform.
> +#
> +#  Copyright (c) 2020, ARM Ltd. All rights reserved.
> +#
> +#  This program and the accompanying materials are licensed and made available
> +#  under the terms and conditions of the BSD License which accompanies this
> +#  distribution.  The full text of the license may be found at
> +#  http://opensource.org/licenses/bsd-license.php
> +#
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION                    = 0x0001001A
> +  BASE_NAME                      = RdDanielCfgMAcpiTables
> +  FILE_GUID                      = 163132b3-8ec1-48f7-b4d1-49306c3f4d51
> +  MODULE_TYPE                    = USER_DEFINED
> +  VERSION_STRING                 = 1.0
> +
> +[Sources]
> +  Dbg2.aslc
> +  SsdtRos.asl
> +  Fadt.aslc
> +  Gtdt.aslc
> +  Iort.aslc
> +  Mcfg.aslc
> +  RdDanielCfgM/Dsdt.asl
> +  RdDanielCfgM/Madt.aslc
> +  Spcr.aslc
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  ArmPlatformPkg/ArmPlatformPkg.dec
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdePkg/MdePkg.dec
> +  Platform/ARM/SgiPkg/SgiPlatform.dec
> +
> +[FixedPcd]
> +  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
> +  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
> +
> +  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
> +  gArmTokenSpaceGuid.PcdGicDistributorBase
> +  gArmTokenSpaceGuid.PcdGicRedistributorsBase
> +  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
> +  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
> +  gArmTokenSpaceGuid.PcdPciBusMin
> +  gArmTokenSpaceGuid.PcdPciBusMax
> +
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetSize
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
> +
> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
> index 4ac3dec91e3d..a89bf26365d7 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> @@ -30,6 +30,7 @@ [Guids.common]
>    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 } }
> +  gRdDanielCfgMAcpiTablesFileGuid = { 0x163132b3, 0x8ec1, 0x48f7, {0xb4, 0xd1, 0x49, 0x30, 0x6c, 0x3f, 0x4d, 0x51} }
>
>  [PcdsFeatureFlag.common]
>    gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> index 7b95acb9db46..74fe1a4533bd 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> @@ -256,6 +256,7 @@ [Components.common]
>    Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
>    Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
>    Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
> +  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
>    MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>
>    #
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
> index 3d13998015b9..48192917e22e 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
> @@ -103,6 +103,7 @@ [FV.FvMain]
>    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 RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
>    INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>
>    # Required by PCI
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual
  2020-03-31 10:33   ` Ard Biesheuvel
@ 2020-03-31 10:42     ` Ard Biesheuvel
  2020-04-13 12:31       ` [edk2-devel] " Aditya Angadi
  0 siblings, 1 reply; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:42 UTC (permalink / raw)
  To: Aditya Angadi
  Cc: edk2-devel-groups-io, Vijayenthiran Subramaniam, Leif Lindholm

On Tue, 31 Mar 2020 at 12:33, Ard Biesheuvel <ard.biesheuvel@arm.com> wrote:
>
> Hello Aditya,
>
> Could you please use a meaningful subject line for this patch?
>
> On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> 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.
> >
> > Cc: Leif Lindholm <leif@nuviainc.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> > ---
> >  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.dsc                         | 37 ++++++++++++++++++++
> >  Platform/ARM/SgiPkg/RdN1Edge.dsc                         | 37 ++++++++++++++++++++
> >  Platform/ARM/SgiPkg/Sgi575.dsc                           | 37 ++++++++++++++++++++
> >  Platform/ARM/SgiPkg/SgiPlatform.dec                      |  5 ++-
> >  Platform/ARM/SgiPkg/SgiPlatform.dsc                      | 25 ++-----------
> >  8 files changed, 124 insertions(+), 35 deletions(-)
> >
> > 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);
>
> Please use a space before '('
>
> >    VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
> >
> >    // Expansion AXI - Platform Peripherals - HDLCD1
> > diff --git a/Platform/ARM/SgiPkg/RdE1Edge.dsc b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> > new file mode 100644
> > index 000000000000..082cbb0157f7
> > --- /dev/null
> > +++ b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> > @@ -0,0 +1,37 @@
> > +#
> > +#  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                  = ArmSgi
> > +  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
>
> If you are going to split these into separate DSCs, please do this
> first in a separate patch, and update the PLATFORM_NAME accordingly.
>
> If there is no need to use separate FDFs than you can keep using a
> shared one. If there is, please do the split in the same patch.
>
> > +  BUILD_NUMBER                   = 1
> > +
> > +# include common definitions from SgiPlatform.dsc
> > +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> > +
>
> Please rename that file to use a .dsc.inc extension to make it clear
> this is an include file
>

Actually, now that I looked more closely: is it the case that
formerly, the same build could run on any SGI platforms, but after
this change, you have separate builds for separate platforms? Because
the FDF contains all the ACPI tables for all the platforms, right?

Please consider carefully whether you really want to depart from this,
and if you do, clean up all the overlap between the platforms after
you split them into separate ones.

> > +################################################################################
> > +#
> > +# 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
> > diff --git a/Platform/ARM/SgiPkg/RdN1Edge.dsc b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> > new file mode 100644
> > index 000000000000..6774990ad6f6
> > --- /dev/null
> > +++ b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> > @@ -0,0 +1,37 @@
> > +#
> > +#  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                  = ArmSgi
> > +  PLATFORM_GUID                  = dbc75915-03df-4640-8f3d-3d3abf7c119b
> > +  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 common definitions from SgiPlatform.dsc
> > +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> > +
> > +################################################################################
> > +#
> > +# 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
> > diff --git a/Platform/ARM/SgiPkg/Sgi575.dsc b/Platform/ARM/SgiPkg/Sgi575.dsc
> > new file mode 100644
> > index 000000000000..3c1904c2da91
> > --- /dev/null
> > +++ b/Platform/ARM/SgiPkg/Sgi575.dsc
> > @@ -0,0 +1,37 @@
> > +#
> > +#  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                  = 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 common definitions from SgiPlatform.dsc
> > +!include Platform/ARM/SgiPkg/SgiPlatform.dsc
> > +
> > +################################################################################
> > +#
> > +# 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
> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > index 9d70ec677776..4ac3dec91e3d 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
> >  #
> > @@ -49,5 +49,8 @@ [PcdsFixedAtBuild]
> >    gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x00000000|UINT32|0x00000008
> >    gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|0x00000000|UINT32|0x00000009
> >
> > +  # GIC
> > +  gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A
>
> Wouldn't a UINT32 be sufficient to describe the size of a MMIO block?
>
> > +
> >  [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
> > index 5226c5751e98..4e1fcefb1442 100644
> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > @@ -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
> >    #
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
@ 2020-03-31 10:45   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:45 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

Please don't use the exact same subject for different patches in the
same series.

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> RD-Daniel Config-XLR is a platform in which four identical chips are
> connected via a high speed CCIX link. Add Madt and Dsdt tables for the
> same.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> ---
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl      | 125 ++++++++++++++++
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc     | 150 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf |  63 ++++++++
>  Platform/ARM/SgiPkg/SgiPlatform.dec                         |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                         |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.fdf                         |   1 +
>  6 files changed, 341 insertions(+)
>

Please include the .DSC for this platform as well.

> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
> new file mode 100644
> index 000000000000..23ada55ec4a1
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Dsdt.asl
> @@ -0,0 +1,125 @@
> +/** @file
> +*  Differentiated System Description Table Fields (DSDT)
> +*
> +*  Copyright (c) 2020, ARM Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials are licensed and made available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution.  The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +*
> +**/
> +
> +#include "SgiPlatform.h"
> +#include "SgiAcpiHeader.h"
> +
> +DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI",
> +                 EFI_ACPI_ARM_OEM_REVISION) {
> +  Scope (_SB) {
> +
> +    Device (CP00) { // Zeus core 0
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 0)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP01) { // Zeus core 1
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 1)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP02) { // Zeus core 2
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 2)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP03) { // Zeus core 3
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 3)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP04) { // Zeus core 4
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 4)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP05) { // Zeus core 5
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 5)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP06) { // Zeus core 6
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 6)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP07) { // Zeus core 7
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 7)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP08) { // Zeus core 8
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 8)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP09) { // Zeus core 9
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 9)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP10) { // Zeus core 10
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 10)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP11) { // Zeus core 11
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 11)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP12) { // Zeus core 12
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 12)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP13) { // Zeus core 13
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 13)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP14) { // Zeus core 14
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 14)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP15) { // Zeus core 15
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 15)
> +      Name (_STA, 0xF)
> +    }
> +
> +    Device (CP16) { // Zeus core 16
> +      Name (_HID, "ACPI0007")
> +      Name (_UID, 16)
> +      Name (_STA, 0xF)
> +    }
> +  } // Scope(_SB)
> +}
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
> new file mode 100644
> index 000000000000..e3784b55f2e5
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlr/Madt.aslc
> @@ -0,0 +1,150 @@
> +/** @file
> +*  Multiple APIC Description Table (MADT)
> +*
> +*  Copyright (c) 2020, ARM Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials are licensed and made available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution.  The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +*
> +**/
> +
> +#include "SgiPlatform.h"
> +#include "SgiAcpiHeader.h"
> +#include <Library/AcpiLib.h>
> +#include <Library/ArmLib.h>
> +#include <Library/PcdLib.h>
> +#include <IndustryStandard/Acpi.h>
> +
> +#define CLUSTER_COUNT                 4
> +#define CORES_PER_CLUSTER             1
> +#define CORE_COUNT                    (CLUSTER_COUNT * CORES_PER_CLUSTER)
> +#define CHIP_COUNT                    4
> +
> +// Multiple APIC Description Table
> +#pragma pack (1)
> +
> +typedef struct {
> +  EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER  Header;
> +  EFI_ACPI_6_2_GIC_STRUCTURE                           GicInterfaces[CORE_COUNT * CHIP_COUNT];
> +  EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE               GicDistributor;
> +  EFI_ACPI_6_2_GICR_STRUCTURE                          GicRedistributor[CHIP_COUNT];
> +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE;
> +
> +#pragma pack ()
> +
> +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
> +  {
> +    ARM_ACPI_HEADER (
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE,
> +      EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
> +    ),
> +    // MADT specific fields
> +    0, // LocalApicAddress
> +    0  // Flags
> +  },
> +  {
> +    // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags,
> +    //                                          PmuIrq, GicBase, GicVBase,
> +    //                                          GicHBase, GsivId, GicRBase,
> +    //                                          Efficiency)
> +    // Note: The GIC Structure of the primary CPU must be the first entry
> +    // (see note in 5.2.12.14 GICC Structure of ACPI v6.2).
> +    //Chip 0
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
> +      0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
> +      0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
> +      0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
> +      0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +
> +    // Chip 1
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
> +      0, 0, GET_MPID(0x01000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
> +      0, 1, GET_MPID(0x01000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
> +      0, 2, GET_MPID(0x01000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
> +      0, 3, GET_MPID(0x01000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +
> +    // Chip 2
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
> +      0, 0, GET_MPID(0x02000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
> +      0, 1, GET_MPID(0x02000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
> +      0, 2, GET_MPID(0x02000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
> +      0, 3, GET_MPID(0x02000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +
> +    // Chip 3
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core0
> +      0, 0, GET_MPID(0x03000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core1
> +      0, 1, GET_MPID(0x03000100ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core2
> +      0, 2, GET_MPID(0x03000200ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +    EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Zeus core3
> +      0, 3, GET_MPID(0x03000300ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23,
> +      FixedPcdGet32 (PcdGicDistributorBase),
> +      0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */),
> +  },
> +  // GIC Distributor Entry
> +  EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase),
> +                                    0, 3),
> +  {
> +    // GIC Redistributor
> +    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(0),
> +                                        SIZE_16MB),
> +    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(1),
> +                                        SIZE_16MB),
> +    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(2),
> +                                        SIZE_16MB),
> +    EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsBase) + SGI_REMOTE_CHIP_MEM_OFFSET(3),
> +                                        SIZE_16MB)
> +  }
> +};
> +
> +//
> +// Reference the table being generated to prevent the optimizer from removing
> +// the data structure from the executable
> +//
> +VOID* CONST ReferenceAcpiTable = &Madt;
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
> new file mode 100644
> index 000000000000..6a5f77b91f3c
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
> @@ -0,0 +1,63 @@
> +## @file
> +#  ACPI table data and ASL sources required to boot the platform.
> +#
> +#  Copyright (c) 2020, ARM Ltd. All rights reserved.
> +#
> +#  This program and the accompanying materials are licensed and made available
> +#  under the terms and conditions of the BSD License which accompanies this
> +#  distribution.  The full text of the license may be found at
> +#  http://opensource.org/licenses/bsd-license.php
> +#
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION                    = 0x0001001A
> +  BASE_NAME                      = RdDanielCfgXlrAcpiTables
> +  FILE_GUID                      = 42d46c2e-b6ad-4a37-bb8d-c8acc350ac2b
> +  MODULE_TYPE                    = USER_DEFINED
> +  VERSION_STRING                 = 1.0
> +
> +[Sources]
> +  Dbg2.aslc
> +  SsdtRos.asl
> +  Fadt.aslc
> +  Gtdt.aslc
> +  Iort.aslc
> +  Mcfg.aslc
> +  RdDanielCfgXlr/Dsdt.asl
> +  RdDanielCfgXlr/Madt.aslc
> +  Spcr.aslc
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  ArmPlatformPkg/ArmPlatformPkg.dec
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdePkg/MdePkg.dec
> +  Platform/ARM/SgiPkg/SgiPlatform.dec
> +
> +[FixedPcd]
> +  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
> +  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
> +
> +  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
> +  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
> +  gArmTokenSpaceGuid.PcdGicDistributorBase
> +  gArmTokenSpaceGuid.PcdGicRedistributorsBase
> +  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
> +  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
> +  gArmTokenSpaceGuid.PcdPciBusMin
> +  gArmTokenSpaceGuid.PcdPciBusMax
> +
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetSize
> +  gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
> +
> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
> index a89bf26365d7..b2fc8d9b790c 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> @@ -31,6 +31,7 @@ [Guids.common]
>    gRdN1EdgeX2AcpiTablesFileGuid = { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e, 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } }
>    gRdE1EdgeAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
>    gRdDanielCfgMAcpiTablesFileGuid = { 0x163132b3, 0x8ec1, 0x48f7, {0xb4, 0xd1, 0x49, 0x30, 0x6c, 0x3f, 0x4d, 0x51} }
> +  gRdDanielCfgXlrAcpiTablesFileGuid = { 0x42d46c2e, 0xb6ad, 0x4a37, {0xbb, 0x8d, 0xc8, 0xac, 0xc3, 0x50, 0xac, 0x2b }}
>
>  [PcdsFeatureFlag.common]
>    gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> index 74fe1a4533bd..80d1bf773bda 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> @@ -257,6 +257,7 @@ [Components.common]
>    Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
>    Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
>    Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
> +  Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf

Same point as before - if the single platform build cannot execute on
all flavours of the hardware (due to the fact that the GIC
(re)distributor) addresses are different), please split them up
properly, and don't add all ACPI tables to all platform builds.

>    MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>
>    #
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
> index 48192917e22e..351c2dc9b445 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
> @@ -104,6 +104,7 @@ [FV.FvMain]
>    INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
>    INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
>    INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgMAcpiTables.inf
> +  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdDanielCfgXlrAcpiTables.inf
>    INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>
>    # Required by PCI
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support Aditya Angadi
@ 2020-03-31 10:46   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:46 UTC (permalink / raw)
  To: Aditya Angadi; +Cc: edk2-devel-groups-io, Leif Lindholm

Again, please don't use duplicate patch titles in the same series.


On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> For RD-Daniel Config-XLR, use multichip mode information from the SGI
> platform descriptor HOB to pick the correct ACPI table to be installed.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> ---
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   | 5 +++++
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 1 +
>  Platform/ARM/SgiPkg/Include/SgiPlatform.h               | 1 +
>  3 files changed, 7 insertions(+)
>
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> index 7e0de765f753..b1f5714b934d 100644
> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> @@ -51,6 +51,11 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = {
>        RD_DANIEL_CFGM_CONF_ID,
>        MULTI_CHIP_MODE_DISABLED,
>        &gRdDanielCfgMAcpiTablesFileGuid),
> +  ACPI_GUID_LOOKUP (
> +      RD_DANIEL_PART_NUM,
> +      RD_DANIEL_CFGXLR_CONF_ID,
> +      MULTI_CHIP_MODE_ENABLED,
> +      &gRdDanielCfgXlrAcpiTablesFileGuid),
>  };
>
>  VOID
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> index 82569820b78c..00cbe608c219 100644
> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> @@ -35,6 +35,7 @@ [Guids]
>    gRdN1EdgeX2AcpiTablesFileGuid
>    gRdE1EdgeAcpiTablesFileGuid
>    gRdDanielCfgMAcpiTablesFileGuid
> +  gRdDanielCfgXlrAcpiTablesFileGuid
>
>  [FeaturePcd]
>    gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
> diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> index b6a427b8b657..9822858f6ea0 100644
> --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
> @@ -73,6 +73,7 @@
>  //RDDANIEL Platform Identification values
>  #define RD_DANIEL_PART_NUM                        0x78A
>  #define RD_DANIEL_CFGM_CONF_ID                    0x1
> +#define RD_DANIEL_CFGXLR_CONF_ID                  0x2
>
>  #define SGI_CONFIG_MASK                           0x0F
>  #define SGI_CONFIG_SHIFT                          0x1C
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform
  2020-03-25 10:52 ` [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform Aditya Angadi
@ 2020-03-31 10:48   ` Ard Biesheuvel
  0 siblings, 0 replies; 22+ messages in thread
From: Ard Biesheuvel @ 2020-03-31 10:48 UTC (permalink / raw)
  To: Aditya Angadi
  Cc: edk2-devel-groups-io, Thomas Abraham, Leif Lindholm, Sami Mujawar

On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com> wrote:
>
> From: Thomas Abraham <thomas.abraham@arm.com>
>
> Update the reviewers list for Arm platforms.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>

Thanks - I'll take this as a separate patch and apply it right away.


> ---
>  Maintainers.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index a19a64fc42d0..475f7d530b85 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -94,6 +94,7 @@ M: Leif Lindholm <leif@nuviainc.com>
>  ARM
>  F: Platform/ARM/
>  R: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> +R: Thomas Abraham <thomas.abraham@arm.com>
>  M: Leif Lindholm <leif@nuviainc.com>
>
>  BeagleBoard:
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [edk2-devel] [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual
  2020-03-31 10:42     ` Ard Biesheuvel
@ 2020-04-13 12:31       ` Aditya Angadi
  0 siblings, 0 replies; 22+ messages in thread
From: Aditya Angadi @ 2020-04-13 12:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, Ard Biesheuvel
  Cc: Vijayenthiran Subramaniam, Leif Lindholm

Hi Ard ,

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard
> Biesheuvel via Groups.Io
> Sent: 31 March 2020 16:13
> To: Aditya Angadi <Aditya.Angadi@arm.com>
> Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Vijayenthiran
> Subramaniam <Vijayenthiran.Subramaniam@arm.com>; Leif Lindholm
> <leif@nuviainc.com>
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH v3 1/9]
> Platform/ARM/SgiPkg: create individual
>
> On Tue, 31 Mar 2020 at 12:33, Ard Biesheuvel <ard.biesheuvel@arm.com>
> wrote:
> >
> > Hello Aditya,
> >
> > Could you please use a meaningful subject line for this patch?
> >
> > On Wed, 25 Mar 2020 at 11:53, Aditya Angadi <aditya.angadi@arm.com>
> 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.
> > >
> > > Cc: Leif Lindholm <leif@nuviainc.com>
> > > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > > Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
> > > ---
> > >  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.dsc                         | 37
> ++++++++++++++++++++
> > >  Platform/ARM/SgiPkg/RdN1Edge.dsc                         | 37
> ++++++++++++++++++++
> > >  Platform/ARM/SgiPkg/Sgi575.dsc                           | 37
> ++++++++++++++++++++
> > >  Platform/ARM/SgiPkg/SgiPlatform.dec                      |  5 ++-
> > >  Platform/ARM/SgiPkg/SgiPlatform.dsc                      | 25 ++-----------
> > >  8 files changed, 124 insertions(+), 35 deletions(-)
> > >
> > > 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);
> >
> > Please use a space before '('
> >
> > >    VirtualMemoryTable[Index].Attributes      =
> ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
> > >
> > >    // Expansion AXI - Platform Peripherals - HDLCD1 diff --git
> > > a/Platform/ARM/SgiPkg/RdE1Edge.dsc
> > > b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> > > new file mode 100644
> > > index 000000000000..082cbb0157f7
> > > --- /dev/null
> > > +++ b/Platform/ARM/SgiPkg/RdE1Edge.dsc
> > > @@ -0,0 +1,37 @@
> > > +#
> > > +#  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                  = ArmSgi
> > > +  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
> >
> > If you are going to split these into separate DSCs, please do this
> > first in a separate patch, and update the PLATFORM_NAME accordingly.
> >
> > If there is no need to use separate FDFs than you can keep using a
> > shared one. If there is, please do the split in the same patch.
> >
> > > +  BUILD_NUMBER                   = 1
> > > +
> > > +# include common definitions from SgiPlatform.dsc !include
> > > +Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > +
> >
> > Please rename that file to use a .dsc.inc extension to make it clear
> > this is an include file
> >
>
> Actually, now that I looked more closely: is it the case that formerly, the
> same build could run on any SGI platforms, but after this change, you have
> separate builds for separate platforms? Because the FDF contains all the ACPI
> tables for all the platforms, right?
>
> Please consider carefully whether you really want to depart from this, and if
> you do, clean up all the overlap between the platforms after you split them
> into separate ones.

Apologies in delay for replying to this email. We attempted to have a single build support for SgiPkg  but there are other platform specific differences in the upcoming RD Platforms and that is causing additional software changes to maintain single build support  and we do not have a requirement to for single build support at this point. So we are now moving away from single build. I have addressed your other comments and patchset V4 will be posted soon.

Thanks
Aditya

>
> > >
> +#########################################################
> ##########
> > > +#############
> > > +#
> > > +# 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
> > > diff --git a/Platform/ARM/SgiPkg/RdN1Edge.dsc
> > > b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> > > new file mode 100644
> > > index 000000000000..6774990ad6f6
> > > --- /dev/null
> > > +++ b/Platform/ARM/SgiPkg/RdN1Edge.dsc
> > > @@ -0,0 +1,37 @@
> > > +#
> > > +#  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                  = ArmSgi
> > > +  PLATFORM_GUID                  = dbc75915-03df-4640-8f3d-3d3abf7c119b
> > > +  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 common definitions from SgiPlatform.dsc !include
> > > +Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > +
> > >
> +#########################################################
> ##########
> > > +#############
> > > +#
> > > +# 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
> > > diff --git a/Platform/ARM/SgiPkg/Sgi575.dsc
> > > b/Platform/ARM/SgiPkg/Sgi575.dsc new file mode 100644 index
> > > 000000000000..3c1904c2da91
> > > --- /dev/null
> > > +++ b/Platform/ARM/SgiPkg/Sgi575.dsc
> > > @@ -0,0 +1,37 @@
> > > +#
> > > +#  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                  = 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 common definitions from SgiPlatform.dsc !include
> > > +Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > +
> > >
> +#########################################################
> ##########
> > > +#############
> > > +#
> > > +# 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
> > > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec
> > > b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > > index 9d70ec677776..4ac3dec91e3d 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  # @@ -49,5 +49,8
> > > @@ [PcdsFixedAtBuild]
> > >
> gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x00000000|UINT32|0x00000008
> > >
> > >
> gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|0x00000000|UINT32|0x0000
> > > 0009
> > >
> > > +  # GIC
> > > +  gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A
> >
> > Wouldn't a UINT32 be sufficient to describe the size of a MMIO block?
> >
> > > +
> > >  [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
> > > index 5226c5751e98..4e1fcefb1442 100644
> > > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > @@ -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
> > >    #
> > > --
> > > 2.17.1
> > >
>
> 

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-04-13 12:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
2020-03-31 10:33   ` Ard Biesheuvel
2020-03-31 10:42     ` Ard Biesheuvel
2020-04-13 12:31       ` [edk2-devel] " Aditya Angadi
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC Aditya Angadi
2020-03-31 10:35   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common Aditya Angadi
2020-03-31 10:36   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Aditya Angadi
2020-03-31 10:37   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
2020-03-31 10:40   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support Aditya Angadi
2020-03-31 10:39   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
2020-03-31 10:45   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support Aditya Angadi
2020-03-31 10:46   ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform Aditya Angadi
2020-03-31 10:48   ` Ard Biesheuvel
2020-03-29 16:41 ` [edk2-devel] [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Thomas Abraham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox