From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 BFE621A1E27 for ; Tue, 23 Aug 2016 22:30:22 -0700 (PDT) Received: by mail-it0-x236.google.com with SMTP id x131so189908318ite.0 for ; Tue, 23 Aug 2016 22:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7LWMbuoDLya7YM1jtDBvGWH8/sHX+H5TdJD9ov5ouCE=; b=fm3ORv1+gbqahB/cUTXWRfa2spR5YX+sUqxqD7VSlTe3UAVlESMc6pzmHskn3w/NRv sZrF6nbB7vbwn8bME9S1/PKsPhJzK2082E2zUwVGwRubABoqtFob3k38PQn4F+xL8QrE FpqKKUCMeDlAO0iFk8FpZRaSsMBFIGMUGU6VY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7LWMbuoDLya7YM1jtDBvGWH8/sHX+H5TdJD9ov5ouCE=; b=P0Yr7UC6l5Oufqjdd3Vw3ialLl+jm8tKl9eqvgiQwp8pG5z2lVi9spgExN5o3Qdm6h hPUQOT6BEsFzxrZgL5LB8SdN+8zDNUTEdoy1NbBPICTxqWEaVjG684q3B+0ODbfQSZuV oV8YHB0d0urqYsER8ExWZbz6DmmXZKdH3jPC00ZB4VwL6Rv0WtsoKZUkdocc+SSAbVtc MNKCo8nHcYOthqxhf3YPwxAoM19/h2FF4TYLhembFseCLkkFLZIzC1M6Q59PrSAyhKoq XrhqYRCdI5npQD7r12xZNc57QMpUoLCpjpixiOCYs3i7CNoCFuq77jQN3IgZU1YYc6JZ WfDw== X-Gm-Message-State: AE9vXwO11mIGvc0c/h3HzhRVu88pHsOeq0Hht3jyO2fkT5NgddrZMz9bqHSRjG9mSrMXQhE/P29i6VW7V+6Sxos0 X-Received: by 10.107.180.22 with SMTP id d22mr2401961iof.56.1472016622016; Tue, 23 Aug 2016 22:30:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 23 Aug 2016 22:30:21 -0700 (PDT) In-Reply-To: <679bfdec-9bec-18b9-ba2c-d27669f93fef@redhat.com> References: <1471847752-26574-1-git-send-email-ard.biesheuvel@linaro.org> <1471847752-26574-2-git-send-email-ard.biesheuvel@linaro.org> <679bfdec-9bec-18b9-ba2c-d27669f93fef@redhat.com> From: Ard Biesheuvel Date: Wed, 24 Aug 2016 07:30:21 +0200 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" Subject: Re: [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: , X-List-Received-Date: Wed, 24 Aug 2016 05:30:23 -0000 Content-Type: text/plain; charset=UTF-8 On 23 August 2016 at 23:23, Laszlo Ersek wrote: > On 08/22/16 02:35, Ard Biesheuvel wrote: >> 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(-) >> >> 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, >> > > I suggest to note in the commit message that this patch effectively > undoes commit 8b816c624dd407e1590d7c399c69ab307af3ef33. Can be done > without a resend, if you agree. > Yes, that makes sense. > Reviewed-by: Laszlo Ersek 0 > Thanks