diff options
author | Zhiguang Liu <zhiguang.liu@intel.com> | 2021-04-30 14:17:56 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-16 05:20:19 +0000 |
commit | 761329ee27e2202e22bcb4fc5407cbbdeee27bb4 (patch) | |
tree | dbdd5b4db95cf2e6d46ed9ad0ed422b92fcd0f86 /MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h | |
parent | 75293330eaefd2f146ed7716ecf423020b10bf8f (diff) | |
download | edk2-761329ee27e2202e22bcb4fc5407cbbdeee27bb4.tar.gz edk2-761329ee27e2202e22bcb4fc5407cbbdeee27bb4.tar.bz2 edk2-761329ee27e2202e22bcb4fc5407cbbdeee27bb4.zip |
MdeModulePkg/ACPI: Install ACPI table from HOB.
If HOB contains APCI table information, entry point of AcpiTableDxe.inf
should parse the APCI table from HOB, and install these tables.
We assume the whole ACPI table
(starting with EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER)
is contained by a single gEfiAcpiTableGuid HOB.
If error happens when installing ACPI table, stop installing and removing
all the tables that are already added.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h index 9d7cf7ccfc..0af2d11a1a 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h @@ -1,7 +1,7 @@ /** @file
ACPI Table Protocol Driver
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -24,6 +24,8 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/PcdLib.h>
+#include <Library/HobLib.h>
+#include <UniversalPayload/AcpiTable.h>
//
// Statements that include other files
@@ -228,6 +230,40 @@ SdtAcpiTableAcpiSdtConstructor ( IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance
);
+/**
+ Returns a requested ACPI table.
+
+ The following structures are not considered elements in the list of
+ ACPI tables:
+ - Root System Description Pointer (RSD_PTR)
+ - Root System Description Table (RSDT)
+ - Extended System Description Table (XSDT)
+ Version is updated with a bit map containing all the versions of ACPI of which the table is a
+ member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface,
+ the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion.
+
+ @param[in] AcpiTableInstance ACPI table Instance.
+ @param[in] Index The zero-based index of the table to retrieve.
+ @param[out] Table Pointer for returning the table buffer.
+ @param[out] Version On return, updated with the ACPI versions to which this table belongs. Type
+ EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the
+ EFI_ACPI_SDT_PROTOCOL.
+ @param[out] TableKey On return, points to the table key for the specified ACPI system definition table.
+ This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL.
+ The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()
+ to uninstall the table.
+ @retval EFI_SUCCESS The function completed successfully.
+ @retval EFI_NOT_FOUND The requested index is too large and a table was not found.
+**/
+EFI_STATUS
+SdtGetAcpiTable (
+ IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance,
+ IN UINTN Index,
+ OUT EFI_ACPI_SDT_HEADER **Table,
+ OUT EFI_ACPI_TABLE_VERSION *Version,
+ OUT UINTN *TableKey
+ );
+
//
// export PrivateData symbol, because we need that in AcpiSdtProtol implementation
//
|