From patchwork Thu Mar 10 21:05:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 63748 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp675532lbc; Thu, 10 Mar 2016 13:05:51 -0800 (PST) X-Received: by 10.98.40.200 with SMTP id o191mr8074877pfo.83.1457643930871; Thu, 10 Mar 2016 13:05:30 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id w13si8333812pas.206.2016.03.10.13.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Mar 2016 13:05:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A0FEC1A1F65; Thu, 10 Mar 2016 13:05:44 -0800 (PST) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1CF981A1F59 for ; Thu, 10 Mar 2016 13:05:44 -0800 (PST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id A3FB56541A; Thu, 10 Mar 2016 21:05:28 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-82.phx2.redhat.com [10.3.113.82]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2AL5K4v003627; Thu, 10 Mar 2016 16:05:27 -0500 From: Laszlo Ersek To: edk2-devel@ml01.01.org Date: Thu, 10 Mar 2016 22:05:17 +0100 Message-Id: <1457643917-24710-4-git-send-email-lersek@redhat.com> In-Reply-To: <1457643917-24710-1-git-send-email-lersek@redhat.com> References: <1457643917-24710-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 10 Mar 2016 21:05:28 +0000 (UTC) Cc: Marcel Apfelbaum , Jordan Justen Subject: [edk2] [PATCH 3/3] OvmfPkg: PciHostBridgeLib: install 64-bit PCI host aperture X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" On the normal boot path (which is when PciHostBridgeDxe runs), the PCDs have been calculated; report the 64-bit PCI host aperture to PciHostBridgeDxe. In the Ia32 build, the PCD values (zeros) come directly from the DEC file, and this patch makes no difference. Cc: Gerd Hoffmann Cc: Jordan Justen Cc: Marcel Apfelbaum Cc: Thomas Lamprecht Ref: https://github.com/tianocore/edk2/issues/59 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 2 ++ OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 7 +++++++ 2 files changed, 9 insertions(+) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf index bbec74645c83..7a964c74c6cc 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf @@ -51,4 +51,6 @@ [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size + gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base + gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 3e02778492a8..1d3d10ad7379 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -132,6 +132,13 @@ InitRootBridge ( RootBus->MemAbove4G.Base = 0; RootBus->MemAbove4G.Limit = 0; + if (PcdGet64 (PcdPciMmio64Size) > 0) { + RootBus->AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE; + RootBus->MemAbove4G.Base = PcdGet64 (PcdPciMmio64Base); + RootBus->MemAbove4G.Limit = PcdGet64 (PcdPciMmio64Base) + + (PcdGet64 (PcdPciMmio64Size) - 1); + } + RootBus->Bus.Base = RootBusNumber; RootBus->Bus.Limit = MaxSubBusNumber; RootBus->Io.Base = PcdGet64 (PcdPciIoBase);