On 5/21/07, Bjorn Helgaas <[email protected]> wrote:
> > with console=uart, you need to call early_serial_console_init
> > explictly in your arch setup_arch to get early console.
>
> Can't we just do:
>
> early_param("console", setup_early_console);
>
please check following patch. it will take
console=early8250,io,0x3f8,9600n8
You may need to remove early_serial_console_init in your ia64
setup_arch, and some dummy function for set_fixmap_nocache, and
__fix_to_virt in your asm-ia64/fixmap.h
YH
[PATCH]serial: make early_uart to use early_param instead of console_initcall
Make early_uart to use early_param, so uart console can be used earlier.
Make it to be bootconsole with CON_BOOT flag, so can use console handover
feature. and it will switch to corresponding normal serial console
automatically.
new command line will be
earlycon=early8250,io,0x3f8,9600n8
earlycon=early8250,mmio,0xff5e0000,115200n8
or
console=early8250,io,0x3f8,9600n8
console=early8250,mmio,0xff5e0000,115200n8
it will print in very early stage
Early serial console at I/O port 0x3f8 (options '9600n8')
later for console it will print
console handover: boot [uart0] -> real [ttyS0]
Signed-off-by: <[email protected]>
On Monday 21 May 2007 02:36:16 pm Yinghai Lu wrote:
> On 5/21/07, Bjorn Helgaas <[email protected]> wrote:
> > > with console=uart, you need to call early_serial_console_init
> > > explictly in your arch setup_arch to get early console.
> >
> > Can't we just do:
> >
> > early_param("console", setup_early_console);
>
> please check following patch. it will take
> console=early8250,io,0x3f8,9600n8
How about just plain "console=8250,io,..."?
> You may need to remove early_serial_console_init in your ia64
> setup_arch, and some dummy function for set_fixmap_nocache, and
> __fix_to_virt in your asm-ia64/fixmap.h
I don't want to add asm-ia64/fixmap.h with dummy definitions
just for this.
Can we add this:
asm-ia64/io.h: #define bt_ioremap ioremap
asm-x86_64/io.h: #define bt_ioremap early_ioremap
and use bt_ioremap instead?
> new command line will be
>
> earlycon=early8250,io,0x3f8,9600n8
> earlycon=early8250,mmio,0xff5e0000,115200n8
> or
> console=early8250,io,0x3f8,9600n8
> console=early8250,mmio,0xff5e0000,115200n8
If you can make "console=early8250" work, we don't need
"earlycon=early8250", do we?
Your patch adds trailing whitespace and a few cases of"<space><tab>".
I use this in my .vimrc to catch these:
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$\| \+\ze\t/
On 5/21/07, Bjorn Helgaas <[email protected]> wrote:
>
> How about just plain "console=8250,io,..."?
then the
__setup("console", setup_console);
setup_console will think their is one ttyS8, and then ...
How about console=uart8250,...?
> I don't want to add asm-ia64/fixmap.h with dummy definitions
> just for this.
>
> Can we add this:
>
> asm-ia64/io.h: #define bt_ioremap ioremap
> asm-x86_64/io.h: #define bt_ioremap early_ioremap
>
> and use bt_ioremap instead?
I will try it.
>
> > new command line will be
> >
> > earlycon=early8250,io,0x3f8,9600n8
> > earlycon=early8250,mmio,0xff5e0000,115200n8
> > or
> > console=early8250,io,0x3f8,9600n8
> > console=early8250,mmio,0xff5e0000,115200n8
>
> If you can make "console=early8250" work, we don't need
> "earlycon=early8250", do we?
actually I modify init/main.c
diff --git a/init/main.c b/init/main.c
index 1940fa7..07dad53 100644
--- a/init/main.c
+++ b/init/main.c
@@ -452,7 +452,9 @@ static int __init do_early_param(char *param, char *val)
struct obs_kernel_param *p;
for (p = __setup_start; p < __setup_end; p++) {
- if (p->early && strcmp(param, p->str) == 0) {
+ if ((p->early && strcmp(param, p->str) == 0) ||
+ (strcmp(param,"console")==0 && strcmp(p->str, "earlycon")==0)
+ ) {
if (p->setup_func(val) != 0)
printk(KERN_WARNING
"Malformed early option '%s'\n", param);
so make earlycon early_param setup will check console command line.
>
> Your patch adds trailing whitespace and a few cases of"<space><tab>".
> I use this in my .vimrc to catch these:
>
> highlight WhitespaceEOL ctermbg=red guibg=red
> match WhitespaceEOL /\s\+$\| \+\ze\t/
>
I will check it.
YH
On 5/21/07, Bjorn Helgaas <[email protected]> wrote:
>
> I don't want to add asm-ia64/fixmap.h with dummy definitions
> just for this.
>
> Can we add this:
>
> asm-ia64/io.h: #define bt_ioremap ioremap
> asm-x86_64/io.h: #define bt_ioremap early_ioremap
>
> and use bt_ioremap instead?
>
I can not use early_ioremap in x86_64. it is need to place after
init_memory_mapping in setup_arch. and parse_early_param is before
that.
YH
> On 5/21/07, Bjorn Helgaas <[email protected]> wrote:
> >
> > I don't want to add asm-ia64/fixmap.h with dummy definitions
> > just for this.
> >
> > Can we add this:
> >
> > asm-ia64/io.h: #define bt_ioremap ioremap
> > asm-x86_64/io.h: #define bt_ioremap early_ioremap
> >
> > and use bt_ioremap instead?
> >
Please check if it work with ia64.
i add fix_ioremap in
include/asm-x86_64/io.h
include/asm-i386/io.h
include/asm-ia64/io.h
command line will be
console=uart8250,io,0x3f8,9600n8
console=uart8250,mmio,0xffe50000,115200n8
YH