ArmVirtPkg: implement FdtPciHostBridgeLib

Implement PciHostBridgeLib for DT platforms that expose a PCI root bridge
via a pci-host-ecam-generic DT node. The DT parsing logic is copied from
the PciHostBridgeDxe implementation in ArmVirtPkg, with the one notable
difference that we don't set some of the legacy PCI attributes for IDE
and VGA I/O ranges.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=65
This commit is contained in:
Ard Biesheuvel
2016-08-21 17:34:19 +02:00
parent c8f1a75aa9
commit d4cb9a3049
2 changed files with 456 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
## @file
# PCI Host Bridge Library instance for pci-ecam-generic DT nodes
#
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php.
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
# IMPLIED.
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = FdtPciHostBridgeLib
FILE_GUID = 59fcb139-2558-4cf0-8d7c-ebac499da727
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PciHostBridgeLib
#
# The following information is for reference only and not required by the build
# tools.
#
# VALID_ARCHITECTURES = AARCH64 ARM
#
[Sources]
FdtPciHostBridgeLib.c
[Packages]
ArmPkg/ArmPkg.dec
ArmVirtPkg/ArmVirtPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
[LibraryClasses]
DebugLib
DevicePathLib
MemoryAllocationLib
PciPcdProducerLib
[FixedPcd]
gArmTokenSpaceGuid.PcdPciMmio32Translation
[Pcd]
gArmTokenSpaceGuid.PcdPciIoTranslation
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
[Depex]
gFdtClientProtocolGuid