Page MenuHomeFreeBSD

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

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



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

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

Event Timeline

andrew created this revision.Wed, Nov 27, 3:01 PM
imp accepted this revision.Wed, Nov 27, 3:54 PM

Not seeing any holes here

This revision is now accepted and ready to land.Wed, Nov 27, 3:54 PM
tsoome accepted this revision.Wed, Nov 27, 4:08 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 (, 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.

This revision was automatically updated to reflect the committed changes.