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: lersek@redhat.com, alexei.fedorov@arm.com,
	leif.lindholm@linaro.org, Matteo.Carlini@arm.com,
	Stephanie.Hughes-Fitt@arm.com, nd@arm.com
Subject: [PATCH v1 4/6] Revert "DynamicTablesPkg: Add OEM Info"
Date: Tue, 26 Feb 2019 08:44:21 +0000	[thread overview]
Message-ID: <20190226084423.14024-5-sami.mujawar@arm.com> (raw)
In-Reply-To: <20190226084423.14024-1-sami.mujawar@arm.com>

This reverts commit c788bdaba47536447ae37518a96d92e0da54aad7.

Reverting this patch as Soft Feature Freeze for
edk2-stable201903 started on 22 Feb 2019.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Alexei Fedorov <alexei.fedorov@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
 DynamicTablesPkg/Include/Library/TableHelperLib.h                |  4 +--
 DynamicTablesPkg/Include/StandardNameSpaceObjects.h              | 18 --------------
 DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c |  2 +-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c |  2 +-
 DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c     | 26 ++++++--------------
 10 files changed, 16 insertions(+), 46 deletions(-)

diff --git a/DynamicTablesPkg/Include/Library/TableHelperLib.h b/DynamicTablesPkg/Include/Library/TableHelperLib.h
index 0f872bc3d08bf78e33bd8dab866e7bf57e00cb8c..3c4e1d23d2e6955388ab0b51fb57779f2225beb2 100644
--- a/DynamicTablesPkg/Include/Library/TableHelperLib.h
+++ b/DynamicTablesPkg/Include/Library/TableHelperLib.h
@@ -45,7 +45,7 @@ GetCgfMgrInfo (
   @param [in]     Generator      Pointer to the ACPI table Generator.
   @param [in,out] AcpiHeader     Pointer to the ACPI table header to be
                                  updated.
-  @param [in]     AcpiTableInfo  Pointer to the ACPI table info structure.
+  @param [in]     Revision       Revision of the ACPI table.
   @param [in]     Length         Length of the ACPI table.
 
   @retval EFI_SUCCESS           The ACPI table is updated successfully.
@@ -61,7 +61,7 @@ AddAcpiHeader (
   IN      CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST CfgMgrProtocol,
   IN      CONST ACPI_TABLE_GENERATOR                  * CONST Generator,
   IN OUT  EFI_ACPI_DESCRIPTION_HEADER                 * CONST AcpiHeader,
-  IN      CONST CM_STD_OBJ_ACPI_TABLE_INFO            * CONST AcpiTableInfo,
+  IN      CONST UINT32                                        Revision,
   IN      CONST UINT32                                        Length
   );
 
diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
index 58503858b27141cf7647a410c4b0b3fa574033de..4377ee8f785399b02fec824f3a34d2f4ed3b1c01 100644
--- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
@@ -93,24 +93,6 @@ typedef struct CmAStdObjAcpiTableInfo {
   /// Optional pointer to the ACPI table data
   EFI_ACPI_DESCRIPTION_HEADER  * AcpiTableData;
 
-  /// An OEM-supplied string that the OEM uses to identify the particular
-  /// data table. This field is particularly useful when defining a definition
-  /// block to distinguish definition block functions. The OEM assigns each
-  /// dissimilar table a new OEM Table ID.
-  /// This field could be constructed using the SIGNATURE_64() macro.
-  ///   e.g. SIGNATURE_64 ('A','R','M','H','G','T','D','T')
-  /// Note: If this field is not populated (has value of Zero), then the
-  /// Generators shall populate this information using part of the
-  /// CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.OemId field and the
-  /// ACPI table signature.
-  UINT64                         OemTableId;
-
-  /// An OEM-supplied revision number. Larger numbers are assumed to be
-  /// newer revisions.
-  /// Note: If this field is not populated (has value of Zero), then the
-  /// Generators shall populate this information using the revision of the
-  /// Configuration Manager (CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.Revision).
-  UINT32                         OemRevision;
 } CM_STD_OBJ_ACPI_TABLE_INFO;
 
 /** A structure used to describe the SMBIOS table generators to be invoked.
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
index 697cfc46abaedf34d30abf26e7ebb2b4d271822a..e21e2b660634b1aedce8167b74573694d6df2a3b 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
@@ -342,7 +342,7 @@ BuildDbg2Table (
              CfgMgrProtocol,
              This,
              (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiDbg2,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              sizeof (DBG2_TABLE)
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
index 6699901b42a63a152027de59887ed097748ece91..62927b51d6d7c1585da1cb0d59785e2382639002 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
@@ -537,7 +537,7 @@ BuildFadtTable (
              CfgMgrProtocol,
              This,
              (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiFadt,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              sizeof (EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE)
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index d58794ee3ef5b72a8b2e3eb930ad5ab5bbb57c38..70f52507bc7f12a776f76271b3f378bc62e717ba 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
@@ -518,7 +518,7 @@ BuildGtdtTable (
              CfgMgrProtocol,
              This,
              &Gtdt->Header,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              TableSize
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
index 2bac7a59ea40d6a3cae675b39d5df26ab7783a29..b53c4bb47798d4ad441db1fe1b1e5b180e313403 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
@@ -1798,7 +1798,7 @@ BuildIortTable (
              CfgMgrProtocol,
              This,
              &Iort->Header,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              TableSize
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
index 1ee0b9e006bfa00ea5bbf6aa64209dac244c90a0..06794758308e028b7d8da06670b1793cbdb3ae81 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
@@ -569,7 +569,7 @@ BuildMadtTable (
              CfgMgrProtocol,
              This,
              &Madt->Header,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              TableSize
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
index 2131683a35158f40304892da9ab12e547483a4bc..29eb72bd917227e87b8f126aa098a6e0ff3918cc 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
@@ -220,7 +220,7 @@ BuildMcfgTable (
              CfgMgrProtocol,
              This,
              &Mcfg->Header,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              TableSize
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
index 6778d7673e71e6347f21935b5f709b690f64dab4..a4654acb39812af022a1e678b78e31415d94ef30 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
@@ -211,7 +211,7 @@ BuildSpcrTable (
              CfgMgrProtocol,
              This,
              (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiSpcr,
-             AcpiTableInfo,
+             AcpiTableInfo->AcpiTableRevision,
              sizeof (EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE)
              );
   if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
index 203207bac2b202f568072b68e8cb25c5c258045f..02860ddf233b4a44c30450c8c090b416f1e07d81 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
@@ -100,7 +100,7 @@ GetCgfMgrInfo (
   @param [in]     Generator      Pointer to the ACPI table Generator.
   @param [in,out] AcpiHeader     Pointer to the ACPI table header to be
                                  updated.
-  @param [in]     AcpiTableInfo  Pointer to the ACPI table info structure.
+  @param [in]     Revision       Revision of the ACPI table.
   @param [in]     Length         Length of the ACPI table.
 
   @retval EFI_SUCCESS           The ACPI table is updated successfully.
@@ -116,7 +116,7 @@ AddAcpiHeader (
   IN      CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST CfgMgrProtocol,
   IN      CONST ACPI_TABLE_GENERATOR                  * CONST Generator,
   IN OUT  EFI_ACPI_DESCRIPTION_HEADER                 * CONST AcpiHeader,
-  IN      CONST CM_STD_OBJ_ACPI_TABLE_INFO            * CONST AcpiTableInfo,
+  IN      CONST UINT32                                        Revision,
   IN      CONST UINT32                                        Length
   )
 {
@@ -151,7 +151,7 @@ AddAcpiHeader (
   // UINT32  Length
   AcpiHeader->Length = Length;
   // UINT8   Revision
-  AcpiHeader->Revision = AcpiTableInfo->AcpiTableRevision;
+  AcpiHeader->Revision = Revision;
   // UINT8   Checksum
   AcpiHeader->Checksum = 0;
 
@@ -159,24 +159,12 @@ AddAcpiHeader (
   CopyMem (AcpiHeader->OemId, CfgMfrInfo->OemId, sizeof (AcpiHeader->OemId));
 
   // UINT64  OemTableId
-  if (AcpiTableInfo->OemTableId != 0) {
-    AcpiHeader->OemTableId = AcpiTableInfo->OemTableId;
-  } else {
-    AcpiHeader->OemTableId = SIGNATURE_32 (
-                               CfgMfrInfo->OemId[0],
-                               CfgMfrInfo->OemId[1],
-                               CfgMfrInfo->OemId[2],
-                               CfgMfrInfo->OemId[3]
-                               ) |
-                             ((UINT64)Generator->AcpiTableSignature << 32);
-  }
+  AcpiHeader->OemTableId = Generator->CreatorId;
+  AcpiHeader->OemTableId <<= 32;
+  AcpiHeader->OemTableId |= Generator->AcpiTableSignature;
 
   // UINT32  OemRevision
-  if (AcpiTableInfo->OemRevision != 0) {
-    AcpiHeader->OemRevision = AcpiTableInfo->OemRevision;
-  } else {
-    AcpiHeader->OemRevision = CfgMfrInfo->Revision;
-  }
+  AcpiHeader->OemRevision = CfgMfrInfo->Revision;
 
   // UINT32  CreatorId
   AcpiHeader->CreatorId = Generator->CreatorId;
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




  parent reply	other threads:[~2019-02-26  8:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  8:44 [PATCH v1 0/6] Revert DynamicTablesPkg: Framework updates and fixes Sami Mujawar
2019-02-26  8:44 ` [PATCH v1 1/6] Revert "DynamicTablesPkg: Minor updates and fix typos" Sami Mujawar
2019-02-26  8:44 ` [PATCH v1 2/6] Revert "DynamicTablesPkg: Remove GIC Distributor Id field" Sami Mujawar
2019-02-26  8:44 ` [PATCH v1 3/6] Revert "DynamicTablesPkg: DGB2: Update DBG2_DEBUG_PORT_DDI" Sami Mujawar
2019-02-26  8:44 ` Sami Mujawar [this message]
2019-02-26  8:44 ` [PATCH v1 5/6] Revert "DynamicTablesPkg: Rename enum used for ID Mapping" Sami Mujawar
2019-02-26  8:44 ` [PATCH v1 6/6] Revert "DynamicTablesPkg: Fix protocol section" Sami Mujawar
2019-02-26 10:26 ` [PATCH v1 0/6] Revert DynamicTablesPkg: Framework updates and fixes Alexei Fedorov
2019-02-26 11:01 ` Laszlo Ersek
2019-02-26 11:05   ` Laszlo Ersek
2019-02-27 13:44     ` Sami Mujawar
2019-02-27 19:55       ` Laszlo Ersek

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=20190226084423.14024-5-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