efi_memmap_init_late(9)
π efi_memmap_init_late(9) β a kernel API manual, bestie edition
okay so this is a page from the Kernel API Manual, and today's main character is efi_memmap_init_late π
β¨ NAME β¨
efi_memmap_init_late β literally just maps efi.memmap with memremap() πΊοΈβ¨
πΈ SYNOPSIS πΈ
int efi_memmap_init_late (phys_addr_t addr , unsigned long size );
π¦ ARGUMENTS π¦
addrβ the physical address of the new EFI memory map. yes bestie, physical, keep up πsizeβ how big the new EFI memory map is, in bytes π
π DESCRIPTION π
So what this does is set up a mapping of the EFI memory map using ioremap_cache β¨.
β οΈ But listen β this function should only be called once thevmallocspace has been set up. Which means it is not suitable for calling during early EFI initialise, like, for example inefi_init. Not the vibe. π ββοΈ
Also it expects efi_memmap_init_early to have already been called. Prerequisite behavior, iykyk π«Ά
Now, why are there two EFI memmap initialisation functions (efi_memmap_init_early and this late one, hi bestie)? π Because the early EFI memmap should be explicitly unmapped once EFI initialisation is complete β the fixmap space used to map the EFI memmap (via early_memremap) is a scarce resource, and we are not wasting it π
The late mapping (that's this one, the one we're talking about π
) is intended to persist for the duration of runtime, so that things like efi_mem_desc_lookup and efi_mem_attributes always work. iconic of it honestly π
β RETURN β
zeroon success π- a negative error code on failure π
π₯ SEE ALSO π₯
- Kernel file
./drivers/firmware/efi/memmap.c __efi_memmap_init(9)efi_memmap_init_early(9)
okay that's the whole page, no cap π§ and for the cute sign-off: this came from the source tree at ./drivers/firmware/efi, dated October 2026 β periodt ππ¦πΈ
π¦ 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