From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=162.221.156.55; helo=smtp03.citrix.com; envelope-from=prvs=95947cb43=igor.druzhinin@citrix.com; receiver=edk2-devel@lists.01.org Received: from SMTP03.CITRIX.COM (smtp03.citrix.com [162.221.156.55]) (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 8822321A07095 for ; Mon, 4 Mar 2019 07:04:20 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.58,440,1544486400"; d="scan'208";a="79599624" From: Igor Druzhinin To: CC: , , , , , Igor Druzhinin Date: Mon, 4 Mar 2019 15:04:06 +0000 Message-ID: <1551711848-22470-2-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551711848-22470-1-git-send-email-igor.druzhinin@citrix.com> References: <1551711848-22470-1-git-send-email-igor.druzhinin@citrix.com> MIME-Version: 1.0 Subject: [PATCH 1/3] OvmfPkg/XenSupport: remove usage of prefetchable PCI host bridge aperture X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 X-List-Received-Date: Mon, 04 Mar 2019 15:04:20 -0000 Content-Type: text/plain This aperture doesn't exist in OVMF and trying to use it causes failing assertions later in cases there are prefetchable and non-prefetchable BARs following each other. This configuration is quite likely with some PCI passthrough devices. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Igor Druzhinin --- OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c index 9204179..c23c46d 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c @@ -129,11 +129,7 @@ PcatPciRootBridgeParseBars ( // Length = ((~Length) + 1) & 0xffffffff; - if ((Value & BIT3) == BIT3) { - MemAperture = PMem; - } else { - MemAperture = Mem; - } + MemAperture = Mem; } else { // // 64bit @@ -149,11 +145,7 @@ PcatPciRootBridgeParseBars ( Length = Length | LShiftU64 ((UINT64) UpperValue, 32); Length = (~Length) + 1; - if ((Value & BIT3) == BIT3) { - MemAperture = PMemAbove4G; - } else { - MemAperture = MemAbove4G; - } + MemAperture = MemAbove4G; } Limit = Base + Length - 1; -- 2.7.4