efi/libstub: Take soft and hard memory limits into account for initrd loading
authorArd Biesheuvel <ardb@kernel.org>
Mon, 10 Feb 2020 16:02:45 +0000 (17:02 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:57:15 +0000 (21:57 +0100)
commit31f5e546655b502d508e160e6cab20462089e34d
treed90afb183c6f355c3a8d9d5ed278acc878901ccf
parent9302c1bb8e475829330146423626c3d32e8cb012
efi/libstub: Take soft and hard memory limits into account for initrd loading

On x86, the preferred load address of the initrd is still below 4 GB,
even though in some cases, we can cope with an initrd that is loaded
above that.

To simplify the code, and to make it more straightforward to introduce
other ways to load the initrd, pass the soft and hard memory limits at
the same time, and let the code handling the initrd= command line option
deal with this.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/arm-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/file.c
drivers/firmware/efi/libstub/x86-stub.c