[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [DOC] Debugging early kernel hangs
On Fri, 22 Sep 2000, Keith Owens wrote:

> On Thu, 21 Sep 2000 18:54:33 -0400 (EDT),
> Byron Stanoszek <> 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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.032 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site