efi: efistub: allow allocation alignment larger than EFI_PAGE_SIZE
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 17 Nov 2014 12:46:44 +0000 (13:46 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 12 Jan 2015 08:17:00 +0000 (08:17 +0000)
commitcf2b0f102cdf912eedb87b10271fa0ad582cf2c1
tree0ca4f7122012289593bb8cb12eed4d3bbd8ce98e
parent7bb68410ef22067b08fd52887875b8f337f89dcc
efi: efistub: allow allocation alignment larger than EFI_PAGE_SIZE

On systems with 64 KB pages, it is preferable for UEFI memory map
entries to be 64 KB aligned multiples of 64 KB, because it relieves
us of having to deal with the residues.
So, if EFI_ALLOC_ALIGN is #define'd by the platform, use it to round
up all memory allocations made.

Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Borislav Petkov <bp@suse.de>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
drivers/firmware/efi/libstub/efi-stub-helper.c