• Ard Biesheuvel's avatar
    efi/libstub: Add API function to allocate aligned memory · 43b1df0e
    Ard Biesheuvel authored
    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>
    43b1df0e
mem.c 8.44 KB