public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Sami Mujawar <sami.mujawar@arm.com>
To: edk2-devel@lists.01.org
Cc: Sami Mujawar <sami.mujawar@arm.com>,
	ard.biesheuvel@linaro.org, leif.lindholm@linaro.org,
	michael.d.kinney@intel.com, alexei.fedorov@arm.com,
	Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com,
	nd@arm.com
Subject: [PATCH edk2-platforms v3 2/4] Platform/ARM: Dynamic Tables support for Juno
Date: Thu, 24 Jan 2019 15:46:54 +0000	[thread overview]
Message-ID: <20190124154656.47016-3-sami.mujawar@arm.com> (raw)
In-Reply-To: <20190124154656.47016-1-sami.mujawar@arm.com>

The dynamic tables framework uses the platform hardware
information described by the configuration manager to
generate ACPI tables. This support is configurable and
can be enabled using the DYNAMIC_TABLES_FRAMEWORK build
option.

When DYNAMIC_TABLES_FRAMEWORK is defined, ACPI tables are
generated and installed by the dynamic table framework.
Therefore, installation of ACPI tables from the Firmware
Volume (FV) is disabled by this option.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
 Platform/ARM/JunoPkg/ArmJuno.dsc                     | 12 +++++++++++-
 Platform/ARM/JunoPkg/ArmJuno.fdf                     | 12 ++++++++++++
 Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c |  9 +++++++--
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc
index 3edde5b65be47fe14988940ce2ef31a60f38dd31..a355c1e1d983339b3b461eddbf60e4a31888a361 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.dsc
+++ b/Platform/ARM/JunoPkg/ArmJuno.dsc
@@ -33,6 +33,11 @@ [Defines]
 # On RTSM, most peripherals are VExpress Motherboard peripherals
 !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
 
+!ifdef DYNAMIC_TABLES_FRAMEWORK
+!include DynamicTablesPkg/DynamicTables.dsc.inc
+!include Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager.dsc.inc
+!endif
+
 [LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
   ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
@@ -79,6 +84,10 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, Libr
 [BuildOptions]
   GCC:*_*_ARM_PLATFORM_FLAGS = -march=armv8-a
 
+!ifdef DYNAMIC_TABLES_FRAMEWORK
+  *_*_*_PLATFORM_FLAGS = -DDYNAMIC_TABLES_FRAMEWORK
+!endif
+
 ################################################################################
 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
@@ -266,8 +275,9 @@ [Components.common]
   # ACPI Support
   #
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+!ifndef DYNAMIC_TABLES_FRAMEWORK
   Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
-
+!endif
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf
index 0a8b636d0ebd10a7bceb3cbe6ca1bed8688da1a6..b1295a579b094db1433898589a282702ec854bfb 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.fdf
+++ b/Platform/ARM/JunoPkg/ArmJuno.fdf
@@ -114,7 +114,17 @@ [FV.FvMain]
   # ACPI Support
   #
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+!ifndef DYNAMIC_TABLES_FRAMEWORK
   INF RuleOverride=ACPITABLE Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
+!else
+  # Configuration Manager
+  INF Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf
+
+  #
+  # Dynamic Table fdf
+  #
+  !include DynamicTablesPkg/DynamicTables.fdf.inc
+!endif
 
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
@@ -378,8 +388,10 @@ [Rule.Common.UEFI_APPLICATION.BINARY]
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
   }
 
+!ifndef DYNAMIC_TABLES_FRAMEWORK
 [Rule.Common.USER_DEFINED.ACPITABLE]
   FILE FREEFORM = $(NAMED_GUID) {
     RAW ACPI               |.acpi
     RAW ASL                |.aml
   }
+!endif
diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 18491c7378523f365644658c270de95e711c5ac1..0a42d21d4e9b60824f1d313a4d5ad9e4bc6db3aa 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2013-2015, ARM Limited. All rights reserved.
+*  Copyright (c) 2013-2017, 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
@@ -33,9 +33,10 @@
 #include <Library/IoLib.h>
 #include <Library/PrintLib.h>
 
-
+#ifndef DYNAMIC_TABLES_FRAMEWORK
 // This GUID must match the FILE_GUID in ArmPlatformPkg/ArmJunoPkg/AcpiTables/AcpiTables.inf
 STATIC CONST EFI_GUID mJunoAcpiTableFile = { 0xa1dd808e, 0x1e95, 0x4399, { 0xab, 0xc0, 0x65, 0x3c, 0x82, 0xe8, 0x53, 0x0c } };
+#endif
 
 typedef struct {
   ACPI_HID_DEVICE_PATH      AcpiDevicePath;
@@ -487,11 +488,13 @@ ArmJunoEntryPoint (
 
   GetJunoRevision(JunoRevision);
 
+#ifndef DYNAMIC_TABLES_FRAMEWORK
   //
   // Try to install the ACPI Tables
   //
   Status = LocateAndInstallAcpiFromFv (&mJunoAcpiTableFile);
   ASSERT_EFI_ERROR (Status);
+#endif
 
   //
   // Setup R1/R2 options if not already done.
@@ -516,6 +519,7 @@ ArmJunoEntryPoint (
                     &EndOfDxeEvent
                     );
 
+#ifndef DYNAMIC_TABLES_FRAMEWORK
     // Declare the related ACPI Tables
     EfiCreateProtocolNotifyEvent (
         &gEfiAcpiTableProtocolGuid,
@@ -524,6 +528,7 @@ ArmJunoEntryPoint (
         NULL,
         &mAcpiRegistration
         );
+#endif
   }
 
   //
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




  parent reply	other threads:[~2019-01-24 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 15:46 [PATCH edk2-platforms v3 0/4] Platform/ARM: Platform support for Dynamic Tables Framework Sami Mujawar
2019-01-24 15:46 ` [PATCH edk2-platforms v3 1/4] Platform/ARM: Configuration Manager for Juno Sami Mujawar
2019-01-24 15:46 ` Sami Mujawar [this message]
2019-01-24 15:46 ` [PATCH edk2-platforms v3 3/4] Platform/ARM: Configuration Manager for FVP Sami Mujawar
2019-01-24 15:46 ` [PATCH edk2-platforms v3 4/4] Platform/ARM: Dynamic Tables support " Sami Mujawar
2019-03-22 18:56 ` [PATCH edk2-platforms v3 0/4] Platform/ARM: Platform support for Dynamic Tables Framework Leif Lindholm

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=20190124154656.47016-3-sami.mujawar@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

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

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