/* Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE. */
PEI_CORE_FV_HANDLE* FvHandleToCoreHandle(IN EFI_PEI_FV_HANDLE FvHandle)
/* Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE. */
PEI_CORE_FV_HANDLE* FvHandleToCoreHandle(IN EFI_PEI_FV_HANDLE FvHandle)
{
  UINTN              Index;
  PEI_CORE_INSTANCE  *PrivateData;
  PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());
  for (Index = 0; Index < PrivateData->FvCount; Index++) {
    if (FvHandle == PrivateData->Fv[Index].FvHandle) {
      return &PrivateData->Fv[Index];
    }
  }
  return NULL;
}