From patchwork Mon Aug 22 06:35:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 74387 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1407599qga; Sun, 21 Aug 2016 23:36:01 -0700 (PDT) X-Received: by 10.98.74.91 with SMTP id x88mr39655232pfa.79.1471847761002; Sun, 21 Aug 2016 23:36:01 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id q11si21175656pfd.42.2016.08.21.23.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Aug 2016 23:36:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7517D1A1E0B; Sun, 21 Aug 2016 23:35:59 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 41E8B1A1DF8 for ; Sun, 21 Aug 2016 23:35:58 -0700 (PDT) Received: by mail-wm0-x22d.google.com with SMTP id q128so106403984wma.1 for ; Sun, 21 Aug 2016 23:35:58 -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=NPPqhLik9dUE2osoeI1YRe94RKo1YJO3wex9zoP3WC4=; b=OJtt2xy6WLjRRsePblO8cURINiPXeiekfAaZ35Ph/eFde/vY3N6IkcrZoxRkGaEJUA jHChRfnCoWPL/6K2IpDge4WlDD67x1PncxnOP1yR9oCHFScic61avz8PxzcamRyAZ+v3 Grh+QzsNi/cyxCQ1N2tOMEixhO6RbwFX15YS8= 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=NPPqhLik9dUE2osoeI1YRe94RKo1YJO3wex9zoP3WC4=; b=XFqEY9BVTfYOLjg7byL36XOe5kdMLCJ86mDNNB11VttCrwLvoyXs5v98qYkp9bnFjp EXgbhBJvH19MbjS75PNQffQ8u+XGS2kBcC6CTqyfT3kFYnVz6XOEu5G8ZAgzGfRaB4qw HnLuuhEuuU9G01NaKcfbkT6njTIvMiBXepSXbYLMIyp9p8hWeSgYqebHSoAK2NTP8p5W 35qcZDG1U8yOnugcDTrGL80wkFA/ieE7NZxU1uo6NUGHbqyUVxpg8rvF+bfV6HbcwzyR YpX65UD6uKgQ1G9CH2dL7GcKUTTH8YlfGnlZLvFYoKDiHJ9Azj0Cwjgbr6PdcI+3dz/O Ge1A== X-Gm-Message-State: AEkoousPrngVhCqZPy39mQ7u1CH9SZiOJGVJvZ8S8yxL//TdSn8BTYGnE7RhUDi4vnXo7hP4 X-Received: by 10.194.107.130 with SMTP id hc2mr15579439wjb.7.1471847756583; Sun, 21 Aug 2016 23:35:56 -0700 (PDT) Received: from localhost.localdomain (2.178.14.62.static.jazztel.es. [62.14.178.2]) by smtp.gmail.com with ESMTPSA id ex14sm21947778wjc.30.2016.08.21.23.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Aug 2016 23:35:55 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Mon, 22 Aug 2016 08:35:48 +0200 Message-Id: <1471847752-26574-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471847752-26574-1-git-send-email-ard.biesheuvel@linaro.org> References: <1471847752-26574-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 1/5] 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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c | 38 -------------------- 1 file changed, 38 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek 0 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,