public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Zailiang Sun <zailiang.sun@intel.com>, Yi Qian <yi.qian@intel.com>
Subject: [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol
Date: Sun, 30 Jun 2019 19:55:52 -0700	[thread overview]
Message-ID: <20190701025553.18596-14-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com>

Remove use of ACPI Support Protocol from IntelFrameworkPkg
and use the ACPI Table Protocol and ACPI SDT Protocol from
the MdePkg.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../AcpiPlatform/AcpiPlatform.c               | 72 +++++--------------
 .../AcpiPlatform/AcpiPlatform.h               |  2 +-
 .../AcpiPlatform/AcpiPlatform.inf             |  5 +-
 .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec   |  1 -
 .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf      |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc     |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc      |  2 +-
 9 files changed, 26 insertions(+), 64 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index 13d904b834..962baf561d 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -35,8 +35,7 @@ Abstract:
 #include <Guid/SetupVariable.h>
 #include <Guid/PlatformInfo.h>
 #include <Guid/BoardFeatures.h>
-#include <Protocol/AcpiSupport.h>
-#include <Protocol/AcpiS3Save.h>
+#include <Protocol/AcpiTable.h>
 #include <Library/CpuIA32.h>
 #include <SetupMode.h>
 #include <Guid/AcpiTableStorage.h>
@@ -142,15 +141,15 @@ LocateSupportProtocol (
     //
     // See if it has the ACPI storage file.
     //
-    Status = ((EFI_FIRMWARE_VOLUME_PROTOCOL *) (*Instance))->ReadFile (
-                                                              *Instance,
-                                                              &gEfiAcpiTableStorageGuid,
-                                                              NULL,
-                                                              &Size,
-                                                              &FileType,
-                                                              &Attributes,
-                                                              &FvStatus
-                                                              );
+    Status = ((EFI_FIRMWARE_VOLUME2_PROTOCOL *) (*Instance))->ReadFile (
+                                                                *Instance,
+                                                                &gEfiAcpiTableStorageGuid,
+                                                                NULL,
+                                                                &Size,
+                                                                &FileType,
+                                                                &Attributes,
+                                                                &FvStatus
+                                                                );
 
     //
     // If we found it, then we are done.
@@ -633,13 +632,11 @@ OnReadyToBoot (
   )
 {
   EFI_STATUS                  Status;
-  EFI_ACPI_TABLE_VERSION      TableVersion;
-  EFI_ACPI_SUPPORT_PROTOCOL   *AcpiSupport;
   SYSTEM_CONFIGURATION        SetupVarBuffer;
   UINTN                       VariableSize;
   EFI_PLATFORM_CPU_INFO       *PlatformCpuInfoPtr = NULL;
   EFI_PLATFORM_CPU_INFO       PlatformCpuInfo;
-  EFI_PEI_HOB_POINTERS          GuidHob;
+  EFI_PEI_HOB_POINTERS        GuidHob;
 
   if (mFirstNotify) {
     return;
@@ -701,23 +698,6 @@ OnReadyToBoot (
               );
     ASSERT_EFI_ERROR (Status);
   }
-
-  //
-  // Find the AcpiSupport protocol.
-  //
-  Status = LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **) &AcpiSupport, 0);
-  ASSERT_EFI_ERROR (Status);
-
-  TableVersion = EFI_ACPI_TABLE_VERSION_2_0;
-
-  //
-  // Publish ACPI 1.0 or 2.0 Tables.
-  //
-  Status = AcpiSupport->PublishTables (
-                          AcpiSupport,
-                          TableVersion
-                          );
-  ASSERT_EFI_ERROR (Status);
 }
 
 VOID
@@ -759,8 +739,8 @@ AcpiPlatformEntryPoint (
 {
   EFI_STATUS                    Status;
   EFI_STATUS                    AcpiStatus;
-  EFI_ACPI_SUPPORT_PROTOCOL     *AcpiSupport;
-  EFI_FIRMWARE_VOLUME2_PROTOCOL  *FwVol;
+  EFI_ACPI_TABLE_PROTOCOL       *AcpiTable;
+  EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
   INTN                          Instance;
   EFI_ACPI_COMMON_HEADER        *CurrentTable;
   UINTN                         TableHandle;
@@ -821,9 +801,9 @@ AcpiPlatformEntryPoint (
   }
 
   //
-  // Find the AcpiSupport protocol.
+  // Find the AcpiTable protocol.
   //
-  Status = LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **) &AcpiSupport, 0);
+  Status = LocateSupportProtocol (&gEfiAcpiTableProtocolGuid, (VOID **) &AcpiTable, 0);
   ASSERT_EFI_ERROR (Status);
 
   //
