diff options
author | Corvin Köhne <corvink@freebsd.org> | 2023-06-21 09:31:13 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-06-23 17:26:37 +0000 |
commit | ea88df6b26e93bfe12cea6804631d84e871be77c (patch) | |
tree | adc570473574a81a4486e754e80e7a57eee6f136 /OvmfPkg/Include | |
parent | f5d851673d4d646c129dca4018258f184ab70cbc (diff) | |
download | edk2-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.h | 18 |
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
|