Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/loader/copy.c
Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | #endif | ||||
status = BS->AllocatePages(AllocateAddress, EfiLoaderData, nr_pages, | status = BS->AllocatePages(AllocateAddress, EfiLoaderData, nr_pages, | ||||
&addr); | &addr); | ||||
if (!EFI_ERROR(status)) { | if (!EFI_ERROR(status)) { | ||||
/* | /* | ||||
* Move the old allocation and update the state so | * Move the old allocation and update the state so | ||||
* translation still works. | * translation still works. | ||||
*/ | */ | ||||
staging_base = addr; | staging_base = addr; | ||||
memmove((void *)staging_base, (void *)staging, | memmove((void *)(uintptr_t)staging_base, | ||||
staging_end - staging); | (void *)(uintptr_t)staging, staging_end - staging); | ||||
stage_offset -= (staging - staging_base); | stage_offset -= (staging - staging_base); | ||||
staging = staging_base; | staging = staging_base; | ||||
return (true); | return (true); | ||||
} | } | ||||
printf("efi_check_space: Unable to expand staging area\n"); | printf("efi_check_space: Unable to expand staging area\n"); | ||||
return (false); | return (false); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |