diff mbox series

[Linaro-uefi,v3,3/4] Platforms/Juno: switch to generic PCI host bridge driver

Message ID 20170404123123.11928-4-ard.biesheuvel@linaro.org
State Accepted
Commit 05f2a5f1e9e93bf6dae210c68cb39363f4f3e4d1
Headers show
Series Juno cleanup -- OpenPlatformPkg edition | expand

Commit Message

Ard Biesheuvel April 4, 2017, 12:31 p.m. UTC
Now that we have the prerequisites in place, switch to the generic PCI
host bridge driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/ARM/Juno/ArmJuno.dsc | 17 +++++++++++------
 Platforms/ARM/Juno/ArmJuno.fdf |  4 ++--
 2 files changed, 13 insertions(+), 8 deletions(-)

Comments

Leif Lindholm April 5, 2017, 1:36 p.m. UTC | #1
On Tue, Apr 04, 2017 at 01:31:22PM +0100, Ard Biesheuvel wrote:
> Now that we have the prerequisites in place, switch to the generic PCI
> host bridge driver.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  Platforms/ARM/Juno/ArmJuno.dsc | 17 +++++++++++------
>  Platforms/ARM/Juno/ArmJuno.fdf |  4 ++--
>  2 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
> index 4d5d207f0c3a..a9524be86dbc 100644
> --- a/Platforms/ARM/Juno/ArmJuno.dsc
> +++ b/Platforms/ARM/Juno/ArmJuno.dsc
> @@ -66,6 +66,10 @@
>  [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>    NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
> +  PciHostBridgeLib|OpenPlatformPkg/Platforms/ARM/Juno/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf
> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
> +  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
> +  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
>  
>  [BuildOptions]
>    *_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmJunoPkg/Include
> @@ -143,13 +147,17 @@
>    # PLDA PCI Root Complex
>    #
>    gArmTokenSpaceGuid.PcdPciBusMax|255
> -  gArmTokenSpaceGuid.PcdPciIoBase|0x5f800000

Is this effectively a bugfix ...

> +  gArmTokenSpaceGuid.PcdPciIoBase|0x0
>    gArmTokenSpaceGuid.PcdPciIoSize|0x00800000
>    gArmTokenSpaceGuid.PcdPciMmio32Base|0x50000000
>    gArmTokenSpaceGuid.PcdPciMmio32Size|0x08000000
>    gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
>    gArmTokenSpaceGuid.PcdPciMmio64Size|0x100000000
>  
> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x40000000
> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x5f800000

... but not point in fixing before the switch?

(If so, fine.
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>)

> +  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24
> +
>    # List of Device Paths that support BootMonFs
>    gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
>  
> @@ -270,16 +278,13 @@
>    MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>  
>    # Required by PCI
> -  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>  
>    #
>    # PCI Support
>    #
>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> -  ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> -    <LibraryClasses>
> -      DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
> -  }
> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>  
>    #
>    # SATA Controller
> diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
> index a16c897f4656..53a3bd2420ce 100644
> --- a/Platforms/ARM/Juno/ArmJuno.fdf
> +++ b/Platforms/ARM/Juno/ArmJuno.fdf
> @@ -140,7 +140,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>    INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>  
>    # Required by PCI
> -  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>  
>    # FV FileSystem
>    INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
> @@ -161,7 +161,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>    # PCI Support
>    #
>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> -  INF ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>  
>    #
>    # SATA Controller
> -- 
> 2.9.3
>
Ard Biesheuvel April 5, 2017, 1:37 p.m. UTC | #2
On 5 April 2017 at 14:36, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Tue, Apr 04, 2017 at 01:31:22PM +0100, Ard Biesheuvel wrote:
>> Now that we have the prerequisites in place, switch to the generic PCI
>> host bridge driver.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  Platforms/ARM/Juno/ArmJuno.dsc | 17 +++++++++++------
>>  Platforms/ARM/Juno/ArmJuno.fdf |  4 ++--
>>  2 files changed, 13 insertions(+), 8 deletions(-)
>>
>> diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
>> index 4d5d207f0c3a..a9524be86dbc 100644
>> --- a/Platforms/ARM/Juno/ArmJuno.dsc
>> +++ b/Platforms/ARM/Juno/ArmJuno.dsc
>> @@ -66,6 +66,10 @@
>>  [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
>>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>>    NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
>> +  PciHostBridgeLib|OpenPlatformPkg/Platforms/ARM/Juno/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf
>> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
>> +  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
>> +  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
>>
>>  [BuildOptions]
>>    *_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmJunoPkg/Include
>> @@ -143,13 +147,17 @@
>>    # PLDA PCI Root Complex
>>    #
>>    gArmTokenSpaceGuid.PcdPciBusMax|255
>> -  gArmTokenSpaceGuid.PcdPciIoBase|0x5f800000
>
> Is this effectively a bugfix ...
>
>> +  gArmTokenSpaceGuid.PcdPciIoBase|0x0
>>    gArmTokenSpaceGuid.PcdPciIoSize|0x00800000
>>    gArmTokenSpaceGuid.PcdPciMmio32Base|0x50000000
>>    gArmTokenSpaceGuid.PcdPciMmio32Size|0x08000000
>>    gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
>>    gArmTokenSpaceGuid.PcdPciMmio64Size|0x100000000
>>
>> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x40000000
>> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x5f800000
>
> ... but not point in fixing before the switch?
>

Not quite. The Juno host bridge driver interprets PcdPciIoBase as the
start of the I/O region in memory.

> (If so, fine.
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>)
>
>> +  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24
>> +
>>    # List of Device Paths that support BootMonFs
>>    gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
>>
>> @@ -270,16 +278,13 @@
>>    MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>>
>>    # Required by PCI
>> -  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>>
>>    #
>>    # PCI Support
>>    #
>>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
>> -  ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
>> -    <LibraryClasses>
>> -      DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
>> -  }
>> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>>
>>    #
>>    # SATA Controller
>> diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
>> index a16c897f4656..53a3bd2420ce 100644
>> --- a/Platforms/ARM/Juno/ArmJuno.fdf
>> +++ b/Platforms/ARM/Juno/ArmJuno.fdf
>> @@ -140,7 +140,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>>    INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>>
>>    # Required by PCI
>> -  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>>
>>    # FV FileSystem
>>    INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
>> @@ -161,7 +161,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>>    # PCI Support
>>    #
>>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
>> -  INF ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>>
>>    #
>>    # SATA Controller
>> --
>> 2.9.3
>>
Leif Lindholm April 5, 2017, 1:39 p.m. UTC | #3
On Wed, Apr 05, 2017 at 02:37:06PM +0100, Ard Biesheuvel wrote:
> On 5 April 2017 at 14:36, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > On Tue, Apr 04, 2017 at 01:31:22PM +0100, Ard Biesheuvel wrote:
> >> Now that we have the prerequisites in place, switch to the generic PCI
> >> host bridge driver.
> >>
> >> Contributed-under: TianoCore Contribution Agreement 1.0
> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >> ---
> >>  Platforms/ARM/Juno/ArmJuno.dsc | 17 +++++++++++------
> >>  Platforms/ARM/Juno/ArmJuno.fdf |  4 ++--
> >>  2 files changed, 13 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
> >> index 4d5d207f0c3a..a9524be86dbc 100644
> >> --- a/Platforms/ARM/Juno/ArmJuno.dsc
> >> +++ b/Platforms/ARM/Juno/ArmJuno.dsc
> >> @@ -66,6 +66,10 @@
> >>  [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
> >>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> >>    NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
> >> +  PciHostBridgeLib|OpenPlatformPkg/Platforms/ARM/Juno/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf
> >> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
> >> +  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
> >> +  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> >>
> >>  [BuildOptions]
> >>    *_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmJunoPkg/Include
> >> @@ -143,13 +147,17 @@
> >>    # PLDA PCI Root Complex
> >>    #
> >>    gArmTokenSpaceGuid.PcdPciBusMax|255
> >> -  gArmTokenSpaceGuid.PcdPciIoBase|0x5f800000
> >
> > Is this effectively a bugfix ...
> >
> >> +  gArmTokenSpaceGuid.PcdPciIoBase|0x0
> >>    gArmTokenSpaceGuid.PcdPciIoSize|0x00800000
> >>    gArmTokenSpaceGuid.PcdPciMmio32Base|0x50000000
> >>    gArmTokenSpaceGuid.PcdPciMmio32Size|0x08000000
> >>    gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
> >>    gArmTokenSpaceGuid.PcdPciMmio64Size|0x100000000
> >>
> >> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x40000000
> >> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x5f800000
> >
> > ... but not point in fixing before the switch?
> >
> 
> Not quite. The Juno host bridge driver interprets PcdPciIoBase as the
> start of the I/O region in memory.

Right ... but that's a bit "wrong", right? Conceptually if nothing
else.

I'm still OK with that explanation - R-b stands.

/
    Leif

> > (If so, fine.
> > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>)
> >
> >> +  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24
> >> +
> >>    # List of Device Paths that support BootMonFs
> >>    gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
> >>
> >> @@ -270,16 +278,13 @@
> >>    MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
> >>
> >>    # Required by PCI
> >> -  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
> >> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
> >>
> >>    #
> >>    # PCI Support
> >>    #
> >>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> >> -  ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> >> -    <LibraryClasses>
> >> -      DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
> >> -  }
> >> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
> >>
> >>    #
> >>    # SATA Controller
> >> diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
> >> index a16c897f4656..53a3bd2420ce 100644
> >> --- a/Platforms/ARM/Juno/ArmJuno.fdf
> >> +++ b/Platforms/ARM/Juno/ArmJuno.fdf
> >> @@ -140,7 +140,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
> >>    INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
> >>
> >>    # Required by PCI
> >> -  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
> >> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
> >>
> >>    # FV FileSystem
> >>    INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
> >> @@ -161,7 +161,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
> >>    # PCI Support
> >>    #
> >>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> >> -  INF ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
> >> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
> >>
> >>    #
> >>    # SATA Controller
> >> --
> >> 2.9.3
> >>
Ard Biesheuvel April 5, 2017, 1:41 p.m. UTC | #4
On 5 April 2017 at 14:39, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Wed, Apr 05, 2017 at 02:37:06PM +0100, Ard Biesheuvel wrote:
>> On 5 April 2017 at 14:36, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>> > On Tue, Apr 04, 2017 at 01:31:22PM +0100, Ard Biesheuvel wrote:
>> >> Now that we have the prerequisites in place, switch to the generic PCI
>> >> host bridge driver.
>> >>
>> >> Contributed-under: TianoCore Contribution Agreement 1.0
>> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> >> ---
>> >>  Platforms/ARM/Juno/ArmJuno.dsc | 17 +++++++++++------
>> >>  Platforms/ARM/Juno/ArmJuno.fdf |  4 ++--
>> >>  2 files changed, 13 insertions(+), 8 deletions(-)
>> >>
>> >> diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
>> >> index 4d5d207f0c3a..a9524be86dbc 100644
>> >> --- a/Platforms/ARM/Juno/ArmJuno.dsc
>> >> +++ b/Platforms/ARM/Juno/ArmJuno.dsc
>> >> @@ -66,6 +66,10 @@
>> >>  [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
>> >>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>> >>    NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
>> >> +  PciHostBridgeLib|OpenPlatformPkg/Platforms/ARM/Juno/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf
>> >> +  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
>> >> +  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
>> >> +  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
>> >>
>> >>  [BuildOptions]
>> >>    *_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmJunoPkg/Include
>> >> @@ -143,13 +147,17 @@
>> >>    # PLDA PCI Root Complex
>> >>    #
>> >>    gArmTokenSpaceGuid.PcdPciBusMax|255
>> >> -  gArmTokenSpaceGuid.PcdPciIoBase|0x5f800000
>> >
>> > Is this effectively a bugfix ...
>> >
>> >> +  gArmTokenSpaceGuid.PcdPciIoBase|0x0
>> >>    gArmTokenSpaceGuid.PcdPciIoSize|0x00800000
>> >>    gArmTokenSpaceGuid.PcdPciMmio32Base|0x50000000
>> >>    gArmTokenSpaceGuid.PcdPciMmio32Size|0x08000000
>> >>    gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
>> >>    gArmTokenSpaceGuid.PcdPciMmio64Size|0x100000000
>> >>
>> >> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x40000000
>> >> +  gArmTokenSpaceGuid.PcdPciIoTranslation|0x5f800000
>> >
>> > ... but not point in fixing before the switch?
>> >
>>
>> Not quite. The Juno host bridge driver interprets PcdPciIoBase as the
>> start of the I/O region in memory.
>
> Right ... but that's a bit "wrong", right? Conceptually if nothing
> else.
>

Yes -- yet another reason to move to the generic driver. Fixing the
old one first to use PcdPciIoTranslation right before dropping it
altogether makes little sense to me.

> I'm still OK with that explanation - R-b stands.
>

Thanks,

>
>> > (If so, fine.
>> > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>)
>> >
>> >> +  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24
>> >> +
>> >>    # List of Device Paths that support BootMonFs
>> >>    gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
>> >>
>> >> @@ -270,16 +278,13 @@
>> >>    MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>> >>
>> >>    # Required by PCI
>> >> -  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>> >> +  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>> >>
>> >>    #
>> >>    # PCI Support
>> >>    #
>> >>    MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
>> >> -  ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
>> >> -    <LibraryClasses>
>> >> -      DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
>> >> -  }
>> >> +  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> >>
>> >>    #
>> >>    # SATA Controller
>> >> diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
>> >> index a16c897f4656..53a3bd2420ce 100644
>> >> --- a/Platforms/ARM/Juno/ArmJuno.fdf
>> >> +++ b/Platforms/ARM/Juno/ArmJuno.fdf
>> >> @@ -140,7 +140,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>> >>    INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>> >>
>> >>    # Required by PCI
>> >> -  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>> >> +  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>> >>
>> >>    # FV FileSystem
>> >>    INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
>> >> @@ -161,7 +161,7 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>> >>    # PCI Support
>> >>    #
>> >>    INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
>> >> -  INF ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> >> +  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> >>
>> >>    #
>> >>    # SATA Controller
>> >> --
>> >> 2.9.3
>> >>
diff mbox series

