Re: [edk2] [PATCH v3 edk2-platforms 4/5] Platform/ARM/Sgi: Add ACPI tables for SGI-Clark.Helios platform

2018-11-19 Thread Leif Lindholm
On Mon, Nov 12, 2018 at 05:11:55PM +0530, Chandni Cherukuri wrote:
> Added ACPI tables and GUID name 'gSgiClarkHeliosAcpiTablesFileGuid'
> for SGI-Clark.Helios platform.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Chandni Cherukuri 
> ---
>  Platform/ARM/SgiPkg/SgiPlatform.dec |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.dsc |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.fdf |   1 +
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf |  58 +
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |   1 +
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc  |  90 +++
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dsdt.asl   | 262 
> +++
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Fadt.aslc  |  87 +++
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Gtdt.aslc  | 152 +++
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Iort.aslc  | 106 
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Madt.aslc  | 266 
> 
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Mcfg.aslc  |  61 +
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Spcr.aslc  |  77 ++
>  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Ssdt.asl   |  95 +++
>  14 files changed, 1258 insertions(+)

Oh, right, the "A" wasn't a platform revision, it was "Ares". And this
is "Helios". Then please, ignore previous comments - the other one
needs to be written out ARES/Ares and this one needs to be written out
HELIOS/Helios.

At which point we are in dire need of deduplication of these ACPI
tables:
- DBG2, SPCR and MCFG are already identical between the new platforms,
  and Sgi575 should be modified to the same format. (This set leaving
  Sgi575 on ACPI6.1 definitions while the new platforms go to 6.2
  should be enough explanation for why we need to refactor this.)
- IORT has no functional differences at all for A/H, and 575 differs
  only in (incorrectly) using __builtin_offsetof instead of the
  OFFSET_OF macro, and the ACPI version.
- SSDT differs only in coding style issues and the platform name
  (which could come in through an include file).
- GTDT and FADT are identical between A/H, and only ACPI version
  differences compared to 575.

- DSDT and MADT, I accept, are different enough that a
  per-configuration source file makes sense.

So please resubmit this as a set that:
- Moves Dbg2.aslc, Fadt.aslc, Gtdt.aslc, Iort.aslc, Mcfg.aslc,
  Spcr.aslc and Ssdt.asl directly under Platform/ARM/SgiPkg/AcpiTables/.
  Moves AcpiTables.inf to Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf.
  Updates Platform/ARM/SgiPkg/SgiPlatform.dsc so that Sgi575 still builds.
- Updates Sgi575 with whatever is required to pull the platform name
  in for SSDT.
- Considers the COM1 name as mentioned in comment on previous patch.
  (I say considers: if I've misunderstood something, that one can be
  ignored.)
- Brings in Ares and Helios platforms. (separate patches like now)
- Brings in Ares and Helios ACPI tables, adding platform-specific
  Dsdt.asl and Madt.aslc under SgiClarkAres/SgiClarkHelios. (separate
  patches like now) With .inf files SgiClarkAresAcpiTables.inf and
  SgiClarkHeliosAcpiTables.inf.

And once this is done, I no longer need to echo exactly the same
comments I gave for the preceding patch, because everything will have
alrady been addressed.

Regards,

Leif
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 edk2-platforms 4/5] Platform/ARM/Sgi: Add ACPI tables for SGI-Clark.Helios platform

2018-11-12 Thread Chandni Cherukuri
Added ACPI tables and GUID name 'gSgiClarkHeliosAcpiTablesFileGuid'
for SGI-Clark.Helios platform.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/SgiPlatform.dec |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf |   1 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf |  58 +
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |   1 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc  |  90 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dsdt.asl   | 262 
+++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Fadt.aslc  |  87 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Gtdt.aslc  | 152 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Iort.aslc  | 106 
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Madt.aslc  | 266 

 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Mcfg.aslc  |  61 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Spcr.aslc  |  77 ++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Ssdt.asl   |  95 +++
 14 files changed, 1258 insertions(+)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
b/Platform/ARM/SgiPkg/SgiPlatform.dec
index f66fa1f..f6e0ba1 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -34,6 +34,7 @@
   gArmSgiTokenSpaceGuid  = { 0x577d6941, 0xaea1, 0x40b4, { 0x90, 0x93, 
0x2a, 0x86, 0x61, 0x72, 0x5a, 0x57 } }
   gSgi575AcpiTablesFileGuid  = { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, 
0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } }
   gSgiClarkAresAcpiTablesFileGuid = { 0x4b0b91d0, 0x4a05, 0x45c4, { 0x88, 
0xa7, 0x88, 0xe1, 0x70, 0xe7, 0x66, 0x94 } }
+  gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 
0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
 
 [PcdsFeatureFlag.common]
   # Set this PCD to TRUE to enable virtio support.
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 0df0f88..99babd9 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -252,6 +252,7 @@
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   Platform/ARM/SgiPkg/AcpiTables/Sgi575/AcpiTables.inf
   Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf
+  Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   #
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf 
b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index f400083..8ec3374 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -107,6 +107,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   INF RuleOverride=ACPITABLE 
Platform/ARM/SgiPkg/AcpiTables/Sgi575/AcpiTables.inf
   INF RuleOverride=ACPITABLE 
Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf
+  INF RuleOverride=ACPITABLE 
Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   # Required by PCI
diff --git a/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf 
b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
new file mode 100644
index 000..63ebf55
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
@@ -0,0 +1,58 @@
+## @file
+#  ACPI table data and ASL sources required to boot the platform.
+#
+#  Copyright (c) 2018, 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  = SgiClarkHeliosAcpiTables
+  FILE_GUID  = 2af40815-a84e-4de9-8c38-9140b3544073
+  MODULE_TYPE= USER_DEFINED
+  VERSION_STRING = 1.0
+
+[Sources]
+  Dbg2.aslc
+  Dsdt.asl
+  Fadt.aslc
+  Gtdt.aslc
+  Iort.aslc
+  Madt.aslc
+  Mcfg.aslc
+  Spcr.aslc
+  Ssdt.asl
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+  gArmPlatformTokenSpaceGuid.PcdCoreCount
+  gArmPlatformTokenSpaceGuid.PcdClusterCount
+  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+