early_init_f...reserved_mem(9)
β¨ NAME β¨
early_init_fdt_scan_reserved_mem β bestie, this is the one that creates reserved memory regions π (yes, that's the whole vibe, and it ate)
πΈ SYNOPSIS πΈ
void early_init_fdt_scan_reserved_mem (void );
π¦ ARGUMENTS π¦
voidβ literally no arguments. zero. nada. she takes nothing and gives everything π
π₯ DESCRIPTION π₯
Okay so picture this: this function goes and grabs memory from the early allocator so that a device can have it all to itself β device exclusive use, no sharing, main character energy π β and that exclusivity is defined in the device tree structures π³β¨.
The way it works is very "call me at the right moment" though, so listen up: arch specific code should call this once the early allocator (i.e. memblock) has been fully activated. Not before. That's the whole thing. Timing is everything, iykyk π
π SEE ALSO π
Kernel file ./drivers/of/fdt.c, plus the whole friend group:
unflatten_dt_nodes(9)__unflatten_device_tree(9)of_fdt_unflatten_tree(9)early_init_fdt_reserve_self(9)of_scan_flat_dt(9)of_scan_flat_dt_subnodes(9)of_get_flat_dt_subnode_by_name(9)of_fdt_is_compatible(9)of_flat_dt_is_compatible(9)of_flat_dt_match_machine(9)early_init_dt_check_for_initrd(9)early_init_dt_check_for_elfcorehdr(9)early_init_dt_check_for_usable_mem_range(9)early_init_dt_check_kho(9)unflatten_device_tree(9)unflatten_and_copy_device_tree(9)
ngl this whole page lives in./drivers/ofand it's giving October 2026 β part of the Kernel API Manual, section 9, filed underearly_init_f...reserved_mem(9). Go read the source bestie, it's iconic π«Άβπ
okay bye, go reserve some memory, slay π β¨π
π¦ 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