Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/efi/libefi/libefi.c
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) | ||||
RS = ST->RuntimeServices; | RS = ST->RuntimeServices; | ||||
status = BS->LocateProtocol(&console_control_protocol, NULL, | 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 = 3 * 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) | ||||
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 exit() from here on... */ | /* Use exit() from here on... */ | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |