From 9f6531d14d145918079d03926ff827f6c1a274a4 Mon Sep 17 00:00:00 2001 From: gikidy Date: Fri, 24 Apr 2009 07:30:54 +0000 Subject: Adjust the code so that global variable placed at beginning of file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8172 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h | 14 +++++----- IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBus.h | 13 ++++++--- IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 32 ++++++++++++---------- .../Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h | 14 +++++----- 4 files changed, 40 insertions(+), 33 deletions(-) (limited to 'IntelFrameworkModulePkg/Bus/Pci') diff --git a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h index d0a7e0ab88..1c5b559bd8 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h +++ b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h @@ -42,6 +42,13 @@ #include #include "IdeData.h" +// +// Global Variables +// +extern EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding; +extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL gIDEBusDriverDiagnostics; +extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiagnostics2; + // // Extra Definition to porting // @@ -110,13 +117,6 @@ typedef struct { #define IDE_BLOCK_IO_DEV_FROM_THIS(a) CR (a, IDE_BLK_IO_DEV, BlkIo, IDE_BLK_IO_DEV_SIGNATURE) #define IDE_BLOCK_IO_DEV_FROM_DISK_INFO_THIS(a) CR (a, IDE_BLK_IO_DEV, DiskInfo, IDE_BLK_IO_DEV_SIGNATURE) -// -// Global Variables -// -extern EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding; -extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL gIDEBusDriverDiagnostics; -extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiagnostics2; - #include "Ide.h" // diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBus.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBus.h index 5b0428bec4..8e4a222dc5 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBus.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBus.h @@ -53,6 +53,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include "ComponentName.h" + +// +// Global Variables +// +extern EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL *gEfiIncompatiblePciDeviceSupport; +extern EFI_DRIVER_BINDING_PROTOCOL gPciBusDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gPciBusComponentName2; + // // Driver Produced Protocol Prototypes // @@ -238,10 +247,6 @@ typedef struct _PCI_IO_DEVICE { // // Global Variables // -extern EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL *gEfiIncompatiblePciDeviceSupport; -extern EFI_DRIVER_BINDING_PROTOCOL gPciBusDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName; -extern EFI_COMPONENT_NAME2_PROTOCOL gPciBusComponentName2; extern LIST_ENTRY gPciDevicePool; extern BOOLEAN gFullEnumeration; extern UINTN gPciHostBridgeNumber; diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c index f92a5beeca..7975505328 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -18,22 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Internal use only // -/** - report a error Status code of PCI bus driver controller. - - @param PciIoDevice Pci device instance. - @param Code status code. -**/ -EFI_STATUS -ReportErrorStatusCode ( - IN PCI_IO_DEVICE *PciIoDevice, - IN EFI_STATUS_CODE_VALUE Code - ); -// -// PCI I/O Support Function Prototypes -// -// // // Pci Io Protocol Interface // @@ -66,6 +51,23 @@ EFI_PCI_IO_PROTOCOL PciIoInterface = { NULL }; +/** + report a error Status code of PCI bus driver controller. + + @param PciIoDevice Pci device instance. + @param Code status code. +**/ +EFI_STATUS +ReportErrorStatusCode ( + IN PCI_IO_DEVICE *PciIoDevice, + IN EFI_STATUS_CODE_VALUE Code + ); + +// +// PCI I/O Support Function Prototypes +// +// + /** report a error Status code of PCI bus driver controller. diff --git a/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h b/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h index a1100a27cf..ef5b8a4c9c 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h +++ b/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h @@ -37,6 +37,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include +// +// Global Variables +// +extern EFI_DRIVER_BINDING_PROTOCOL gPciVgaMiniPortDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gPciVgaMiniPortComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gPciVgaMiniPortComponentName2; + // // PCI VGA MiniPort Device Structure // @@ -51,13 +58,6 @@ typedef struct { #define PCI_VGA_MINI_PORT_DEV_FROM_THIS(a) CR(a, PCI_VGA_MINI_PORT_DEV, VgaMiniPort, PCI_VGA_MINI_PORT_DEV_SIGNATURE) -// -// Global Variables -// -extern EFI_DRIVER_BINDING_PROTOCOL gPciVgaMiniPortDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gPciVgaMiniPortComponentName; -extern EFI_COMPONENT_NAME2_PROTOCOL gPciVgaMiniPortComponentName2; - // // Driver Binding Protocol functions // -- cgit v1.2.3