efi_low_alloc_above(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ¦‹

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