diff mbox

[edk2,3/5] ArmVirtPkg/ArmVirtQemu: switch to generic PciHostBridgeDxe

Message ID 1471847752-26574-4-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel Aug. 22, 2016, 6:35 a.m. UTC
Wire up the FdtPciHostBridgeLib introduced in the previous patch
to the generic PciHostBridgeDxe implementation, and drop the special
ArmVirtPkg version. The former's dependency on gEfiCpuIo2ProtocolGuid
is satisfied by adding ArmPciCpuIo2Dxe.inf as well, and adding the PCD
gArmTokenSpaceGuid.PcdPciIoTranslation as a dynamic PCD.

In terms of functionality, the only effect this change should have is
that we will no longer use bounce buffers for DMA above 4 GB. Other
than that, no functional changes are intended.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtQemu.dsc                                   | 7 ++++++-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                         | 3 ++-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                             | 7 ++++++-
 ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 4 ++--
 4 files changed, 16 insertions(+), 5 deletions(-)

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ard Biesheuvel Aug. 23, 2016, 6:04 p.m. UTC | #1
On 22 August 2016 at 08:35, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> Wire up the FdtPciHostBridgeLib introduced in the previous patch

> to the generic PciHostBridgeDxe implementation, and drop the special

> ArmVirtPkg version. The former's dependency on gEfiCpuIo2ProtocolGuid

> is satisfied by adding ArmPciCpuIo2Dxe.inf as well, and adding the PCD

> gArmTokenSpaceGuid.PcdPciIoTranslation as a dynamic PCD.

>

> In terms of functionality, the only effect this change should have is

> that we will no longer use bounce buffers for DMA above 4 GB. Other

> than that, no functional changes are intended.

>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirtQemu.dsc                                   | 7 ++++++-

>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                         | 3 ++-

>  ArmVirtPkg/ArmVirtQemuKernel.dsc                             | 7 ++++++-

>  ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 4 ++--

>  4 files changed, 16 insertions(+), 5 deletions(-)

>

> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc

> index 1d459756f61b..ddc72e7044f7 100644

> --- a/ArmVirtPkg/ArmVirtQemu.dsc

> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

> @@ -69,6 +69,8 @@ [LibraryClasses.common]

>    QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf

>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

>    PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf

> +  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf

>

>  [LibraryClasses.common.UEFI_DRIVER]

>    UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf

> @@ -210,6 +212,8 @@ [PcdsDynamicDefault.common]

>    # PCD and PcdPciDisableBusEnumeration above have not been assigned yet

>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF

>

> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0

> +

>    #

>    # Set video resolution for boot options and for text setup.

>    # PlatformDxe can set the former at runtime.

> @@ -363,7 +367,8 @@ [Components.common]

>    #

>    # PCI support

>    #

