Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 1997 17:52:44 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        dgy@rtd.com, Shimon@i-Connect.Net
Cc:        bde@zeta.org.au, freebsd-hackers@freefall.freebsd.org
Subject:   Re: suggestion for kernel printk() ?
Message-ID:  <199701280652.RAA13038@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Yes.  But all of those mechanisms tie in to provide flow control for
>> regular console output functions.  Apparently, however, this happens
>> at a higher level than I had hoped/assumed (i.e. more stuff has to be
>> functional before this mechanism works).
>
>Unfortunately, this makes some sense, as there are no interrupts during
>some of this.  I solved this porblems on a SVR4.2 port by providing the
>UART witha polled mode.  Added a walloping 20 lines of code to the driver.
>What that means in a PC console I really do not know.  Real computers
>should have only serial consoles.  Preferebly an LA34.  Right? :-)

It takes 200 lines in sio.c..

>> > output.  No?  Maybe a (oops :-) SysV-like mechanism where print{kf} go
>to
>> > a circular buffer andanother mechanism dumps it to ``the console''.
>> > If you like ugly, (if memory serves), you can either pass an additional
>arg
>> > to the output routine (A la Linux) or designate the first character in
>the
>> > string to tell what to do, as in ~==console and buffer, !=bufferonly,
>etc.

In BSD, printf output goes to the message buffer and the console.  The
syscons driver also duplicates it in the scrollback buffer.  The problem
is getting at this output.  Scrollback doesn't work at the panic prompt.
I think it was broken when syscons started using timeouts for screen
updates.

>> I was suggesting having printk() examine the keyboard buffer for a pending
>
>I am so new to FreeBSD that I did not even see that there is a printk().
>How does that relate to printf() is see everywhere?

printk() doesn't exist.  There is also uprintf() for printing to the
controlling tty of the current process, tprintf() for printing to the
controlling terminal of the specified session, ttyprintf() for printing
to the specified terminal, and log() which prints to the console if
the log device is not open.  printf() and log() are supposed to work in
interrupt handlers so they normally have to use polled output.  The
others are higher level.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701280652.RAA13038>