public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/3] ArmPkg ArmVirtPkg: prevent 64-bit MMIO BAR degradation
@ 2016-09-12 10:01 Ard Biesheuvel
  2016-09-12 10:01 ` [PATCH 1/3] ArmPkg: add driver to force 64-bit MMIO BARs to be allocated above 4 GB Ard Biesheuvel
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Ard Biesheuvel @ 2016-09-12 10:01 UTC (permalink / raw)
  To: edk2-devel, leif.lindholm, lersek; +Cc: Ard Biesheuvel

On ARM/Linux systems, the PCI layer is usually reconfigured from scratch,
given the embedded legacy of ARM systems. However, when booting arm64/Linux
in ACPI mode, such reconfiguration can be avoided, since ACPI implies UEFI
implies firmware (as opposed to DT mode, which could be booted via QEMU's
~10 instruction bootloader)

In this case, it is important for the firmware to leave the PCI configuration
in a reasonable state, and one of the things that UEFI does by default, and
which makes no sense at all on an arm64 system, is to degrade 64-bit MMIO BARs
to 32-bit in the presence of a ROM BAR on the same device. (It does makes sense
on an Intel system running legacy option ROMs under a CSM)

Fortunately, we have a way of influencing this policy without having to hack
the generic PCI bus driver: we can install the IncompatiblePciDeviceSupport
protocol, and the PCI bus driver will invoke it for each PCI device it
configures.

Our implementation for ArmPkg is simply the OVMF version with the bits ripped
out that care about CSMs and legacy BIOSes

Ard Biesheuvel (3):
  ArmPkg: add driver to force 64-bit MMIO BARs to be allocated above 4
    GB
  ArmVirtPkg/FdtPciPcdProducerLib: add discovery of PcdPciMmio64Size
  ArmVirtPkg/ArmVirtQemu: add IncompatiblePciDeviceSupportDxe

 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c   | 223 ++++++++++++++++++++
 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf |  49 +++++
 ArmVirtPkg/ArmVirtQemu.dsc                                                      |   5 +
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                                            |   1 +
 ArmVirtPkg/ArmVirtQemuKernel.dsc                                                |   5 +
 ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c                  |  31 +--
 ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf                |   1 +
 7 files changed, 302 insertions(+), 13 deletions(-)
 create mode 100644 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
 create mode 100644 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf

-- 
2.7.4



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-26 12:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 10:01 [PATCH 0/3] ArmPkg ArmVirtPkg: prevent 64-bit MMIO BAR degradation Ard Biesheuvel
2016-09-12 10:01 ` [PATCH 1/3] ArmPkg: add driver to force 64-bit MMIO BARs to be allocated above 4 GB Ard Biesheuvel
2016-09-12 10:23   ` Leif Lindholm
2016-09-12 12:29     ` Laszlo Ersek
2016-09-12 13:06       ` Ard Biesheuvel
2016-09-12 10:01 ` [PATCH 2/3] ArmVirtPkg/FdtPciPcdProducerLib: add discovery of PcdPciMmio64Size Ard Biesheuvel
2016-09-12 10:01 ` [PATCH 3/3] ArmVirtPkg/ArmVirtQemu: add IncompatiblePciDeviceSupportDxe Ard Biesheuvel
2016-09-12 11:57 ` [PATCH 0/3] ArmPkg ArmVirtPkg: prevent 64-bit MMIO BAR degradation Laszlo Ersek
2016-09-26 12:54   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox