Re: [PATCH] x86: Setup early console as early as possible

From: Yinghai Lu
Date: Mon Jul 12 2010 - 12:24:46 EST


On 07/12/2010 08:47 AM, H. Peter Anvin wrote:
> On 07/12/2010 01:58 AM, Pekka Enberg wrote:
>> Hi Yinghai,
>>
>> Yinghai Lu wrote:
>>> Analyze "console=uart8250,io,0x3f8,115200n8" in
>>> i386_start_kernel/x86_64_start_kernel,
>>> and call setup_early_serial8250_console() to init early serial console.
>>>
>>> only can handle io port kind of 8250. because mmio need ioremap.
>>>
>>> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>>
>> What's the purpose of this patch? Does it make my early boot I/O patch
>> obsolete?
>>
>> Pekka
>
> No, they're complementary. Your patch serial-port enables the RM
> kernel, whereas Yinghai pushes the initialization earlier in the PM kernel.

yes. cover more range.

Can you consider to ask Pekka to anaylze "console=uart8250,io, 0x3f8,115200n8" instead?

it looks like we can remove "earlyprintk=ttyS0,115200", or "earlyprintk=serial" etc.

earlycon=uart8250 or console=uart8250 should be better than earlyprintk.
because it is shared between different archs already.

>
> Incidentally, Yinghai: it would be possible to push even an MMIO
> reference earlier by reserving a fixmap slot for the early console. I'm
> not sure if it's worth it, though.

in setup_arch() for x86, now we have

/* VMI may relocate the fixmap; do this before touching ioremap area */
vmi_init();

/* OFW also may relocate the fixmap */
olpc_ofw_detect();

early_trap_init();
early_cpu_init();
early_ioremap_init()

so may need to move these
vmi_init()
olpc_ofw_detect()
early_ioremap_init()

to i386_start_kernel(), x86_start_kernel()

may be not worth it at this time, could do that later if needed.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/