/* Creating event object for PCI Hot Plug controller. */
EFI_STATUS CreateEventForHpc(IN UINTN HpIndex, OUT EFI_EVENT *Event)
/* Creating event object for PCI Hot Plug controller. */
EFI_STATUS CreateEventForHpc(IN UINTN HpIndex, OUT EFI_EVENT *Event)
{
  EFI_STATUS  Status;
  Status = gBS->CreateEvent (
                  EVT_NOTIFY_SIGNAL,
                  TPL_CALLBACK,
                  PciHPCInitialized,
                  gPciRootHpcData + HpIndex,
                  &((gPciRootHpcData + HpIndex)->Event)
                  );
  if (!EFI_ERROR (Status)) {
    *Event = (gPciRootHpcData + HpIndex)->Event;
  }
  return Status;
}