https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746

--- Comment #10 from Marcel Moolenaar <mar...@freebsd.org> ---
I just realized that efi_copy_finish() is called via trampoline(). I presume
that this means that it runs with the temporary mapping that was created in
elf64_exec(). We only map the 1GB of physical memory (using 2MB pages). This
means that the EFI allocation must be placed below 0x40000000. However, it is
placed at 0xf37cb000.

Maybe the problem is that for smaller allocations, EFI assigns low memory (i.e.
under 1GB), but for larger allocations it favors high memory?

To test this theory, change efi_copy_init() and instead of passing
AllocateAnyPages as the first argument, pass AllocateMaxAddress as the first
argument and put a maximum address of 1GB in the staging variable before the
call to AllocatePages (see also elf64_exec).

Either the allocation fails, or we're guaranteed to have memory below 1GB.

HTH,

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to