Re: [DOC] Debugging early kernel hangs

From: Oliver Xymoron (oxymoron@waste.org)
Date: Fri Sep 22 2000 - 12:51:14 EST


On Fri, 22 Sep 2000, Keith Owens wrote:

> On Thu, 21 Sep 2000 18:54:33 -0400 (EDT),
> Byron Stanoszek <gandalf@winds.org> wrote:
> >On Fri, 22 Sep 2000, Keith Owens wrote:
> >> The idea is to write characters direct to the video screen during
> >> booting using a macro called VIDEO_CHAR.
> >
> >Why not just redirect printk() to output a string of characters one by one
> >using VIDEO_CHAR until the console subsystem is initialized. You can use a
> >statically defined int to keep track of what row & column you're on. There is
> >no need to be so cryptic about the readout.
>
> Overhead and difficulty to use from assembler. VIDEO_CHAR() generates
> a single mov instruction, calling printk and looping to do output does
> a lot more code. You can do the equivalent of VIDEO_CHAR direct from
> assembler without disturbing any registers, to call printk means saving
> registers around the call and constructing text strings in the
> assembler code.

It shouldn't be a big deal. It goes from a mov to a push/call. Readability
goes up enormously. I wrote a bootloader for an embedded box recently and
the first piece I wrote was an asm version of printf, followed by a
register dump (named doh).

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

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



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:27 EST