From patchwork Thu Mar 3 10:15:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 63454 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2857414lbc; Thu, 3 Mar 2016 02:16:36 -0800 (PST) X-Received: by 10.98.9.129 with SMTP id 1mr2425014pfj.163.1457000185655; Thu, 03 Mar 2016 02:16:25 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id z12si1833642pas.77.2016.03.03.02.16.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Mar 2016 02:16:25 -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 D17D71A1EE0; Thu, 3 Mar 2016 02:16:31 -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 7A0B41A1E9B for ; Thu, 3 Mar 2016 02:16:30 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id A3ABF19D243; Thu, 3 Mar 2016 10:16:20 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-60.phx2.redhat.com [10.3.113.60]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u23AFvY1027378; Thu, 3 Mar 2016 05:16:19 -0500 From: Laszlo Ersek To: edk2-devel@ml01.01.org Date: Thu, 3 Mar 2016 11:15:51 +0100 Message-Id: <1457000154-23081-13-git-send-email-lersek@redhat.com> In-Reply-To: <1457000154-23081-1-git-send-email-lersek@redhat.com> References: <1457000154-23081-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: Ruiyu Ni , Jordan Justen , Marcel Apfelbaum Subject: [edk2] [PATCH v2 12/15] OvmfPkg: PciHostBridgeLib: set RootBus->NoExtendedConfigSpace 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" In "OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c", the RootBridgeIoCheckParameter() function hard-codes the maximum offset for the PCI config space as 0xFF (see the MAX_PCI_REG_ADDRESS macro), which matches OVMF's 0xCF8 / 0xCFC config access method. The "MdeModulePkg/Bus/Pci/PciHostBridgeDxe" driver abstracts away config space access via the PciSegmentLib class, so it has to be informed separately about the config space size. Cc: Jordan Justen Cc: Ruiyu Ni Cc: Marcel Apfelbaum Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- Notes: v2: - adapt to ExtendedConfigurationSpace [Ray] - then adapt to NoExtendedConfigurationSpace [Ray] OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 2 ++ 1 file changed, 2 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.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index b23939d166c1..cc782c1cc3be 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -101,6 +101,8 @@ InitRootBridge ( RootBus->Mem.Limit = PcdGet64 (PcdPciMmio32Base) + (PcdGet64 (PcdPciMmio32Size) - 1); + RootBus->NoExtendedConfigSpace = TRUE; + return EFI_OUT_OF_RESOURCES; }