X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FPcatSingleSegmentPciCfg2Pei%2FPciCfg2.c;h=0d899c9260571988c51e51a183e587ea38249603;hb=aa79b0b3799e95bc21e0df32a135cc5a4d749e4b;hp=722c800378c99936fc11a6e08050264e883bdf0b;hpb=8bd22b8aaa4f5d82e6d9493cb369c8bdc74878fe;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c index 722c800378..0d899c9260 100644 --- a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c +++ b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c @@ -23,27 +23,6 @@ #include -/** - 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.