firmware_map_add_early(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ firmware_map_add_early(9) πŸ¦‹

okay so welcome to the Kernel API Manual, bestie β€” today’s main character is firmware_map_add_early(9), and the vibes are extremely bootmem.

✨ NAME ✨

firmware_map_add_early β€” adds a firmware mapping entry. periodt.

🌸 SYNOPSIS 🌸

int firmware_map_add_early (u64 start , u64 end , const char *type );

πŸ’… ARGUMENTS πŸ’…

  • start β€” start of the memory range. the opening scene, the β€œonce upon a time” of this range.
  • end β€” end of the memory range. the closing credits, the β€œthat’s a wrap” of this range.
  • type β€” type of the memory range. the little label on the memory-range outfit.

🫢 DESCRIPTION 🫢

Adds a firmware mapping entry. This function uses the bootmem allocator for memory allocation. no cap.

⚠️ okay so the timeline is strict, bestie: that function must be called before late_initcall. not after, not β€œwhenever you get around to it” β€” before. πŸ’€

πŸ”₯ RETURN πŸ”₯

0 on success, or -ENOMEM if no memory could be allocated. so if it slays, you get 0; if memory is giving absolutely nothing, you get -ENOMEM. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/firmware/memmap.c, plus the whole squad:


that’s the whole page, bestie πŸŽ€ β€” source/version hood is ./drivers/firmware, and the date on this iconic drop is October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from