Page MenuHomeFreeBSD

Add support to allocate more space before and after a current allocation
ClosedPublic

Authored by andrew on Nov 27 2019, 3:01 PM.

Details

Summary

With a very large kernel or module the staging area may be too small to
hold it. When this is the case try to allocate more space before failing
in the efi copyin/copyout/readin functions.

Test Plan

Loaded a 69M kernel with a 32M staging area on arm64.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Not seeing any holes here

This revision is now accepted and ready to land.Nov 27 2019, 3:54 PM

Seems ok.
Note, the issue about the staging size is not really if we can or can not allocate specific size, but if we have enough target space to copy it. I have starting to port other change (https://reviews.freebsd.org/D22309), the idea there is that we should determine if the target location has enough space. The bios version is simple as there we own the memory and we can not load directly to target address, in UEFI case we need to allocate, load and after switching off the BS, only then we can copy.