Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/efi/loader/copy.c
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
efi_copy_init(void) | efi_copy_init(void) | ||||
{ | { | ||||
EFI_STATUS status; | EFI_STATUS status; | ||||
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, | status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, | ||||
STAGE_PAGES, &staging); | STAGE_PAGES, &staging); | ||||
if (EFI_ERROR(status)) { | if (EFI_ERROR(status)) { | ||||
printf("failed to allocate staging area: %lu\n", | printf("failed to allocate staging area: %lu\n", | ||||
(unsigned long)(status & EFI_ERROR_MASK)); | EFI_ERROR_CODE(status)); | ||||
return (status); | return (status); | ||||
} | } | ||||
staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE; | staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE; | ||||
#if defined(__aarch64__) || defined(__arm__) | #if defined(__aarch64__) || defined(__arm__) | ||||
/* | /* | ||||
* Round the kernel load address to a 2MiB value. This is needed | * Round the kernel load address to a 2MiB value. This is needed | ||||
* because the kernel builds a page table based on where it has | * because the kernel builds a page table based on where it has | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |