efi_low_alloc_above(9)
π efi_low_alloc_above(9) β Kernel API Manual β¨
okay bestie, welcome to the efi_low_alloc_above page, straight out of the Kernel API Manual. this one's a little allocation goblin and honestly it's giving "I find you the lowest parking spot that isn't in the bad part of town" ππ
πΈ NAME πΈ
efi_low_alloc_above β allocate pages at or above given address, no cap π«Ά
β¨ SYNOPSIS β¨
efi_status_t efi_low_alloc_above (unsigned long size , unsigned long
align , unsigned long *addr , unsigned long min );
literally the whole signature, character for character, because we don't fumble the code π
π ARGUMENTS π
sizeβ size of the memory area to allocate. how much room you're asking for πalignβ minimum alignment of the allocated memory area. it should a power of two. (yes girl, that's the original wording, and yes, the power-of-two thing is real β don't skip it β)addrβ on exit, the address of the allocated memory. it gets filled in for you on the way out, iconic behaviour π¦minβ minimum address to used for the memory allocation. that's the floor, queen, nothing below it π
π₯ DESCRIPTION π₯
so here's the vibe: it allocates at the lowest possible address that is not below min, and it dishes it out as EFI_LOADER_DATA. π
the allocated pages are aligned according to align β but at least EFI_ALLOC_ALIGN. so align is the flex, EFI_ALLOC_ALIGN is the safety net underneath it. π
and the first allocated page will not [go] below the address given by min. that's the whole boundary queen rule, periodt. π«
β RETURN β
status code. that's it, that's the return β efi_status_t energy, check it and move on bestie π«Ά
π¦ SEE ALSO π¦
- Kernel file
./drivers/firmware/efi/libstub/mem.c efi_get_memory_map(9)efi_allocate_pages(9)efi_free(9)
go read those too, iykyk π
and that's the page!! mwah π this lil' gem lives in ./drivers/firmware/efi/libstub, dated October 2026, and it's been efi_low_alloc_above(9) the whole time β slay, goodbye, drink some water ππ§π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms