From ea88df6b26e93bfe12cea6804631d84e871be77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corvin=20K=C3=B6hne?= Date: Wed, 21 Jun 2023 09:31:13 +0200 Subject: OvmfPkg: move PciEncoding into AcpiPlatformLib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bhyve supports providing ACPI tables by FwCfg. Therefore, InstallQemuFwCfgTables should be moved to AcpiPlatformLib to reuse the code. As first step, move PciEncoding into AcpiPlatformLib. Signed-off-by: Corvin Köhne Acked-by: Peter Grehan --- OvmfPkg/Include/Library/AcpiPlatformLib.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OvmfPkg/Include/Library') diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h index 6172650003..167d6c49d6 100644 --- a/OvmfPkg/Include/Library/AcpiPlatformLib.h +++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h @@ -8,6 +8,12 @@ #define ACPI_PLATFORM_LIB_H_ #include +#include + +typedef struct { + EFI_PCI_IO_PROTOCOL *PciIo; + UINT64 PciAttributes; +} ORIGINAL_ATTRIBUTES; /** Searches and returns the address of the ACPI Root System Description Pointer (RSDP) in system memory. @@ -51,4 +57,16 @@ InstallAcpiTablesFromRsdp ( IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp ); +VOID +EnablePciDecoding ( + OUT ORIGINAL_ATTRIBUTES **OriginalAttributes, + OUT UINTN *Count + ); + +VOID +RestorePciDecoding ( + IN ORIGINAL_ATTRIBUTES *OriginalAttributes, + IN UINTN Count + ); + #endif -- cgit v1.2.3