public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, lersek@redhat.com
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 0/3] ArmPkg ArmVirtPkg: prevent 64-bit MMIO BAR degradation
Date: Mon, 12 Sep 2016 11:01:16 +0100	[thread overview]
Message-ID: <1473674479-20207-1-git-send-email-ard.biesheuvel@linaro.org> (raw)

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



             reply	other threads:[~2016-09-12 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 10:01 Ard Biesheuvel [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473674479-20207-1-git-send-email-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox