pl011_console_match(9)
π pl011_console_match(9) π
okay so bestie, welcome to the pl011_console_match page from the Kernel API Manual β yes that's the manual name, we're fancy here β and honestly? this one is a lil niche but it's lowkey iconic once you get it. it's the non-standard console matching function. non-standard!! she's literally not like other matchers π
β¨ SYNOPSIS β¨
int pl011_console_match (struct console *co , char *name , int idx ,
char *options );
that's the whole signature, no cap. four args, one int coming back at you π«Ά
π ARGUMENTS π
coβ the registering console, aka the console object doing the registering. main character of this call tbh πnameβ the name, straight off the console command line π·οΈidxβ the index, also from the console command line. yes it's a number, yes it matters π’optionsβ pointer to the option string from the console command line. aptr, so like, be normal about it π
πΈ DESCRIPTION πΈ
so here's the vibe: this function only attempts to match console command lines of this exact form:
console=pl011,mmio|mmio32,<addr>[,<options>]
console=pl011,0x<addr>[,<options>]
like, that's it. that's the shape. mmio or mmio32, then <addr>, then an optional [,<options>] β or the 0x<addr> flex, also with optional options. it's giving very specific β¨
and what is this form even for? bestie I'm so glad you asked β it's used to register an initial earlycon boot console and then replace it with the amba_console at pl011 driver init. glow-up arc fr fr π¦
then it performs console setup for a match (as required by interface, we don't make the rules). and here's the lil detail that matters: if no <options> are specified, then assume the h/w is already setup. no options = hardware's already good to go, don't touch it π
returns 0 if the console matches; otherwise non-zero to use default matching. so like, non-zero is the "nope, you handle it" signal π«‘
π§ SEE ALSO π§
- Kernel file
./drivers/tty/serial/amba-pl011.cβ go read the source, it's right there, iykyk π
and that's the page!! slay π this was the pl011_console_match(9) page, coming at you from ./drivers/tty/serial, dated October 2026 β mwah, go touch some registers 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