plat_get_fdt(9)
πΈ plat_get_fdt(9) β a Kernel API Manual moment πΈ
okay so bestie, you're reading plat_get_fdt(9) from the Kernel API Manual and honestly? it's a little guy with a big job. let's get into it π
β¨ NAME β¨
plat_get_fdt β hand you a pointer to the platform's device tree blob, no cap π
π¦ SYNOPSIS π¦
void * plat_get_fdt (void );
π ARGUMENTS π
voidβ literally no arguments. nothing. zero. she takes nothing and gives everything π«Ά
π DESCRIPTION π
so this function is the platform-independent API for getting a pointer to the flattened device tree blob. iconic behaviour fr fr β¨
here's the vibe: the interface between the bootloader and the kernel is not consistent across platforms β it's giving chaos, honestly π β so it's necessary to provide this API so that common startup code can locate the FDT. one function to find them all, basically π
and who's using it? the KASLR code, that's who β it calls this to get command line arguments and the random seed out of the device tree. so any platform wishing to use KASLR should provide this API and select SYS_SUPPORTS_RELOCATABLE. that's the deal, bestie, both parts, no skipping π
π₯ RETURN π₯
Pointer to the flattened device tree blob. that's it, that's the whole return value, she's simple and she slays β
π§ SEE ALSO π§
- Kernel file
./arch/mips/include/asm/bootinfo.h plat_fdt_relocated(9)
go read those next, iykyk π
π tiny reminder before you go: the bootloader/kernel interface is genuinely inconsistent across platforms, so don't go assuming it's uniform β that's literally why this API exists. be normal about it π
mwah, that's the whole page! sourced from ./arch/mips/include/asm, dated October 2026, and still serving plat_get_fdt(9) realness. go forth and locate that FDT, bestie πππ¦π
π¦ 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