/* If Hot Plug is supported by the platform, call PCI Hot Plug Init protocol to get PCI Hot Plug controller's information and constructor the root hot plug private data structure. */
EFI_STATUS InitializeHotPlugSupport(VOID)
/* If Hot Plug is supported by the platform, call PCI Hot Plug Init protocol to get PCI Hot Plug controller's information and constructor the root hot plug private data structure. */
EFI_STATUS InitializeHotPlugSupport(VOID)
{
  EFI_STATUS        Status;
  EFI_HPC_LOCATION  *HpcList;
  UINTN             HpcCount;
  Status = gBS->LocateProtocol (
                  &gEfiPciHotPlugInitProtocolGuid,
                  NULL,
                  (VOID **)&gPciHotPlugInit
                  );
  if (EFI_ERROR (Status)) {
    return EFI_UNSUPPORTED;
  }
  Status = gPciHotPlugInit->GetRootHpcList (
                              gPciHotPlugInit,
                              &HpcCount,
                              &HpcList
                              );
  if (!EFI_ERROR (Status)) {
    gPciRootHpcPool  = HpcList;
    gPciRootHpcCount = HpcCount;
    gPciRootHpcData  = AllocateZeroPool (sizeof (ROOT_HPC_DATA) * gPciRootHpcCount);
    if (gPciRootHpcData == NULL) {
      return EFI_OUT_OF_RESOURCES;
    }
  }
  return EFI_SUCCESS;
}