public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, alan@softiron.co.uk,
	graeme.gregory@linaro.org,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms 4/6] Silicon/AMD/Styx: emit DSDT as aml directly
Date: Wed,  5 Dec 2018 19:50:18 +0100	[thread overview]
Message-ID: <20181205185020.21441-5-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20181205185020.21441-1-ard.biesheuvel@linaro.org>

Instead of emitting the DSDT by incorporating the intermediate output
of [some version of] the iasl compiler, move the DSDT source file to
the ACPI platform driver, which will install it directly. This permits
us to drop a lot of cruft related to handling of this intermediate
output.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc                    |  3 --
 Platform/LeMaker/CelloBoard/CelloBoard.dsc                        |  4 ---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc       |  3 --
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf                    |  1 -
 Platform/LeMaker/CelloBoard/CelloBoard.fdf                        |  1 -
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf       |  1 -
 Silicon/AMD/Styx/AcpiTables/AcpiAml.inf                           | 29 --------------------
 Silicon/AMD/Styx/AcpiTables/AcpiTables.inf                        |  1 -
 Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf      |  1 +
 Silicon/AMD/Styx/Common/AmdStyxAcpiLib.h                          |  1 -
 Silicon/AMD/Styx/AcpiTables/Dsdt.c                                | 26 ------------------
 Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c           |  1 -
 Silicon/AMD/Styx/{AcpiTables => Drivers/AcpiPlatformDxe}/Dsdt.asl |  0
 13 files changed, 1 insertion(+), 71 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index b062f671f57f..7c66af6128c5 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -272,8 +272,6 @@ DEFINE DO_CAPSULE   = FALSE
   GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_XGBE=$(DO_XGBE) -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
   GCC:*_*_AARCH64_PP_FLAGS = -DDO_XGBE=$(DO_XGBE) -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
 
-  GCC:*_*_AARCH64_PLATFORM_FLAGS = -I$(BIN_DIR)/Silicon/AMD/Styx/AcpiTables/AcpiAml/OUTPUT
-
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
 
@@ -683,7 +681,6 @@ DEFINE DO_CAPSULE   = FALSE
       NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
   }
 
-  Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 
diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index 103c2fb74114..7c22bbbfa90f 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -264,8 +264,6 @@ DEFINE DO_FLASHER   = FALSE
   GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
   GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
 
-  GCC:*_*_AARCH64_PLATFORM_FLAGS = -I$(BIN_DIR)/Silicon/AMD/Styx/AcpiTables/AcpiAml/OUTPUT
-
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
 
@@ -617,8 +615,6 @@ DEFINE DO_FLASHER   = FALSE
     <LibraryClasses>
       NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
   }
-
-  Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
 
   #
diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index 1927ef3ebafb..793bd5359a23 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -262,8 +262,6 @@ DEFINE DO_FLASHER   = FALSE
   GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
   GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS) -DNUM_CORES=$(NUM_CORES) -DARM_CPU_AARCH64
 
-  GCC:*_*_AARCH64_PLATFORM_FLAGS = -I$(BIN_DIR)/Silicon/AMD/Styx/AcpiTables/AcpiAml/OUTPUT
-
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
 
@@ -612,7 +610,6 @@ DEFINE DO_FLASHER   = FALSE
     <LibraryClasses>
       NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
   }
-  Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
 
   #
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index cc082031621c..96df83e0da5a 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -219,7 +219,6 @@ READ_LOCK_STATUS   = TRUE
   # ACPI Support
   #
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  INF RuleOverride=ACPITABLE Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   INF Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
   INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 
diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.fdf b/Platform/LeMaker/CelloBoard/CelloBoard.fdf
index 45fc850c36cb..fc977f14b5a1 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.fdf
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.fdf
@@ -204,7 +204,6 @@ READ_LOCK_STATUS   = TRUE
   # ACPI Support
   #
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  INF RuleOverride=ACPITABLE Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   INF Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
 
   #
diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
index fec3acdd767c..8fc9a979aebc 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
@@ -217,7 +217,6 @@ READ_LOCK_STATUS   = TRUE
   # ACPI Support
   #
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  INF RuleOverride=ACPITABLE Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
   INF Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
 
   #
diff --git a/Silicon/AMD/Styx/AcpiTables/AcpiAml.inf b/Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
deleted file mode 100644
index 08a7aabe8256..000000000000
--- a/Silicon/AMD/Styx/AcpiTables/AcpiAml.inf
+++ /dev/null
@@ -1,29 +0,0 @@
-#/** @file
-#
-#  Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.<BR>
-#
-#  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                    = 0x00010005
-  BASE_NAME                      = AcpiAml
-  FILE_GUID                      = 2df2a2ee-5f34-4dea-b4b6-da724e455f33
-  MODULE_TYPE                    = USER_DEFINED
-  VERSION_STRING                 = 1.0
-
-[Sources]
-  Dsdt.asl
-
-[Packages]
-  MdePkg/MdePkg.dec
-  MdeModulePkg/MdeModulePkg.dec
-  Silicon/AMD/Styx/AmdStyx.dec
-
diff --git a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf b/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf
index 692717950f40..0bc5b1e98964 100644
--- a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf
+++ b/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf
@@ -36,7 +36,6 @@
   Madt.c
   Mcfg.c
   Csrt.c
