]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/XenSupport: use a correct PCI host bridge aperture for BAR64
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 25 Apr 2019 20:23:57 +0000 (21:23 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 30 Apr 2019 16:41:57 +0000 (18:41 +0200)
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>
OvmfPkg/Library/PciHostBridgeLib/XenSupport.c

index 354b0a5e275fbeea84445435b2830c38264300a1..76fca533c11a9623e98f9b4dc1feac534a57d700 100644 (file)
@@ -137,7 +137,11 @@ PcatPciRootBridgeParseBars (
           Length = Length | LShiftU64 ((UINT64) UpperValue, 32);\r
           Length = (~Length) + 1;\r
 \r
-          MemAperture = MemAbove4G;\r
+          if (Base < BASE_4GB) {\r
+            MemAperture = Mem;\r
+          } else {\r
+            MemAperture = MemAbove4G;\r
+          }\r
         }\r
 \r
         Limit = Base + Length - 1;\r