X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=initrd.c;h=ac3b91db4a5b8b88374110a6384f283d6fc96b5f;hb=528b4479a96491431b243bf02da43c792962fb27;hp=09ed0f0eb8d2930fe552e8edf1935cc9f717b7be;hpb=8e0034665aa8483b27191c723608575536d01303;p=debian%2Felilo diff --git a/initrd.c b/initrd.c index 09ed0f0..ac3b91d 100644 --- a/initrd.c +++ b/initrd.c @@ -41,7 +41,7 @@ INTN load_file(CHAR16 *filename, memdesc_t *image) { EFI_STATUS status; - VOID *start_addr = image->start_addr; + VOID *start_addr = NULL; UINTN pgcnt; UINT64 size = 0; fops_fd_t fd; @@ -71,7 +71,7 @@ load_file(CHAR16 *filename, memdesc_t *image) /* round up to get required number of pages (4KB) */ image->pgcnt = pgcnt = EFI_SIZE_TO_PAGES(image->size); - start_addr = alloc_pages(pgcnt, EfiLoaderData, start_addr ? AllocateAddress : AllocateAnyPages, start_addr); + start_addr = alloc_pages(pgcnt, EfiLoaderData, start_addr ? AllocateAddress : AllocateAnyPages, 0 ); if (start_addr == NULL) { ERR_PRT((L"Failed to allocate %d pages for %s image", pgcnt, filename));