summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorCorvin Köhne <corvink@freebsd.org>2023-06-06 11:21:37 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-06 10:55:41 +0000
commitf211292711e53501c713fc38658522b695fb53de (patch)
tree48a776b9119bf392358c19cfdc063a6a8dc3057d /OvmfPkg/Include
parentc1dd400a13d1a5e862809c55f6760ba3a944a609 (diff)
downloadedk2-f211292711e53501c713fc38658522b695fb53de.tar.gz
edk2-f211292711e53501c713fc38658522b695fb53de.tar.bz2
edk2-f211292711e53501c713fc38658522b695fb53de.zip
OvmfPkg/Xen: export search of RSDP into a library function
Xen and bhyve are placing ACPI tables into system memory. So, they can share the same code. Therefore, create a new library which searches and installs ACPI tables from system memory. 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')
-rw-r--r--OvmfPkg/Include/Library/AcpiPlatformLib.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h
new file mode 100644
index 0000000000..b0a3c5bd00
--- /dev/null
+++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h
@@ -0,0 +1,24 @@
+/** @file
+ Copyright (c) 2023, Corvin Köhne <corvink@FreeBSD.org>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+/**
+ Searches and returns the address of the ACPI Root System Description Pointer (RSDP) in system memory.
+
+ @param StartAddress Start address of search range.
+ @param EndAddress End address of search range.
+ @param RsdpPtr Return pointer to RSDP.
+
+ @retval EFI_SUCCESS RSDP successfully found.
+ @retval EFI_NOT_FOUND Couldn't find RSDP.
+ @retval EFI_ABORTED Invalid RSDP found.
+**/
+EFI_STATUS
+EFIAPI
+GetAcpiRsdpFromMemory (
+ IN UINT64 StartAddress,
+ IN UINT64 EndAddress,
+ OUT EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER **RsdpPtr
+ );