/* Non-FMP instance to register one ESRT entry into ESRT Cache. */
EFI_STATUS EFIAPI EsrtDxeRegisterEsrtEntry(IN EFI_SYSTEM_RESOURCE_ENTRY *Entry)
/* Non-FMP instance to register one ESRT entry into ESRT Cache. */
EFI_STATUS EFIAPI EsrtDxeRegisterEsrtEntry(IN EFI_SYSTEM_RESOURCE_ENTRY *Entry)
{
  EFI_STATUS                 Status;
  EFI_SYSTEM_RESOURCE_ENTRY  EsrtEntryTmp;
  if (Entry == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  Status = EfiAcquireLockOrFail (&mPrivate.NonFmpLock);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  Status = GetEsrtEntry (
             &Entry->FwClass,
             ESRT_FROM_NONFMP,
             &EsrtEntryTmp
             );
  if (Status == EFI_NOT_FOUND) {
    Status = InsertEsrtEntry (Entry, ESRT_FROM_NONFMP);
  }
  EfiReleaseLock (&mPrivate.NonFmpLock);
  return Status;
}