Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/loader/efi_main.c
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | if (status != EFI_SUCCESS) { | ||||
ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)L"Failed to allocate memory for heap.\r\n"); | ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)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 = OpenProtocolByHandle(IH, &image_protocol, (void**)&img); | ||||
if (status != EFI_SUCCESS) | if (status != EFI_SUCCESS) | ||||
efi_exit(status); | efi_exit(status); | ||||
/* | /* | ||||
* Pre-process the (optional) load options. If the option string | * Pre-process the (optional) load options. If the option string | ||||
* is given as an ASCII string, we use a poor man's ASCII to | * is given as an ASCII string, we use a poor man's ASCII to | ||||
* Unicode-16 translation. The size of the option string as given | * Unicode-16 translation. The size of the option string as given | ||||
* to us includes the terminating null character. We assume the | * to us includes the terminating null character. We assume the | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |