All of lore.kernel.org
 help / color / mirror / Atom feed
* serial console in early boot
@ 2014-08-24 22:02 John de la Garza
  2014-08-25  1:38 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 2+ messages in thread
From: John de la Garza @ 2014-08-24 22:02 UTC (permalink / raw)
  To: kernelnewbies

I'm using qemu like this:

qemu  -nographic -kernel /home/john/dev-linux/arch/x86/boot/bzImage \
-append "console=ttyS0"

I noticed that I can do a printk in arch/x86/kernel/head64.c right
after the call to clear_bss (line 162 in x86_64_start_kernel).

I see the output of the printk on the serial console.

This seems to be before any uart/console has been initialized.  I'm curious
how the printk can make it to the serial console.

Anyone know why printk is sending output to the serial console this
early in the boot process?

I would expect that the serial line wouldn't be ready and that qemu
would behave like actual hardware.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* serial console in early boot
  2014-08-24 22:02 serial console in early boot John de la Garza
@ 2014-08-25  1:38 ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 2+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-08-25  1:38 UTC (permalink / raw)
  To: kernelnewbies

On Sun, 24 Aug 2014 18:02:29 -0400, John de la Garza said:

> I would expect that the serial line wouldn't be ready and that qemu
> would behave like actual hardware.

Why?

QEMU knows it's running as a user process.  Do you see anywhere in the
documentation that it guarantees emulation of real hardware? (Hint - it's
connecting your earlyprintk console to stdout, and as long as it's doing that,
there's no reason for it to *not* go the extra step and provide emulation
of the UART so you can debug early kernel problems....)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140824/bf920b8c/attachment.bin 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-25  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-24 22:02 serial console in early boot John de la Garza
2014-08-25  1:38 ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.