Patch

diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
index 4d5d207f0c3a..a9524be86dbc 100644
--- a/Platforms/ARM/Juno/ArmJuno.dsc
+++ b/Platforms/ARM/Juno/ArmJuno.dsc
@@ -66,6 +66,10 @@ 
 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
+  PciHostBridgeLib|OpenPlatformPkg/Platforms/ARM/Juno/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
 
 [BuildOptions]
   *_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmJunoPkg/Include
@@ -143,13 +147,17 @@ 
   # PLDA PCI Root Complex
   #
   gArmTokenSpaceGuid.PcdPciBusMax|255
-  gArmTokenSpaceGuid.PcdPciIoBase|0x5f800000
+  gArmTokenSpaceGuid.PcdPciIoBase|0x0
   gArmTokenSpaceGuid.PcdPciIoSize|0x00800000
   gArmTokenSpaceGuid.PcdPciMmio32Base|0x50000000
   gArmTokenSpaceGuid.PcdPciMmio32Size|0x08000000
   gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
   gArmTokenSpaceGuid.PcdPciMmio64Size|0x100000000
 
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x40000000
+  gArmTokenSpaceGuid.PcdPciIoTranslation|0x5f800000
+  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24
+
   # List of Device Paths that support BootMonFs
   gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"
 
@@ -270,16 +278,13 @@ 
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 
   # Required by PCI
-  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
+  ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
 
   #
   # PCI Support
   #
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
-    <LibraryClasses>
-      DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
-  }
+  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
 
   #
   # SATA Controller
diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
index a16c897f4656..53a3bd2420ce 100644
--- a/Platforms/ARM/Juno/ArmJuno.fdf
+++ b/Platforms/ARM/Juno/ArmJuno.fdf
@@ -140,7 +140,7 @@  FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 
   # Required by PCI
-  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
+  INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
 
   # FV FileSystem
   INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
@@ -161,7 +161,7 @@  FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
   # PCI Support
   #
   INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  INF ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
+  INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
 
   #
   # SATA Controller