-  Dsdt.c
   Iort.c
   Pptt.c
 
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
index cc2320e4262d..92f185fa4bee 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -28,6 +28,7 @@
 
 [Sources]
   AcpiPlatform.c
+  Dsdt.asl
   SsdtB1.asl
   SsdtXgbe.asl
 
diff --git a/Silicon/AMD/Styx/Common/AmdStyxAcpiLib.h b/Silicon/AMD/Styx/Common/AmdStyxAcpiLib.h
index 58e160b6d727..0dfd7635e897 100644
--- a/Silicon/AMD/Styx/Common/AmdStyxAcpiLib.h
+++ b/Silicon/AMD/Styx/Common/AmdStyxAcpiLib.h
@@ -22,7 +22,6 @@ EFI_ACPI_DESCRIPTION_HEADER *FadtTable (void);
 EFI_ACPI_DESCRIPTION_HEADER *FacsTable (void);
 EFI_ACPI_DESCRIPTION_HEADER *MadtHeader (void);
 EFI_ACPI_DESCRIPTION_HEADER *GtdtHeader (void);
-EFI_ACPI_DESCRIPTION_HEADER *DsdtHeader (void);
 EFI_ACPI_DESCRIPTION_HEADER *McfgHeader (void);
 EFI_ACPI_DESCRIPTION_HEADER *Dbg2Header (void);
 EFI_ACPI_DESCRIPTION_HEADER *SpcrHeader (void);
diff --git a/Silicon/AMD/Styx/AcpiTables/Dsdt.c b/Silicon/AMD/Styx/AcpiTables/Dsdt.c
deleted file mode 100644
index 25e654acabbc..000000000000
--- a/Silicon/AMD/Styx/AcpiTables/Dsdt.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/** @file
-
-  C language wrapper to build DSDT generated data.
-
-  Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.<BR>
-
-  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 <AmdStyxAcpiLib.h>
-#include <Dsdt.hex>
-
-EFI_ACPI_DESCRIPTION_HEADER *
-DsdtHeader (
-  VOID
-  )
-{
-  return (EFI_ACPI_DESCRIPTION_HEADER *) &AmlCode[0];
-}
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
index 460fb4c480c3..a00bd3bd2215 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
@@ -176,7 +176,6 @@ AcpiPlatformEntryPoint (
 
   TableIndex = 0;
   AcpiTableList[TableIndex++] = FadtTable();
-  AcpiTableList[TableIndex++] = DsdtHeader();
   AcpiTableList[TableIndex++] = MadtHeader();
   AcpiTableList[TableIndex++] = GtdtHeader();
   AcpiTableList[TableIndex++] = Dbg2Header();
diff --git a/Silicon/AMD/Styx/AcpiTables/Dsdt.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
similarity index 100%
rename from Silicon/AMD/Styx/AcpiTables/Dsdt.asl
rename to Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
-- 
2.19.2



  parent reply	other threads:[~2018-12-05 18:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 18:50 [PATCH edk2-platforms 0/6] Styx: fixes for IASL abuse and more Ard Biesheuvel
2018-12-05 18:50 ` [PATCH edk2-platforms 1/6] Silicon/AMD/Styx: move SOC version macros to common header Ard Biesheuvel
2018-12-05 18:50 ` [PATCH edk2-platforms 2/6] Silicon/AMD/Styx: move B1 revision peripherals to separate SSDT table Ard Biesheuvel
2018-12-05 18:50 ` [PATCH edk2-platforms 3/6] Silicon/AMD/Styx: move XGBE declarations " Ard Biesheuvel
2018-12-05 18:50 ` Ard Biesheuvel [this message]
2018-12-05 18:50 ` [PATCH edk2-platforms 5/6] Platform: add acpiview to Seattle/Styx platforms Ard Biesheuvel
2018-12-05 21:39   ` Carsey, Jaben
2018-12-05 18:50 ` [PATCH edk2-platforms 6/6] Platform/AMD/OverdriveBoard: use default resolution for GOP Ard Biesheuvel
2018-12-10 21:58 ` [PATCH edk2-platforms 0/6] Styx: fixes for IASL abuse and more Leif Lindholm
2018-12-11  8:01   ` Ard Biesheuvel

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20181205185020.21441-5-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

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

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