Global variables have been moved backward ahead of functions.
Only a few cases were left due to its module structure. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6816 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -23,27 +23,6 @@
|
||||
|
||||
#include <IndustryStandard/Pci.h>
|
||||
|
||||
/**
|
||||
Convert EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS to PCI_LIB_ADDRESS.
|
||||
|
||||
@param Address PCI address with
|
||||
EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS format.
|
||||
|
||||
@return The PCI address with PCI_LIB_ADDRESS format.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
PciCfgAddressConvert (
|
||||
EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *Address
|
||||
)
|
||||
{
|
||||
if (Address->ExtendedRegister == 0) {
|
||||
return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->Register);
|
||||
}
|
||||
|
||||
return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->ExtendedRegister);
|
||||
}
|
||||
|
||||
/**
|
||||
Reads from a given location in the PCI configuration space.
|
||||
|
||||
@@ -184,6 +163,29 @@ EFI_PEI_PPI_DESCRIPTOR gPciCfg2PpiList = {
|
||||
&gPciCfg2Ppi
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Convert EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS to PCI_LIB_ADDRESS.
|
||||
|
||||
@param Address PCI address with
|
||||
EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS format.
|
||||
|
||||
@return The PCI address with PCI_LIB_ADDRESS format.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
PciCfgAddressConvert (
|
||||
EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *Address
|
||||
)
|
||||
{
|
||||
if (Address->ExtendedRegister == 0) {
|
||||
return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->Register);
|
||||
}
|
||||
|
||||
return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->ExtendedRegister);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Reads from a given location in the PCI configuration space.
|
||||
|
||||
|
Reference in New Issue
Block a user