Skip to content
Commit 43b1df0e authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

efi/libstub: Add API function to allocate aligned memory



Break out the code to create an aligned page allocation from mem.c
and move it into a function efi_allocate_pages_aligned() in alignedmem.c.
Update efi_allocate_pages() to invoke it unless the minimum alignment
equals the EFI page size (4 KB), in which case the ordinary page
allocator is sufficient. This way, efi_allocate_pages_aligned() will
only be pulled into the build if it is actually being used (which will
be on arm64 only in the immediate future)

Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 5d12da9d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment