/* This function wraps EFI_PEI_PCI_CFG2_PPI.Read() service. It reads and returns the PCI configuration register specified by Address, the width of data is specified by Width. */
UINT32 PeiPciLibPciCfg2ReadWorker(IN UINTN Address, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width)
/* This function wraps EFI_PEI_PCI_CFG2_PPI.Read() service. It reads and returns the PCI configuration register specified by Address, the width of data is specified by Width. */
UINT32 PeiPciLibPciCfg2ReadWorker(IN UINTN Address, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width)
{
  EFI_STATUS                  Status;
  UINT32                      Data;
  CONST EFI_PEI_PCI_CFG2_PPI  *PciCfg2Ppi;
  UINT64                      PciCfg2Address;
  Status = PeiServicesLocatePpi (&gEfiPciCfg2PpiGuid, 0, NULL, (VOID **)&PciCfg2Ppi);
  ASSERT_EFI_ERROR (Status);
  ASSERT (PciCfg2Ppi != NULL);
  PciCfg2Address = PCI_TO_PCICFG2_ADDRESS (Address);
  PciCfg2Ppi->Read (
                GetPeiServicesTablePointer (),
                PciCfg2Ppi,
                Width,
                PciCfg2Address,
                &Data
                );
  return Data;
}