efi_printk(9)
π efi_printk(9) β the Kernel API Manual page where your fave EFI stub printk lives β¨
okay so bestie, welcome to efi_printk(9) from the Kernel API Manual β yes the whole manual, and yes this function is basically the EFI stub's little messenger goblin π§ that sends your kernel message out into the world. lowkey iconic.
πΈ NAME πΈ
efi_printk β print a kernel message π
β¨ SYNOPSIS β¨
int efi_printk (const char *fmt , ... );
like, that's the whole vibe. int in, characters out. slay.
π ARGUMENTS π
fmtβ the format string π«Ά the star of the show, the main character, the thing you're actually printing....β variable arguments π all the extra lil friends that get slotted into your format string. they're just vibing in the ellipsis.
π¦ DESCRIPTION π¦
okay so here's the tea β β the first letter of the format string is what decides the logging level of the message. that's the whole trick, iykyk.
and the vibe check: if that level is less than the current EFI logging level, the message gets suppressed π like, sorry bestie, not today, the filter said no.
also important and you gotta know it: the message will be truncated to 255 bytes. so don't come at it with a novel, it's giving short-form content only π
no cap, 255 bytes is the limit. write like it.
β RETURN β
returns the number of printed characters β¨ so you literally get receipts on how much got printed. obsessed.
π₯ SEE ALSO π₯
- Kernel file
./drivers/firmware/efi/libstub/printk.cβ the source, go read it, it's right there π efi_char16_puts(9)efi_puts(9)
so yeah, that's the page π go forth, print your messages, respect the 255-byte limit, and remember that the first letter runs the whole show.
this has been ./drivers/firmware/efi/libstub (the path, the whole path) and the page is dated October 2026, from the same crew that brought you efi_printk(9) π¦ bye bestie, mwah π
β¨
π¦ 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