> -  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {

>      <LibraryClasses>

>        NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

> diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

> index 01e650d9e333..c56188f347ec 100644

> --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

> +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

> @@ -151,7 +151,8 @@ [FV.FvMain]

>    #

>    # PCI support

>    #

> -  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf

>    INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf

>    INF OvmfPkg/Virtio10Dxe/Virtio10.inf

> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> index 99d2feba202b..305aa5bacb32 100644

> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> @@ -71,6 +71,8 @@ [LibraryClasses.common]

>    QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf

>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

>    PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf

> +  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf

>

>  [LibraryClasses.common.UEFI_DRIVER]

>    UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf

> @@ -203,6 +205,8 @@ [PcdsDynamicDefault.common]

>    # PCD and PcdPciDisableBusEnumeration above have not been assigned yet

>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF

>

> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0

> +

>    #

>    # Set video resolution for boot options and for text setup.

>    # PlatformDxe can set the former at runtime.

> @@ -349,7 +353,8 @@ [Components.common]

>    #

>    # PCI support

>    #

> -  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {

>      <LibraryClasses>

>        NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

> diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

> index 887ddb01f586..0aff149e8029 100644

> --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

> +++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

> @@ -304,8 +304,8 @@ PciHostBridgeGetRootBridges (

>    RootBridge->Io.Limit              = IoBase + IoSize - 1;

>    RootBridge->Mem.Base              = Mmio32Base;

>    RootBridge->Mem.Limit             = Mmio32Base + Mmio32Size - 1;

> -  RootBridge->MemAbove4G.Base       = 0x100000000ULL;

> -  RootBridge->MemAbove4G.Limit      = 0xFFFFFFFF;

> +  RootBridge->MemAbove4G.Base       = MAX_UINT64;

> +  RootBridge->MemAbove4G.Limit      = 0;

>


This hunk was intended as a fixup for the previous patch, but I
accidentally folded it here instead.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek Aug. 31, 2016, 12:24 p.m. UTC | #2
On 08/23/16 20:04, Ard Biesheuvel wrote:
> On 22 August 2016 at 08:35, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

>> Wire up the FdtPciHostBridgeLib introduced in the previous patch

>> to the generic PciHostBridgeDxe implementation, and drop the special

>> ArmVirtPkg version. The former's dependency on gEfiCpuIo2ProtocolGuid

>> is satisfied by adding ArmPciCpuIo2Dxe.inf as well, and adding the PCD

>> gArmTokenSpaceGuid.PcdPciIoTranslation as a dynamic PCD.

>>

>> In terms of functionality, the only effect this change should have is

>> that we will no longer use bounce buffers for DMA above 4 GB. Other

>> than that, no functional changes are intended.

>>

>> Contributed-under: TianoCore Contribution Agreement 1.0

>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

>> ---

>>  ArmVirtPkg/ArmVirtQemu.dsc                                   | 7 ++++++-

>>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                         | 3 ++-

>>  ArmVirtPkg/ArmVirtQemuKernel.dsc                             | 7 ++++++-

>>  ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 4 ++--

>>  4 files changed, 16 insertions(+), 5 deletions(-)

>>

>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc

>> index 1d459756f61b..ddc72e7044f7 100644

>> --- a/ArmVirtPkg/ArmVirtQemu.dsc

>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

>> @@ -69,6 +69,8 @@ [LibraryClasses.common]

>>    QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf

>>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

>>    PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

>> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf

>> +  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf

>>

>>  [LibraryClasses.common.UEFI_DRIVER]

>>    UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf

>> @@ -210,6 +212,8 @@ [PcdsDynamicDefault.common]

>>    # PCD and PcdPciDisableBusEnumeration above have not been assigned yet

>>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF

>>

>> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0

>> +

>>    #

>>    # Set video resolution for boot options and for text setup.

>>    # PlatformDxe can set the former at runtime.

>> @@ -363,7 +367,8 @@ [Components.common]

>>    #

>>    # PCI support

>>    #

>> -  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

>> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

>> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {

>>      <LibraryClasses>

>>        NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

>> diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

>> index 01e650d9e333..c56188f347ec 100644

>> --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

>> +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

>> @@ -151,7 +151,8 @@ [FV.FvMain]

>>    #

>>    # PCI support

>>    #

>> -  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

>> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

>> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf

>>    INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf

>>    INF OvmfPkg/Virtio10Dxe/Virtio10.inf

>> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> index 99d2feba202b..305aa5bacb32 100644

>> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> @@ -71,6 +71,8 @@ [LibraryClasses.common]

>>    QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf

>>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

>>    PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

>> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf

>> +  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf

>>

>>  [LibraryClasses.common.UEFI_DRIVER]

>>    UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf

>> @@ -203,6 +205,8 @@ [PcdsDynamicDefault.common]

>>    # PCD and PcdPciDisableBusEnumeration above have not been assigned yet

>>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF

>>

>> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0

>> +

>>    #

>>    # Set video resolution for boot options and for text setup.

>>    # PlatformDxe can set the former at runtime.

>> @@ -349,7 +353,8 @@ [Components.common]

>>    #

>>    # PCI support

>>    #

>> -  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

>> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf

>> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf

>>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {

>>      <LibraryClasses>

>>        NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf

>> diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

>> index 887ddb01f586..0aff149e8029 100644

>> --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

>> +++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c

>> @@ -304,8 +304,8 @@ PciHostBridgeGetRootBridges (

>>    RootBridge->Io.Limit              = IoBase + IoSize - 1;

>>    RootBridge->Mem.Base              = Mmio32Base;

>>    RootBridge->Mem.Limit             = Mmio32Base + Mmio32Size - 1;

>> -  RootBridge->MemAbove4G.Base       = 0x100000000ULL;

>> -  RootBridge->MemAbove4G.Limit      = 0xFFFFFFFF;

>> +  RootBridge->MemAbove4G.Base       = MAX_UINT64;

>> +  RootBridge->MemAbove4G.Limit      = 0;

>>

> 

> This hunk was intended as a fixup for the previous patch, but I

> accidentally folded it here instead.


With that fixed up, for this patch:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 1d459756f61b..ddc72e7044f7 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -69,6 +69,8 @@  [LibraryClasses.common]
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
@@ -210,6 +212,8 @@  [PcdsDynamicDefault.common]
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
+  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
+
   #
   # Set video resolution for boot options and for text setup.
   # PlatformDxe can set the former at runtime.
@@ -363,7 +367,8 @@  [Components.common]
   #
   # PCI support
   #
-  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
+  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
       NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index 01e650d9e333..c56188f347ec 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -151,7 +151,8 @@  [FV.FvMain]
   #
   # PCI support
   #
-  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
+  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
   INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
   INF OvmfPkg/Virtio10Dxe/Virtio10.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 99d2feba202b..305aa5bacb32 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -71,6 +71,8 @@  [LibraryClasses.common]
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
@@ -203,6 +205,8 @@  [PcdsDynamicDefault.common]
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
+  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
+
   #
   # Set video resolution for boot options and for text setup.
   # PlatformDxe can set the former at runtime.
@@ -349,7 +353,8 @@  [Components.common]
   #
   # PCI support
   #
-  ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
+  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
       NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
index 887ddb01f586..0aff149e8029 100644
--- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
+++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
@@ -304,8 +304,8 @@  PciHostBridgeGetRootBridges (
   RootBridge->Io.Limit              = IoBase + IoSize - 1;
   RootBridge->Mem.Base              = Mmio32Base;
   RootBridge->Mem.Limit             = Mmio32Base + Mmio32Size - 1;
-  RootBridge->MemAbove4G.Base       = 0x100000000ULL;
-  RootBridge->MemAbove4G.Limit      = 0xFFFFFFFF;
+  RootBridge->MemAbove4G.Base       = MAX_UINT64;
+  RootBridge->MemAbove4G.Limit      = 0;
 
   //
   // No separate ranges for prefetchable and non-prefetchable BARs