summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-03-13 15:34:07 +0100
committerLaszlo Ersek <lersek@redhat.com>2016-03-23 17:39:35 +0100
commit8f35eb92c419f8a02dcaaac41073d88739a86562 (patch)
tree5b5465e854e13ebdfe16ae4f336d0dbc3245eebd /OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
parentb6bc800d5ad6f15588a1f5e44f7aa67499399787 (diff)
downloadedk2-8f35eb92c419f8a02dcaaac41073d88739a86562.tar.gz
edk2-8f35eb92c419f8a02dcaaac41073d88739a86562.tar.bz2
edk2-8f35eb92c419f8a02dcaaac41073d88739a86562.zip
OvmfPkg: AcpiPlatformDxe: enable PCI IO and MMIO while fetching QEMU tables
Now that the previous patches ensure that we can access all PCI devices in AcpiPlatformDxe, we can enable IO and MMIO decoding for all of them while we contact QEMU for the ACPI tables. See more details in the patch titled: OvmfPkg: introduce gRootBridgesConnectedEventGroupGuid In particular, this patch will prevent the bug when the 64-bit MMIO aperture is completely missing from QEMU's _CRS, and consequently Linux rejects 64-bit BARs with the error message pci 0000:00:03.0: can't claim BAR 4 [mem 0x800000000-0x8007fffff 64bit pref]: no compatible bridge window Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
index 55b380b285..08dd7f8f7d 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
@@ -19,6 +19,7 @@
#include <Protocol/AcpiTable.h>
#include <Protocol/FirmwareVolume2.h>
+#include <Protocol/PciIo.h>
#include <Library/BaseLib.h>
#include <Library/UefiBootServicesTableLib.h>
@@ -27,6 +28,11 @@
#include <IndustryStandard/Acpi.h>
+typedef struct {
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ UINT64 PciAttributes;
+} ORIGINAL_ATTRIBUTES;
+
EFI_STATUS
EFIAPI
InstallAcpiTable (
@@ -73,5 +79,17 @@ InstallAcpiTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
);
+VOID
+EnablePciDecoding (
+ OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
+ OUT UINTN *Count
+ );
+
+VOID
+RestorePciDecoding (
+ IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
+ IN UINTN Count
+ );
+
#endif