Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Sep 2007 12:46:13 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org
Subject:   Re: Replacing/enhancing kernel printf()
Message-ID:  <C75B4E27-E2BA-43CF-AFB6-C8104AAA6C72@mac.com>
In-Reply-To: <22166.1190488551@critter.freebsd.dk>
References:  <22166.1190488551@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sep 22, 2007, at 12:15 PM, Poul-Henning Kamp wrote:

> In message <FED4C690-E501-4F54-93AE-F5B75929BBA6@mac.com>, Marcel  
> Moolenaar wri
> tes:
>
>>>> Are you referring to:
>>>> http://lists.freebsd.org/mailman/htdig/freebsd-arch/2006-May/
>>>> 005224.html
>>
>> Let's define "the low-level console" as nothing more than a
>> switchboard.
>
> The reason I didn't go that route, is that the "streams"
> have vastly different sematics, some are even bidirectional.

The source vs. sink nomenclature can be confusing, but assuming
that all pipes/streams are bi-directional is probably a good way
to avoid mistakes. The kernel will ask for input if you boot with
-a, so even before we run /sbin/init we need a bi-directional
pipe.
Of course, display hardware does not allow for input in the same
way that a keyboard does not allow for output, but I'm not too
concerned about that. It'll fall into place all by itself. For
real hardware (i.e. displays, keyboards. etc), there's syscons
(or its replacement) that will provide the abstraction and create
a single sink into the switchboard. For the msgbuf, we simply
have no input coming from that sink ever...

I don't see how semantics differ though. Can you give an example?

> At the very least you need to think carefully about all of
> the four distinct phases:
>
> 	Before the kernel runs
> 	Kernel until /sbin/init
> 	/sbin/init and single user mode
> 	Multiuser mode.
>
> Lumping them all together is what we have today, which we
> both recognize as not the way to go.

Agreed. We should not lump them together. However, they are
interrelated, so we cannot treat them independently either.
The switchboard approach was a way to 1) untangle the low-
level console from /dev/console and 2) allow everything to
be interconnected in some form of shape without backchannels
and/or hooks.

-- 
Marcel Moolenaar
xcllnt@mac.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C75B4E27-E2BA-43CF-AFB6-C8104AAA6C72>