diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c index 6d2ad3d50b..da743dcb9f 100644 --- a/src/boot/efi/util.c +++ b/src/boot/efi/util.c @@ -350,3 +350,9 @@ EFI_STATUS file_read(EFI_FILE_HANDLE dir, const CHAR16 *name, UINTN off, UINTN s return err; } + +EFI_STATUS log_oom(void) { + Print(L"Out of memory."); + (void) uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000); + return EFI_OUT_OF_RESOURCES; +} diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index cef127f400..8518dfde77 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -66,3 +66,5 @@ const EFI_GUID loader_guid; (ptr) = NULL; \ _ptr_; \ }) + +EFI_STATUS log_oom(void);