uart_parse_earlycon(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… uart_parse_earlycon(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual and it's literally about one tiny little function called uart_parse_earlycon that does the world's most important admin job: it reads the earlycon options off the kernel command line and tells you what they mean. she's giving parser energy, she's giving decoder ring, she ate πŸ’…βœ¨


✨ NAME ✨

uart_parse_earlycon β€” parse earlycon options 🧚

like, that's it, that's the whole job, and she does it flawlessly no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int uart_parse_earlycon (char *p , enum uart_iotype *iotype ,
resource_size_t *addr , char **options );

literally copy that exactly, do not @ me, the spacing is canon πŸ’€


🌸 ARGUMENTS 🌸

  • p β€” ptr to 2nd field (ie., just beyond <name>,). so you already walked past the name and the comma, bestie, this is where you hand her the rest of the string 🫢
  • iotype β€” ptr for decoded iotype (out). she writes the answer here, you just gotta give her somewhere to put it ✨
  • addr β€” ptr for decoded mapbase/iobase (out). same deal, output pointer, she fills it in πŸ’–
  • options β€” ptr for <options> field; NULL if not present (out). note the NULL β€” if there's no options field she'll tell you so, don't panic πŸ™ˆ
ngl the (out) on all of these is the vibe check you need to pass β€” these are outputs, she's writing to them, you're just holding the bowl πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so the whole thing: she decodes the earlycon kernel command line parameters, and they look like this πŸ‘‘

  • earlycon=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
  • console=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>

so it's <name>, then one of those six iotype words β€” io, mmio, mmio16, mmio32, mmio32be, mmio32native β€” then <addr>, then <options>. iconic. no notes. πŸ”₯

and there's also the optional form, which is highkey the chill version πŸ¦‹

  • earlycon=<name>,0x<addr>,<options>
  • console=<name>,0x<addr>,<options>

this one is also accepted β€” like, she's not gonna throw it out β€” and when you use it, the returned iotype will be UPIO_MEM. that's the little secret twist at the end of the movie 😭✨


πŸ’€ RETURN πŸ’€

  • 0 on success 🌈
  • -EINVAL on failure 😭

that's it. binary mood. she either slayed or she didn't.


πŸ‘‘ SEE ALSO πŸ‘‘

bestie the guest list is LONG, grab a snack πŸ“ this is all from the Kernel file ./drivers/tty/serial/serial_core.c:

twenty entries. twenty. she's popular, she's connected, she has friends πŸ’…πŸ‘‘


respect the source path ./drivers/tty/serial β€” that's where she lives 🏑 and this page is dated October 2026 (yes, the future, she's ahead of her time ⭐). that's the whole page, mwah, bye bestie πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from