@@ -1171,11 +1151,10 @@ AcpiPlatformEntryPoint (
           // Add the table.
           //
           TableHandle = 0;
-          AcpiStatus = AcpiSupport->SetAcpiTable (
-                                      AcpiSupport,
+          AcpiStatus = AcpiTable->InstallAcpiTable (
+                                      AcpiTable,
                                       CurrentTable,
-                                      TRUE,
-                                      TableVersion,
+                                      Size,
                                       &TableHandle
                                       );
           ASSERT_EFI_ERROR (AcpiStatus);
@@ -1189,21 +1168,6 @@ AcpiPlatformEntryPoint (
     }
   }
 
-  //
-  // Publish ACPI 1.0 or 2.0 Tables.
-  //
-//  Status = AcpiSupport->PublishTables (
-//                          AcpiSupport,
-//                          TableVersion
-//                          );
-//  ASSERT_EFI_ERROR (Status);
-
-//  Status = EfiCreateEventReadyToBootEx (
-//             TPL_NOTIFY,
-//             OnReadyToBoot,
-//             NULL,
-//             &Event
-//             );
   Event = NULL;
   OnReadyToBoot (Event, NULL);
 
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
index b27ca661ff..8289eecc6d 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
@@ -30,7 +30,7 @@ Abstract:
 #include <Library/UefiBootServicesTableLib.h>
 #include <Library/UefiRuntimeServicesTableLib.h>
 #include <Library/DebugLib.h>
-#include <Protocol/FirmwareVolume.h>
+#include <Protocol/FirmwareVolume2.h>
 #include <Library/PcdLib.h>
 #include <IndustryStandard/HighPrecisionEventTimerTable.h>
 #include <IndustryStandard/Acpi.h>
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
index ce4db9fa85..6f843d6d2e 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
@@ -34,7 +34,6 @@ [sources.common]
 [Packages]
   Vlv2TbltDevicePkg/PlatformPkg.dec
   MdePkg/MdePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
@@ -64,7 +63,7 @@ [Guids]
 [Protocols]
   gEnhancedSpeedstepProtocolGuid
   gEfiPlatformCpuProtocolGuid
-  gEfiAcpiSupportProtocolGuid
+  gEfiAcpiTableProtocolGuid
   gEfiFirmwareVolume2ProtocolGuid
   gEfiMpServiceProtocolGuid
   gEfiGlobalNvsAreaProtocolGuid
@@ -78,5 +77,5 @@ [Pcd]
 [Depex]
   gEfiVariableArchProtocolGuid        AND
   gEfiVariableWriteArchProtocolGuid   AND
-  gEfiAcpiSupportProtocolGuid AND
+  gEfiAcpiTableProtocolGuid AND
   gEfiMpServiceProtocolGuid
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
index a5c7062cbb..abe9d7e3a0 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
@@ -44,7 +44,6 @@ [Guids]
   gEfiSetupVariableGuid                   = { 0xec87d643, 0xeba4, 0x4bb5, { 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0x0d, 0xa9 } }
   gEfiPlatformInfoGuid                    = { 0x1e2acc41, 0xe26a, 0x483d, { 0xaf, 0xc7, 0xa0, 0x56, 0xc3, 0x4e, 0x08, 0x7b } }
   gMfgModeVariableGuid                    = { 0xEF14FD78, 0x0793, 0x4e2b, { 0xAC, 0x6D, 0x06, 0x28, 0x47, 0xE0, 0x17, 0x91 } }
-  gEfiAcpiTableStorageGuid                = { 0x7e374e25, 0x8e01, 0x4fee, { 0x87, 0xf2, 0x39, 0x0c, 0x23, 0xc6, 0x06, 0xcd } }
   gACPIOSFRMfgStringVariableGuid          = { 0x72234213, 0x0fd7, 0x48a1, { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } }
   gACPIOSFRRefDataBlockVariableGuid       = { 0x72234213, 0x0fd7, 0x48a1, { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } }
   gACPIOSFRModelStringVariableGuid        = { 0xca1bcad9, 0xe021, 0x4547, { 0xa1, 0xb0, 0x5b, 0x22, 0xc7, 0xf6, 0x87, 0xf4 } }
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
index b0fbbdb9cb..0661c778c1 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -504,7 +504,7 @@ [FV.FVMAIN]
   #
 INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
 INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
-INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
+INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
 INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
 INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 107c160b76..06bdebb10b 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -453,7 +453,7 @@ [FV.FVMAIN]
   #
 INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
 INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
-INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
+INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
 INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
 INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 2123745ccd..b558caa61f 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1108,7 +1108,7 @@ [Components.X64]
   }
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
 
