From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 554321A1E08 for ; Fri, 2 Sep 2016 11:16:08 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id w2so41349865wmd.0 for ; Fri, 02 Sep 2016 11:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9LK+0RCT8Oab4RKZfvYiPBAQ1uGG14Xf+9elQxWpg40=; b=DIYzWk/WczG0dayPjqXOr+jlqEzEwaTZ2QtXGI5sfy3pcNEvt+zrc4l6TWof2Rxsjt ZaGL7MfpzuF5fZ4VJBxRIdbBnIJgCURFGLvHsXZjYI3mnHoCOhOLKkfUoxEtFUdgwGwL bwcpoUjGyrcBs1vel/CNhzczF+6q1l8FPMWzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9LK+0RCT8Oab4RKZfvYiPBAQ1uGG14Xf+9elQxWpg40=; b=L0lLkDcnXbvCq3XtYzw3tANz83wttKZ0j7x3p39Y5JF9NeDfraLvfm9jsb4sIY+9+K BH6X7Et8DBG/NhX7YyEyDvD/tvL8487hM5m5wX+6iVOS1IDJo5eTUKAuAhPtSTTN4uGh ZiB7V8NOcsOZwvgIewGGKYcSEzlfWuf6fnYFe6oUU5Ucbh/x2iT+rMnFnJ60VZ58N5aM aErDg+zw2fPKjG1xAqiDWTgP0cjc7kM2N8g40uHe3ObC+NC1o5/QdPW9hVL4aGIu/nqd fIDVJZ8cVlnPHbGg29DsBx9gVRIkbU08WLW4oDiYbOVCoLG7j8+OCT30Uh0zixsYAGxA fy9g== X-Gm-Message-State: AE9vXwPK0Vkh/iocftERysSFvNpnChWDM5xvZiBw5jVRj3FELYsYi7fz6mxClPsuAlbVfCiG X-Received: by 10.28.128.207 with SMTP id b198mr4373492wmd.56.1472840166652; Fri, 02 Sep 2016 11:16:06 -0700 (PDT) Received: from localhost.localdomain ([160.165.63.90]) by smtp.gmail.com with ESMTPSA id id1sm11559152wjb.21.2016.09.02.11.16.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Sep 2016 11:16:05 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: lersek@redhat.com, Ard Biesheuvel Date: Fri, 2 Sep 2016 19:15:54 +0100 Message-Id: <1472840159-28957-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472840159-28957-1-git-send-email-ard.biesheuvel@linaro.org> References: <1472840159-28957-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v3 1/6] ArmVirtPkg/PciHostBridgeDxe: don't set linux, pci-probe-only DT property X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 18:16:08 -0000 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 Reviewed-by: Laszlo Ersek 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