/* Get ESRT entry from ESRT Cache by FwClass Guid */
EFI_STATUS EFIAPI EsrtDxeGetEsrtEntry(IN EFI_GUID *FwClass, IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry)
/* Get ESRT entry from ESRT Cache by FwClass Guid */
EFI_STATUS EFIAPI EsrtDxeGetEsrtEntry(IN EFI_GUID *FwClass, IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry)
{
  EFI_STATUS  Status;
  if ((FwClass == NULL) || (Entry == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Status = EfiAcquireLockOrFail (&mPrivate.NonFmpLock);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  Status = GetEsrtEntry (
             FwClass,
             ESRT_FROM_NONFMP,
             Entry
             );
  EfiReleaseLock (&mPrivate.NonFmpLock);
  if (EFI_ERROR (Status)) {
    Status = EfiAcquireLockOrFail (&mPrivate.FmpLock);
    if (EFI_ERROR (Status)) {
      return Status;
    }
    Status = GetEsrtEntry (
               FwClass,
               ESRT_FROM_FMP,
               Entry
               );
    EfiReleaseLock (&mPrivate.FmpLock);
  }
  return Status;
}