]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/PciHostBridgeDxe: don't set linux,pci-probe-only DT property
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 21 Aug 2016 15:33:36 +0000 (17:33 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 2 Sep 2016 20:41:01 +0000 (21:41 +0100)
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

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