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, lersek@redhat.com
Cc: leif.lindholm@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v2 1/6] ArmVirtPkg/PciHostBridgeDxe: don't set linux, pci-probe-only DT property
Date: Wed, 31 Aug 2016 18:59:34 +0100	[thread overview]
Message-ID: <1472666379-25426-2-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1472666379-25426-1-git-send-email-ard.biesheuvel@linaro.org>

Setting the linux,pci-probe-only was intended to align OSes booting via
DT with OSes booting via ACPI in the way they honor the PCI configuration
performed by the firmware. However, ACPI on arm64 does not currently honor
the firmware's PCI configuration, and the linux,pci-probe-only completely
prevents any PCI reconfiguration from occurring under the OS, including
what is needed to support PCI hotplug.

Since the primary use case was OS access to the GOP framebuffer (which
breaks when the framebuffer BAR is moved when the OS reconfigures the
PCI), we can undo this change now that ArmVirtQemu has moved to a GOP
implementation that does not expose a raw framebuffer in the first place.

This effectively reverts commit 8b816c624dd4 ("ArmVirtPkg/VirtFdtDxe: set
/chosen/linux,pci-probe-only to 1 in DTB")

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=65
---
 ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c | 38 --------------------
 1 file changed, 38 deletions(-)

diff --git a/ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c b/ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c
index 5063782bb392..669c90355889 100644
--- a/ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c
+++ b/ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c
@@ -79,42 +79,6 @@ PCI_HOST_BRIDGE_INSTANCE mPciHostBridgeInstanceTemplate = {
 // Implementation
 //
 
-STATIC
-VOID
-SetLinuxPciProbeOnlyProperty (
-  IN FDT_CLIENT_PROTOCOL         *FdtClient
-  )
-{
-  INT32         Node;
-  UINT32        Tmp;
-  EFI_STATUS    Status;
-
-  if (!FeaturePcdGet (PcdPureAcpiBoot)) {
-    //
-    // Set the /chosen/linux,pci-probe-only property to 1, so that the PCI
-    // setup we will perform in the firmware is honored by the Linux OS,
-    // rather than torn down and done from scratch. This is generally a more
-    // sensible approach, and aligns with what ACPI based OSes do typically.
-    //
-    // In case we are exposing an emulated VGA PCI device to the guest, which
-    // may subsequently get exposed via the Graphics Output protocol and
-    // driven as an efifb by Linux, we need this setting to prevent the
-    // framebuffer from becoming unresponsive.
-    //
-    Status = FdtClient->GetOrInsertChosenNode (FdtClient, &Node);
-
-    if (!EFI_ERROR (Status)) {
-      Tmp = SwapBytes32 (1);
-      Status = FdtClient->SetNodeProperty (FdtClient, Node,
-                            "linux,pci-probe-only", &Tmp, sizeof (Tmp));
-    }
-    if (EFI_ERROR (Status)) {
-      DEBUG ((EFI_D_WARN,
-        "Failed to set /chosen/linux,pci-probe-only property\n"));
-    }
-  }
-}
-
 //
 // We expect the "ranges" property of "pci-host-ecam-generic" to consist of
 // records like this.
@@ -293,8 +257,6 @@ ProcessPciHost (
   //
   ASSERT (PcdGet64 (PcdPciExpressBaseAddress) == ConfigBase);
 
-  SetLinuxPciProbeOnlyProperty (FdtClient);
-
   DEBUG ((EFI_D_INFO, "%a: Config[0x%Lx+0x%Lx) Bus[0x%x..0x%x] "
     "Io[0x%Lx+0x%Lx)@0x%Lx Mem[0x%Lx+0x%Lx)@0x%Lx\n", __FUNCTION__, ConfigBase,
     ConfigSize, *BusMin, *BusMax, *IoBase, *IoSize, *IoTranslation, *MmioBase,
-- 
2.7.4



  reply	other threads:[~2016-08-31 17:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 17:59 [PATCH v2 0/6] ArmVirtQemu: move to generic PciHostBridgeDxe Ard Biesheuvel
2016-08-31 17:59 ` Ard Biesheuvel [this message]
2016-08-31 17:59 ` [PATCH v2 2/6] ArmVirtPkg/FdtPciPcdProducerLib: add handling of PcdPciIoTranslation Ard Biesheuvel
2016-09-02 11:19   ` Laszlo Ersek
2016-08-31 17:59 ` [PATCH v2 3/6] ArmVirtPkg: implement FdtPciHostBridgeLib Ard Biesheuvel
2016-09-02 10:15   ` Laszlo Ersek
2016-08-31 17:59 ` [PATCH v2 4/6] ArmVirtPkg/ArmVirtQemu: switch to generic PciHostBridgeDxe Ard Biesheuvel
2016-08-31 17:59 ` [PATCH v2 5/6] ArmVirtPkg/FdtPciHostBridgeLib: add MMIO64 support Ard Biesheuvel
2016-09-02 10:44   ` Laszlo Ersek
2016-08-31 17:59 ` [PATCH v2 6/6] ArmVirtPkg: remove now unused PciHostBridgeDxe Ard Biesheuvel
2016-09-02 13:09 ` [PATCH v2 0/6] ArmVirtQemu: move to generic PciHostBridgeDxe Laszlo Ersek
2016-09-02 13:17   ` Laszlo Ersek
2016-09-02 14:58   ` Ard Biesheuvel
2016-09-02 15:27     ` Laszlo Ersek
2016-09-02 16:13       ` Laszlo Ersek
2016-09-02 16:26         ` Ard Biesheuvel
2016-09-02 17:21           ` Laszlo Ersek

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=1472666379-25426-2-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