x86/boot: Convert early_serial_base to unsigned long
PATCH 1/6 x86/boot: Convert early_serial_base to unsigned long
As a preparatory of adding flexible serial I/O accessors, convert early_serial_base to unsigned long to cover all possible bus addresses on the system.
No functional change intended.
--- arch/x86/boot/boot.h | 2 +- arch/x86/boot/compressed/early_serial_console.c | 2 +- arch/x86/boot/compressed/misc.h | 4 ++-- arch/x86/boot/early_serial_console.c | 6 +++--- arch/x86/boot/tty.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
arch/x86/boot/boot.h +1 -1
@@ -299,7 +299,7 @@ int check_knl_erratum(void);int validate_cpu (void );/* early_serial_console.c */ -extern int early_serial_base; +extern unsigned long early_serial_base;void console_init (void );/* edd.c */
arch/x86/boot/compressed/early_serial_console.c +1 -1
@@ -1,5 +1,5 @@#include "misc.h" -int early_serial_base; +unsigned long early_serial_base;#include "../early_serial_console.c"
arch/x86/boot/compressed/misc.h +2 -2
@@ -101,10 +101,10 @@ static inline void finalize_identity_maps(void)#ifdef CONFIG_EARLY_PRINTK /* early_serial_console.c */ -extern int early_serial_base; +extern unsigned long early_serial_base;void console_init (void );#else -static const int early_serial_base; +static const unsigned long early_serial_base;static inline void console_init (void ) { }#endif
arch/x86/boot/early_serial_console.c +3 -3
@@ -23,7 +23,7 @@#define DEFAULT_BAUD 9600 -static void early_serial_init (int port,int baud) +static void early_serial_init (unsigned long port,int baud) {unsigned char c;unsigned divisor;
@@ -48,7 +48,7 @@ static void parse_earlyprintk(void)int baud =DEFAULT_BAUD ;char arg[32 ];int pos =0 ; -int port =0 ; +unsigned long port =0 ;if (cmdline_find_option ("earlyprintk" , arg,sizeof arg) >0 ) {char *e;
@@ -118,7 +118,7 @@ static void parse_console_uart8250(void) {char optstr[64 ], *options;int baud =DEFAULT_BAUD ; -int port =0 ; +unsigned long port =0 ;/* * console=uart8250,io,0x3f8,115200n8
arch/x86/boot/tty.c +1 -1
@@ -15,7 +15,7 @@#include "boot.h" -int early_serial_base; +unsigned long early_serial_base;#define XMTRDY 0x20
Signature · 1 line
2.15.1
PATCH 2/6 x86/boot: Introduce helpers for serial I/O
As preparatory to enable earlyprintk on non-standard ports on x86, introduce serial_in() and serial_out() helpers to perform serial I/O.
No functional change intended.
--- arch/x86/boot/boot.h | 2 + arch/x86/boot/compressed/early_serial_console.c | 3 ++ arch/x86/boot/compressed/misc.c | 4 +- arch/x86/boot/compressed/misc.h | 4 ++ arch/x86/boot/early_serial_console.c | 60 +++++++++++++++++-------- arch/x86/boot/tty.c | 7 ++- 6 files changed, 57 insertions(+), 23 deletions(-)
arch/x86/boot/boot.h +2 -0
@@ -299,6 +299,8 @@ int check_knl_erratum(void);int validate_cpu (void );/* early_serial_console.c */ +extern unsigned int (*serial_in)(unsigned long addr,int offset); +extern void (*serial_out)(unsigned long addr,int offset,int value);extern unsigned long early_serial_base;void console_init (void );
arch/x86/boot/compressed/early_serial_console.c +3 -0
@@ -1,5 +1,8 @@#include "misc.h" +unsigned int (*serial_in)(unsigned long addr,int offset); +void (*serial_out)(unsigned long addr,int offset,int value); +unsigned long early_serial_base;#include "../early_serial_console.c"
arch/x86/boot/compressed/misc.c +2 -2
@@ -97,10 +97,10 @@ static void serial_putchar(int ch) {unsigned timeout =0xffff ; -while ((inb (early_serial_base +LSR ) &XMTRDY ) ==0 && --timeout) +while ((serial_in (early_serial_base,LSR ) &XMTRDY ) ==0 && --timeout)cpu_relax (); -outb (ch, early_serial_base +TXR ); +serial_out (early_serial_base,TXR , ch); }void __putstr (const char *s)
arch/x86/boot/compressed/misc.h +4 -0
@@ -101,9 +101,13 @@ static inline void finalize_identity_maps(void)#ifdef CONFIG_EARLY_PRINTK /* early_serial_console.c */ +extern unsigned int (*serial_in)(unsigned long addr,int offset); +extern void (*serial_out)(unsigned long addr,int offset,int value);extern unsigned long early_serial_base;void console_init (void );#else +static unsigned int (*serial_in)(unsigned long addr,int offset); +static void (*serial_out)(unsigned long addr,int offset,int value);static const unsigned long early_serial_base;static inline void console_init (void ) { }
arch/x86/boot/early_serial_console.c +41 -19
90 lines not on this page · raw message
arch/x86/boot/tty.c +5 -2
@@ -15,6 +15,9 @@#include "boot.h" +unsigned int (*serial_in)(unsigned long addr,int offset); +void (*serial_out)(unsigned long addr,int offset,int value); +unsigned long early_serial_base;#define XMTRDY 0x20
@@ -31,10 +34,10 @@ static void __attribute__((section(".inittext"))) serial_putchar(int ch) {unsigned timeout =0xffff ; -while ((inb (early_serial_base +LSR ) &XMTRDY ) ==0 && --timeout) +while ((serial_in (early_serial_base,LSR ) &XMTRDY ) ==0 && --timeout)cpu_relax (); -outb (ch, early_serial_base +TXR ); +serial_out (early_serial_base,TXR , ch); }static void __attribute__((section (".inittext" )))bios_putchar (int ch)
Signature · 1 line
2.15.1
PATCH 3/6 x86/boot: Add MMIO byte accessors
In reply to Andy Shevchenkoreadb() and writeb() would help to access serial device via MMIO address space.
--- arch/x86/boot/boot.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/x86/boot/boot.h +12 -0
@@ -79,6 +79,18 @@ static inline void io_delay(void) asmvolatile ("outb %%al,%0" : :"dN" (DELAY_PORT )); } +static inline u8 readb (const volatile void __iomem *addr) +{ +u8 v; + asmvolatile ("movb %1,%0" :"=q" (v) :"m" (*(volatile u8 __force *)addr)); +return v; +} + +static inline void writeb (u8 v,volatile void __iomem *addr) +{ + asmvolatile ("movb %0,%1" : :"q" (v),"m" (*(volatile u8 __force *)addr)); +} +/* These functions are used to reference data in other segments. */ static inline u16 ds (void )
Signature · 1 line
2.15.1
PATCH 4/6 x86/boot: Assume MMIO if serial base address supplied via earlyprintk
In reply to Andy ShevchenkoIf user supplied serial base address via kernel command line and value is higher than IO space limit (64k boundary), assume for now that MMIO byte access is required.
Later we might expand or modify this if needed.
--- arch/x86/boot/early_serial_console.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
arch/x86/boot/early_serial_console.c +21 -1
@@ -33,6 +33,22 @@ static void io_serial_out(unsigned long addr, int offset, int value)outb (value, addr + offset); } +#define IO_SPACE_LIMIT 0xffff + +static void mem8_serial_out (unsigned long addr,int offset,int value) +{ +u8 __iomem *vaddr = (u8 __iomem *)addr; +/* shift implied by pointer type */ +writeb (value, vaddr + offset); +} + +static unsigned int mem8_serial_in (unsigned long addr,int offset) +{ +u8 __iomem *vaddr = (u8 __iomem *)addr; +/* shift implied by pointer type */ +return readb (vaddr + offset); +} +static void early_serial_configure (unsigned long port,int baud) {unsigned char c;
@@ -54,7 +70,11 @@ static void early_serial_configure(unsigned long port, int baud)static void early_serial_init (unsigned long port,int baud) {/* Assign serial I/O accessors */ -if (port) { +if (port >IO_SPACE_LIMIT ) { +/* It is memory mapped - assume 8-bit alignment */ + serial_in = mem8_serial_in; + serial_out = mem8_serial_out; + }else if (port) {/* These will always be IO based ports */ serial_in = io_serial_in; serial_out = io_serial_out;
Signature · 1 line
2.15.1
Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk
Quoted 5 lines · Andy Shevchenko
If user supplied serial base address via kernel command line and value is higher than IO space limit (64k boundary), assume for now that MMIO byte access is required.
Later we might expand or modify this if needed.
Is this a standard pattern for serial code configuration values?
Thanks,
Ingo
Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Andy Shevchenko
If user supplied serial base address via kernel command line and value
is higher than IO space limit (64k boundary), assume for now that MMIO
byte access is required.Later we might expand or modify this if needed.
Is this a standard pattern for serial code configuration values?
I didn't get what you meant under "standard" here.
IO space limit comes from generic io.h header and AFAIU is a hardware limitation (outN (%dx), ...; inX (%dx); dx is 16 bit register).
Using mmio8 out of the IO space is dictated by the (modern) x86 platforms with non-standard (okay, high speed) UART location in address space.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk
Quoted 13 lines · Andy Shevchenko
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Andy Shevchenko
If user supplied serial base address via kernel command line and value
is higher than IO space limit (64k boundary), assume for now that MMIO
byte access is required.Later we might expand or modify this if needed.
Is this a standard pattern for serial code configuration values?
Quoted 8 lines
I didn't get what you meant under "standard" here.
IO space limit comes from generic
io.hheader and AFAIU is a hardware limitation (outN (%dx), ...; inX (%dx); dx is 16 bit register).Using mmio8 out of the IO space is dictated by the (modern) x86 platforms with non-standard (okay, high speed) UART location in address space.
So I was wondering whether we should just make mmio configuration an explicit parameter instead of a 'range hack'.
Since we are introducing something entirely new the choice is ours.
Doing it that way would technically be cleaner, as, at least theoretically, there could be platforms with mmio addresses below 64k physical, right?
It's also more self-documenting if the new configuration/parameter says 'mmio' explicitly.
Thanks,
Ingo
Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk
Quoted 22 lines · Ingo Molnar
Quoted 20 lines · Andy Shevchenko
Quoted 9 lines · Ingo Molnar
Quoted 7 lines · Andy Shevchenko
If user supplied serial base address via kernel command line and value
is higher than IO space limit (64k boundary), assume for now that
MMIO
byte access is required.Quoted 3 lines
Quoted 1 line
Later we might expand or modify this if needed.
Is this a standard pattern for serial code configuration values?
I didn't get what you meant under "standard" here.
IO space limit comes from generic
io.hheader and AFAIU is a hardware
limitation (outN (%dx), ...; inX (%dx); dx is 16 bit register).
Quoted 8 lines
Quoted 4 lines
Using mmio8 out of the IO space is dictated by the (modern) x86 platforms with non-standard (okay, high speed) UART location in address
space.So I was wondering whether we should just make mmio configuration an explicit
parameter instead of a 'range hack'.
I _think_ it can be done later without breaking any existed configurations.
Quoted 6 lines
Since we are introducing something entirely new the choice is ours.
Doing it that way would technically be cleaner, as, at least theoretically,
there could be platforms with mmio addresses below 64k physical, right?
Correct, though we are talking about x86 world where I have no example like this. Either we have LPC ports (I/O 0x3f8 and alike) or HS UARTS on higher MMIO addresses. Note, that PCI code guarantees that range bump as well when resources would be allocated for unassigned, by firmware, PCI UART controllers.
Quoted 3 lines
It's also more self-documenting if the new configuration/parameter says 'mmio'
explicitly.
I would look at it, though it might make things much more complicated to implement. And yes, it wouldn't reduce fragility of the parser anyway.
Perhaps we can unify earlycon parser with earlyprintk one (not sure if it's possible since this nice trick with sharing same code between compressed and boot code).
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
PATCH 5/6 x86/boot: Allow longer parameter list for earlyprintk
In reply to Andy ShevchenkoAllow longer parameter list for earlyprintk to support new coming parameters.
No functional change intended.
--- arch/x86/boot/early_serial_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/early_serial_console.c +1 -1
@@ -90,7 +90,7 @@ static void early_serial_init(unsigned long port, int baud)static void parse_earlyprintk (void ) {int baud =DEFAULT_BAUD ; -char arg[32 ]; +char arg[64 ];int pos =0 ;unsigned long port =0 ;
Signature · 1 line
2.15.1
Re: [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk
Quoted 15 lines · Andy Shevchenko
Allow longer parameter list for earlyprintk to support new coming parameters.
No functional change intended.
Signed-off-by Andy Shevchenko <[email protected]>--- arch/x86/boot/early_serial_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/boot/early_serial_console.c +0
-0
arch/x86/boot/early_serial_console.c static void early_serial_init(unsigned long port, int baud) · line 95
Quoted 7 lines
arch/x86/boot/early_serial_console.c +1
-1@@ -90,7 +90,7 @@ static void early_serial_init(unsigned long port, int baud)static void parse_earlyprintk (void ) {int baud =DEFAULT_BAUD ; -char arg[32 ]; +char arg[64 ];int pos =0 ;unsigned long port =0 ;
BTW., what happens if the parsed string is longer than this buffer?
Thanks,
Ingo
Re: [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk
Quoted 8 lines · Ingo Molnar
Quoted 4 lines · Andy Shevchenko
Allow longer parameter list for earlyprintk to support new coming parameters.
No functional change intended.
BTW., what happens if the parsed string is longer than this buffer?
It will be cut up to 63 characters IIUC.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk
Quoted 11 lines · Andy Shevchenko
Quoted 8 lines · Ingo Molnar
Quoted 4 lines · Andy Shevchenko
Allow longer parameter list for earlyprintk to support new coming parameters.
No functional change intended.
BTW., what happens if the parsed string is longer than this buffer?
It will be cut up to 63 characters IIUC.
Ok, that's fine!
Could you please add a comment that explains the limit and the (benign) effects if we go past it?
Thanks,
Ingo
Re: [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk
Quoted 13 lines · Ingo Molnar
Quoted 11 lines · Andy Shevchenko
Quoted 9 lines · Ingo Molnar
Quoted 5 lines · Andy Shevchenko
Allow longer parameter list for earlyprintk to support new coming
parameters.No functional change intended.
BTW., what happens if the parsed string is longer than this buffer?
Quoted 7 lines
Quoted 1 line
It will be cut up to 63 characters IIUC.
Ok, that's fine!
Could you please add a comment that explains the limit and the (benign) effects if
we go past it?
Will do.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
PATCH 6/6 x86/boot: Support nocfg parameter for earlyprintk
In reply to Andy ShevchenkoIf by BIOS or by other means serial port is configured user might want to skip reconfiguration in the boot code.
Add support of 'nocfg' parameter to earlyprintk.
--- arch/x86/boot/early_serial_console.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-)
arch/x86/boot/early_serial_console.c +21 -10
@@ -67,7 +67,7 @@ static void early_serial_configure(unsigned long port, int baud)serial_out (port,LCR , c & ~DLAB ); } -static void early_serial_init (unsigned long port,int baud) +static void early_serial_init (unsigned long port,int baud,bool configure) {/* Assign serial I/O accessors */ if (port >IO_SPACE_LIMIT ) {
@@ -82,7 +82,8 @@ static void early_serial_init(unsigned long port, int baud)return ; } -early_serial_configure (port, baud); +if (configure) +early_serial_configure (port, baud); early_serial_base = port; }
@@ -93,6 +94,7 @@ static void parse_earlyprintk(void)char arg[64 ];int pos =0 ;unsigned long port =0 ; +bool configure = true;if (cmdline_find_option ("earlyprintk" , arg,sizeof arg) >0 ) {char *e;
@@ -133,12 +135,16 @@ static void parse_earlyprintk(void)if (arg[pos] ==',' ) pos++; - baud =simple_strtoull (arg + pos, &e,0 ); -if (baud ==0 || arg + pos == e) - baud =DEFAULT_BAUD ; +if (strncmp (arg + pos,"nocfg" ,5 )) { + baud =simple_strtoull (arg + pos, &e,0 ); +if (baud ==0 || arg + pos == e) + baud =DEFAULT_BAUD ; + }else { + configure = false; + } } -early_serial_init (port, baud); +early_serial_init (port, baud, configure); }#define BASE_BAUD (1843200/16)
@@ -162,6 +168,7 @@ static void parse_console_uart8250(void)char optstr[64 ], *options;int baud =DEFAULT_BAUD ;unsigned long port =0 ; +bool configure = true;/* * console=uart8250,io,0x3f8,115200n8
@@ -179,12 +186,16 @@ static void parse_console_uart8250(void)else return ; -if (options && (options[0 ] ==',' )) - baud =simple_strtoull (options +1 , &options,0 ); -else +if (options[0 ] ==',' ) { +if (strncmp (options +1 ,"nocfg" ,5 )) + baud =simple_strtoull (options +1 , &options,0 ); +else + configure = false; + }else { baud =probe_baud (port); + } -early_serial_init (port, baud); +early_serial_init (port, baud, configure); }void console_init (void )
Signature · 1 line
2.15.1
Re: [PATCH v1 6/6] x86/boot: Support nocfg parameter for earlyprintk
Quoted 33 lines · Andy Shevchenko
arch/x86/boot/early_serial_console.c +9
-4@@ -133,12 +135,16 @@ static void parse_earlyprintk(void)if (arg[pos] ==',' ) pos++; - baud =simple_strtoull (arg + pos, &e,0 ); -if (baud ==0 || arg + pos == e) - baud =DEFAULT_BAUD ; +if (strncmp (arg + pos,"nocfg" ,5 )) { + baud =simple_strtoull (arg + pos, &e,0 ); +if (baud ==0 || arg + pos == e) + baud =DEFAULT_BAUD ; + }else { + configure = false; + } } -early_serial_init (port, baud); +early_serial_init (port, baud, configure); }#define BASE_BAUD (1843200/16)@@ -162,6 +168,7 @@ static void parse_console_uart8250(void)char optstr[64 ], *options;int baud =DEFAULT_BAUD ;unsigned long port =0 ; +bool configure = true;/* * console=uart8250,io,0x3f8,115200n8 @@ -179,12 +186,16 @@ static void parse_console_uart8250(void)else return ;
arch/x86/boot/early_serial_console.c static void parse_console_uart8250(void) · line 195
Quoted 10 lines
arch/x86/boot/early_serial_console.c +6
-3-if (options && (options[0 ] ==',' )) - baud =simple_strtoull (options +1 , &options,0 ); -else +if (options[0 ] ==',' ) { +if (strncmp (options +1 ,"nocfg" ,5 )) + baud =simple_strtoull (options +1 , &options,0 ); +else + configure = false; + }else { baud =probe_baud (port);
These code patters seem very similar - could a common function be factored out, to simplify future changes (such as the one done here)?
Thanks,
Ingo
Re: [PATCH v1 6/6] x86/boot: Support nocfg parameter for earlyprintk
Quoted 35 lines · Ingo Molnar
Quoted 33 lines · Andy Shevchenko
arch/x86/boot/early_serial_console.c +9
-4@@ -133,12 +135,16 @@ static void parse_earlyprintk(void)if (arg[pos] ==',' ) pos++; - baud =simple_strtoull (arg + pos, &e,0 ); -if (baud ==0 || arg + pos == e) - baud =DEFAULT_BAUD ; +if (strncmp (arg + pos,"nocfg" ,5 )) { + baud =simple_strtoull (arg + pos, &e,0 ); +if (baud ==0 || arg + pos == e) + baud =DEFAULT_BAUD ; + }else { + configure = false; + } } -early_serial_init (port, baud); +early_serial_init (port, baud, configure); }#define BASE_BAUD (1843200/16)@@ -162,6 +168,7 @@ static void parse_console_uart8250(void)char optstr[64 ], *options;int baud =DEFAULT_BAUD ;unsigned long port =0 ; +bool configure = true;/* * console=uart8250,io,0x3f8,115200n8 @@ -179,12 +186,16 @@ static void parse_console_uart8250(void)else return ;
Quoted 15 lines
arch/x86/boot/early_serial_console.c static void parse_console_uart8250(void) · line 195
Quoted 11 lines
arch/x86/boot/early_serial_console.c +6
-3-if (options && (options[0 ] ==',' )) - baud =simple_strtoull (options +1 , &options,0 ); -else +if (options[0 ] ==',' ) { +if (strncmp (options +1 ,"nocfg" ,5 )) + baud =simple_strtoull (options +1 , &options,0 ); +else + configure = false; + }else { baud =probe_baud (port);These code patters seem very similar - could a common function be factored out, to
simplify future changes (such as the one done here)?
Need to think about. Moreoever, arch/x86/kernel/early_print.c contains even more duplication, though I understand why it's split to different folders.
And on top of that we have earlycon (which indeed would be more preferable solution). Perhaps, instead of playing with earlyprintk at boot stage we might parse earlycon option that more flexible?
P.S. In any choice at least patch 1 (and maybe patch 2) would be needed.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v1 6/6] x86/boot: Support nocfg parameter for earlyprintk
Quoted 56 lines · Andy Shevchenko
Quoted 35 lines · Ingo Molnar
Quoted 33 lines · Andy Shevchenko
arch/x86/boot/early_serial_console.c +9
-4@@ -133,12 +135,16 @@ static void parse_earlyprintk(void)if (arg[pos] ==',' ) pos++; - baud =simple_strtoull (arg + pos, &e,0 ); -if (baud ==0 || arg + pos == e) - baud =DEFAULT_BAUD ; +if (strncmp (arg + pos,"nocfg" ,5 )) { + baud =simple_strtoull (arg + pos, &e,0 ); +if (baud ==0 || arg + pos == e) + baud =DEFAULT_BAUD ; + }else { + configure = false; + } } -early_serial_init (port, baud); +early_serial_init (port, baud, configure); }#define BASE_BAUD (1843200/16)@@ -162,6 +168,7 @@ static void parse_console_uart8250(void)char optstr[64 ], *options;int baud =DEFAULT_BAUD ;unsigned long port =0 ; +bool configure = true;/* * console=uart8250,io,0x3f8,115200n8 @@ -179,12 +186,16 @@ static void parse_console_uart8250(void)else return ;Quoted 15 lines
arch/x86/boot/early_serial_console.c static void parse_console_uart8250(void) · line 195
Quoted 11 lines
arch/x86/boot/early_serial_console.c +6
-3-if (options && (options[0 ] ==',' )) - baud =simple_strtoull (options +1 , &options,0 ); -else +if (options[0 ] ==',' ) { +if (strncmp (options +1 ,"nocfg" ,5 )) + baud =simple_strtoull (options +1 , &options,0 ); +else + configure = false; + }else { baud =probe_baud (port);These code patters seem very similar - could a common function be factored out, to
simplify future changes (such as the one done here)?Need to think about. Moreoever,
arch/x86/kernel/early_print.ccontains even more duplication, though I understand why it's split to different folders.
Quoted 5 lines
And on top of that we have earlycon (which indeed would be more preferable solution). Perhaps, instead of playing with earlyprintk at boot stage we might parse earlycon option that more flexible?
P.S. In any choice at least patch 1 (and maybe patch 2) would be needed.
I'm fine with your current approach - and earlyprintk is preferred by many kernel developers. Was just wondering how hard it would be to create a common parser - and whether that's desirable at all (it might not be).
Thanks,
Ingo