summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorCorvin Köhne <corvink@freebsd.org>2023-06-21 09:31:13 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-23 17:26:37 +0000
commitea88df6b26e93bfe12cea6804631d84e871be77c (patch)
treeadc570473574a81a4486e754e80e7a57eee6f136 /OvmfPkg/Include
parentf5d851673d4d646c129dca4018258f184ab70cbc (diff)
downloadedk2-ea88df6b26e93bfe12cea6804631d84e871be77c.tar.gz
edk2-ea88df6b26e93bfe12cea6804631d84e871be77c.tar.bz2
edk2-ea88df6b26e93bfe12cea6804631d84e871be77c.zip
OvmfPkg: move PciEncoding into AcpiPlatformLib
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 <corvink@FreeBSD.org> Acked-by: Peter Grehan <grehan@freebsd.org>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Library/AcpiPlatformLib.h18
1 files changed, 18 insertions, 0 deletions
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 <Protocol/AcpiTable.h>
+#include <Protocol/PciIo.h>
+
+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