-  IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
   Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 086668d570..99ada0ef0a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1092,7 +1092,7 @@ [Components.IA32]
   }
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
 
-  IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
   Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 5f2dd65ec8..87404d2d82 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1107,7 +1107,7 @@ [Components.X64]
   }
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
 
-  IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
   Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
-- 
2.21.0.windows.1


  parent reply	other threads:[~2019-07-01  2:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  2:55 [edk2-platforms Patch 00/14] Vlv2TbltDevicePkg: Remove Intel Framework dependencies Michael D Kinney
2019-07-01  2:55 ` [edk2-platforms Patch 01/14] Vlv2DeviceRefCodePkg: Add gEfiSmmIchnDispatchProtocolGuid Michael D Kinney
2019-07-01  4:06   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 02/14] Vlv2TbltDevicePkg: Reduce Intel Framework dependencies Michael D Kinney
2019-07-01  4:06   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 03/14] Vlv2TbltDevicePkg: Remove unused modules/libraries Michael D Kinney
2019-07-01  4:07   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 04/14] Vlv2TbltDevicePkg: Switch from ISA to SIO modules Michael D Kinney
2019-07-01  4:07   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 05/14] Vlv2TbltDevicePkg: Switch to CPU I/O 2 Protocol Michael D Kinney
2019-07-01  4:07   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 06/14] Vlv2TbltDevicePkg: Remove use of PS/2 Policy Protocol Michael D Kinney
2019-07-01  4:07   ` [edk2-devel] " Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 07/14] Vlv2TbltDevicePkg: Remove use of BIOS ID tools Michael D Kinney
2019-07-01  4:07   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 08/14] Vlv2TbltDevicePkg: Remove use of Data Hub Protocol Michael D Kinney
2019-07-01  4:08   ` [edk2-devel] " Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 09/14] Vlv2TbltDevicePkg: Use PI Spec SMBUS2 PPI Michael D Kinney
2019-07-01  4:08   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 10/14] Vlv2TbltDevicePkg: Switch to MdeModulePkg BdsDxe Michael D Kinney
2019-07-01  4:08   ` Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 11/14] Vlv2TbltDevicePkg: Update boot mode/state behaviors Michael D Kinney
2019-07-01  4:08   ` [edk2-devel] " Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 12/14] Vlv2TbltDevicePkg/PlatformSmm: Switch to PI SMM Protocols Michael D Kinney
2019-07-01  4:08   ` [edk2-devel] " Sun, Zailiang
2019-07-01  2:55 ` Michael D Kinney [this message]
2019-07-01  4:08   ` [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol Sun, Zailiang
2019-07-01  2:55 ` [edk2-platforms Patch 14/14] Vlv2TbltDevicePkg/PlatformInitPei: Update MemoryTypeInformation Michael D Kinney
2019-07-01  4:08   ` Sun, Zailiang
2019-07-01  4:04 ` [edk2-devel] [edk2-platforms Patch 00/14] Vlv2TbltDevicePkg: Remove Intel Framework dependencies Gary Lin
2019-07-01 23:07   ` Michael D Kinney
2019-07-02  9:48     ` Gary Lin
2019-07-02 16:49       ` Michael D Kinney
2019-07-02 21:11         ` Michael D Kinney
2019-07-03  3:57           ` Gary Lin
2019-07-09  3:52             ` Michael D Kinney
2019-07-09  6:04               ` Gary Lin
2019-07-10  3:38                 ` Michael D Kinney
2019-07-10  4:14                   ` Gary Lin
2019-07-10  5:01                     ` Michael D Kinney
2019-07-10  7:10                       ` Gary Lin
2019-07-10 19:27                         ` Michael D Kinney

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=20190701025553.18596-14-michael.d.kinney@intel.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