summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library/PciHostBridgeLib
diff options
context:
space:
mode:
authorIgor Druzhinin <igor.druzhinin@citrix.com>2019-04-25 21:23:57 +0100
committerLaszlo Ersek <lersek@redhat.com>2019-04-30 18:41:57 +0200
commitd63610df60f784676090deba63aeca8c9dc631d1 (patch)
tree07a19401b7ec81f617a87b2786f14c21b1fc9b29 /OvmfPkg/Library/PciHostBridgeLib
parent27e4d6ae25a08a6e9d78b27ce201800d3d072401 (diff)
downloadedk2-d63610df60f784676090deba63aeca8c9dc631d1.zip
edk2-d63610df60f784676090deba63aeca8c9dc631d1.tar.gz
edk2-d63610df60f784676090deba63aeca8c9dc631d1.tar.bz2
OvmfPkg/XenSupport: use a correct PCI host bridge aperture for BAR64
In case BAR64 is placed below 4G choose the correct aperture. This fixes a failed assertion down the code path. Acked-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Diffstat (limited to 'OvmfPkg/Library/PciHostBridgeLib')
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/XenSupport.c6
1 files changed, 5 insertions, 1 deletions
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;