MdeModulePkg/Bus/Pci/PciBusDxe depends on EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL and EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. Here we clone the driver that produces these from PcAtChipsetPkg, with the following immediate changes:
- a new FILE_GUID is generated; - the assembly-language Ia32 / X64 specific IoFifo "accelerators" are not copied, and their client code (which would be dead code anyway) is removed; - UNI files are not copied: they are used in conjunction with the UEFI Packaging Tool (UPT), but the driver under ArmVirtualizationPkg will not be part of UDK. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <[email protected]> Reviewed-by: Olivier Martin <[email protected]> --- Notes: v2: - fix typo (missing underscore) in commit message {PcAtChipsetPkg => ArmPlatformPkg/ArmVirtualizationPkg}/PciHostBridgeDxe/PciHostBridgeDxe.inf | 15 +------ {PcAtChipsetPkg => ArmPlatformPkg/ArmVirtualizationPkg}/PciHostBridgeDxe/PciHostBridge.h | 0 {PcAtChipsetPkg => ArmPlatformPkg/ArmVirtualizationPkg}/PciHostBridgeDxe/PciHostBridge.c | 0 {PcAtChipsetPkg => ArmPlatformPkg/ArmVirtualizationPkg}/PciHostBridgeDxe/PciRootBridgeIo.c | 45 -------------------- 4 files changed, 1 insertion(+), 59 deletions(-) diff --git a/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf similarity index 80% copy from PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf copy to ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf index 613c29f..4d5bb9c 100644 --- a/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf +++ b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf @@ -15,8 +15,7 @@ [Defines] INF_VERSION = 0x00010005 BASE_NAME = PciHostBridge - MODULE_UNI_FILE = PciHostBridge.uni - FILE_GUID = 2383608E-C6D0-4e3e-858D-45DFAC3543D5 + FILE_GUID = 9f609346-37cb-4eb7-801f-f55099373998 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 @@ -42,15 +41,6 @@ PciHostBridge.c PciRootBridgeIo.c PciHostBridge.h - IoFifo.h - -[Sources.IA32] - Ia32/IoFifo.asm - Ia32/IoFifo.S - -[Sources.X64] - X64/IoFifo.asm - X64/IoFifo.S [Protocols] gEfiPciHostBridgeResourceAllocationProtocolGuid ## PRODUCES @@ -60,6 +50,3 @@ [depex] gEfiMetronomeArchProtocolGuid - -[UserExtensions.TianoCore."ExtraFiles"] - PciHostBridgeExtra.uni diff --git a/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.h b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.h similarity index 100% copy from PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.h copy to ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.h diff --git a/PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.c b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c similarity index 100% copy from PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.c copy to ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c diff --git a/PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciRootBridgeIo.c similarity index 96% copy from PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c copy to ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciRootBridgeIo.c index 7986550..7c35e85 100644 --- a/PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c +++ b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciRootBridgeIo.c @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "PciHostBridge.h" -#include "IoFifo.h" typedef struct { EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR SpaceDesp[TypeMax]; @@ -993,50 +992,6 @@ RootBridgeIoIoRW ( OutStride = mOutStride[Width]; OperationWidth = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03); -#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) - if (InStride == 0) { - if (Write) { - switch (OperationWidth) { - case EfiPciWidthUint8: - IoWriteFifo8 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - case EfiPciWidthUint16: - IoWriteFifo16 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - case EfiPciWidthUint32: - IoWriteFifo32 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - default: - // - // The RootBridgeIoCheckParameter call above will ensure that this - // path is not taken. - // - ASSERT (FALSE); - break; - } - } else { - switch (OperationWidth) { - case EfiPciWidthUint8: - IoReadFifo8 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - case EfiPciWidthUint16: - IoReadFifo16 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - case EfiPciWidthUint32: - IoReadFifo32 ((UINTN) Address, Count, Buffer); - return EFI_SUCCESS; - default: - // - // The RootBridgeIoCheckParameter call above will ensure that this - // path is not taken. - // - ASSERT (FALSE); - break; - } - } - } -#endif - for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) { if (Write) { switch (OperationWidth) { -- 1.8.3.1 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
