summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include/Library/AcpiPlatformLib.h
diff options
context:
space:
mode:
authorCorvin Köhne <corvink@freebsd.org>2023-06-06 11:21:38 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-06 10:55:41 +0000
commit1288c5415c81af7b184567c7cb02b59aeb662be9 (patch)
tree02970f6da36c6aac71a5b2518159e24c711fbb37 /OvmfPkg/Include/Library/AcpiPlatformLib.h
parentf211292711e53501c713fc38658522b695fb53de (diff)
downloadedk2-1288c5415c81af7b184567c7cb02b59aeb662be9.tar.gz
edk2-1288c5415c81af7b184567c7cb02b59aeb662be9.tar.bz2
edk2-1288c5415c81af7b184567c7cb02b59aeb662be9.zip
OvmfPkg/Xen: export AcpiTable installation into AcpiPlatformLib
This makes the function reuseable by bhyve. Signed-off-by: Corvin Köhne <corvink@FreeBSD.org> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg/Include/Library/AcpiPlatformLib.h')
-rw-r--r--OvmfPkg/Include/Library/AcpiPlatformLib.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h
index b0a3c5bd00..73a1706360 100644
--- a/OvmfPkg/Include/Library/AcpiPlatformLib.h
+++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h
@@ -4,6 +4,8 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+#include <Protocol/AcpiTable.h>
+
/**
Searches and returns the address of the ACPI Root System Description Pointer (RSDP) in system memory.
@@ -22,3 +24,26 @@ GetAcpiRsdpFromMemory (
IN UINT64 EndAddress,
OUT EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER **RsdpPtr
);
+
+/**
+ Get Acpi tables from the RSDP structure. And installs ACPI tables
+ into the RSDT/XSDT using InstallAcpiTable. Some signature of the installed
+ ACPI tables are: FACP, APIC, HPET, WAET, SSDT, FACS, DSDT.
+
+ @param AcpiProtocol Protocol instance pointer.
+
+ @return EFI_SUCCESS The table was successfully inserted.
+ @return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableHandle is
+ NULL, or AcpiTableBufferSize and the size
+ field embedded in the ACPI table pointed to
+ by AcpiTableBuffer are not in sync.
+ @return EFI_OUT_OF_RESOURCES Insufficient resources exist to complete the
+request.
+
+**/
+EFI_STATUS
+EFIAPI
+InstallAcpiTablesFromRsdp (
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp
+ );