Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/loader/copy.c
Show First 20 Lines • Show All 272 Lines • ▼ Show 20 Lines | efi_readin(const int fd, vm_offset_t dest, const size_t len) | ||||
return (read(fd, (void *)(dest + stage_offset), len)); | return (read(fd, (void *)(dest + stage_offset), len)); | ||||
} | } | ||||
void | void | ||||
efi_copy_finish(void) | efi_copy_finish(void) | ||||
{ | { | ||||
uint64_t *src, *dst, *last; | uint64_t *src, *dst, *last; | ||||
src = (uint64_t *)staging; | src = (uint64_t *)(uintptr_t)staging; | ||||
dst = (uint64_t *)(staging - stage_offset); | dst = (uint64_t *)(uintptr_t)(staging - stage_offset); | ||||
last = (uint64_t *)staging_end; | last = (uint64_t *)(uintptr_t)staging_end; | ||||
while (src < last) | while (src < last) | ||||
*dst++ = *src++; | *dst++ = *src++; | ||||
} | } |