mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
Print an error message in efi_main.c if we can't allocate memory for the heap
With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes the loader to be unable to allocate the 64MB it needs for the heap. This change makes the cause of the error more obvious. Differential Revision: https://reviews.freebsd.org/D17958
This commit is contained in:
parent
8ca79fbd4a
commit
974df0a915
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342054
@ -94,8 +94,10 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
|
||||
heapsize = 64 * 1024 * 1024;
|
||||
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
|
||||
EFI_SIZE_TO_PAGES(heapsize), &heap);
|
||||
if (status != EFI_SUCCESS)
|
||||
if (status != EFI_SUCCESS) {
|
||||
ST->ConOut->OutputString(ST->ConOut, L"Failed to allocate memory for heap.\r\n");
|
||||
BS->Exit(IH, status, 0, NULL);
|
||||
}
|
||||
|
||||
setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user