efi: Enforce minimum alignment of 1 page on allocations.
authorRoy Franz <roy.franz@linaro.org>
Sun, 22 Sep 2013 22:45:30 +0000 (15:45 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 16 Jun 2014 20:17:12 +0000 (21:17 +0100)
commitf9eb094b899e81b23c617c513f2638f359155a5d
tree85147448fd07694e4974af2399b949b0776ee8ec
parentd47ac2c18744f36112d4fa47a523eb7db1867be9
efi: Enforce minimum alignment of 1 page on allocations.

The efi_high_alloc() and efi_low_alloc() functions
use the EFI_ALLOCATE_ADDRESS option to the EFI
function allocate_pages(), which requires a minimum
of page alignment, and rejects all other requests.
The existing code could fail to allocate depending
on allocation size, as although repeated allocation
attempts were made, none were guaranteed to be page
aligned.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Mark Salter <msalter@redhat.com>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
(cherry picked from commit 38dd9c02c3f2ed461165db22b93fae7f3ddde9ac)
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/firmware/efi/efi-stub-helper.c