From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: citrix.com, ip: , mailfrom: prvs=011b478a6=igor.druzhinin@citrix.com) Received: from SMTP03.CITRIX.COM (SMTP03.CITRIX.COM []) by groups.io with SMTP; Thu, 25 Apr 2019 13:24:27 -0700 X-IronPort-AV: E=Sophos;i="5.60,394,1549929600"; d="scan'208";a="84450975" From: Igor Druzhinin To: CC: , , , , , , Igor Druzhinin Subject: [PATCH v3 2/3] OvmfPkg/XenSupport: use a correct PCI host bridge aperture for BAR64 Date: Thu, 25 Apr 2019 21:23:57 +0100 Message-ID: <1556223838-5176-3-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556223838-5176-1-git-send-email-igor.druzhinin@citrix.com> References: <1556223838-5176-1-git-send-email-igor.druzhinin@citrix.com> Return-Path: igor.druzhinin@citrix.com MIME-Version: 1.0 Content-Type: text/plain In case BAR64 is placed below 4G choose the correct aperture. This fixes a failed assertion down the code path. Acked-by: Anthony PERARD Signed-off-by: Igor Druzhinin --- OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c index 354b0a5..76fca53 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c @@ -137,7 +137,11 @@ PcatPciRootBridgeParseBars ( Length = Length | LShiftU64 ((UINT64) UpperValue, 32); Length = (~Length) + 1; - MemAperture = MemAbove4G; + if (Base < BASE_4GB) { + MemAperture = Mem; + } else { + MemAperture = MemAbove4G; + } } Limit = Base + Length - 1; -- 2.7.4