/* Get resource padding if the specified PCI bridge is a hot plug bus. */
VOID GetResourcePaddingForHpb(IN PCI_IO_DEVICE *PciIoDevice)
/* Get resource padding if the specified PCI bridge is a hot plug bus. */
VOID GetResourcePaddingForHpb(IN PCI_IO_DEVICE *PciIoDevice)
{
  EFI_STATUS                         Status;
  EFI_HPC_STATE                      State;
  UINT64                             PciAddress;
  EFI_HPC_PADDING_ATTRIBUTES         Attributes;
  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR  *Descriptors;
  if (IsPciHotPlugBus (PciIoDevice)) {
    PciAddress = EFI_PCI_ADDRESS (PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber, 0);
    Status     = gPciHotPlugInit->GetResourcePadding (
                                    gPciHotPlugInit,
                                    PciIoDevice->DevicePath,
                                    PciAddress,
                                    &State,
                                    (VOID **)&Descriptors,
                                    &Attributes
                                    );
    if (EFI_ERROR (Status)) {
      return;
    }
    if (((State & EFI_HPC_STATE_ENABLED) != 0) && ((State & EFI_HPC_STATE_INITIALIZED) != 0)) {
      PciIoDevice->ResourcePaddingDescriptors = Descriptors;
      PciIoDevice->PaddingAttributes          = Attributes;
    }
    return;
  }
}