Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/loader/efi_main.c
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | status = BS->LocateProtocol(&console_control_protocol, NULL, | ||||
(VOID **)&console_control); | (VOID **)&console_control); | ||||
if (status == EFI_SUCCESS) | if (status == EFI_SUCCESS) | ||||
(void)console_control->SetMode(console_control, | (void)console_control->SetMode(console_control, | ||||
EfiConsoleControlScreenText); | EfiConsoleControlScreenText); | ||||
heapsize = 64 * 1024 * 1024; | heapsize = 64 * 1024 * 1024; | ||||
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, | status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, | ||||
EFI_SIZE_TO_PAGES(heapsize), &heap); | 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); | BS->Exit(IH, status, 0, NULL); | ||||
} | |||||
setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); | setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); | ||||
/* Use efi_exit() from here on... */ | /* Use efi_exit() from here on... */ | ||||
status = BS->HandleProtocol(IH, &image_protocol, (VOID**)&img); | status = BS->HandleProtocol(IH, &image_protocol, (VOID**)&img); | ||||
if (status != EFI_SUCCESS) | if (status != EFI_SUCCESS) | ||||
efi_exit(status); | efi_exit(status); | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |