Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2003 17:30:40 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Nicolas Souchu <nsouch@free.fr>
Cc:        arch@FreeBSD.ORG
Subject:   Re: the mythical syscons redesign document ( was Re: Porting wscons )
Message-ID:  <20030123063040.GA16266@cirb503493.alcatel.com.au>
In-Reply-To: <20030122223626.B8449@armor.fastether>
References:  <20030122010246.52789.qmail@web13404.mail.yahoo.com> <1043236066.28124.6.camel@builder02.qubesoft.com> <20030122223626.B8449@armor.fastether>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 22, 2003 at 10:36:26PM +0100, Nicolas Souchu wrote:
>On Wed, Jan 22, 2003 at 11:47:46AM +0000, Doug Rabson wrote:
>> The main sticking point for this stuff is that console is needed before
>> the device tree is probed.
>
>The approach of KGI is to provide a very basic/minimal driver for console boot
>that can be overlaped later by fully probed graphic board drivers. This is
>somehow how VGA adapter is organized, with the video_switch used immediatly
>and later the vga_isa.c glue-code for newbus full attachement.

I think you've missed the point of Doug's quoted comment.  During the
system boot, the kernel determines all the attached devices by
starting with a hardware-dependent list of known busses and then
working through all the busses looking for devices and bridges to
other busses.  When all this is finished, each attached device is
known by an address within a parent bus.  All the newbus I/O functions
require this logical descriptor - amongst other things, it specifies
how to interpret the address and actually perform physical I/O to the
hardware.

The console devices represent a special case: The address(es) of the
console are either implicitly hard-wired (eg a VGA device lives at
specific I/O addresses on the [primary] ISA bus) or passed to the
kernel by the firmware (eg Alpha SRM) as a physical address (eg bus,
slot, address).  The problem is that:
1) you can't portably perform I/O via the physical address
2) you can't translate the physical address into a logical descriptor
   until the device tree is probed
3) you need to be able to perform console writes (at least) before the
   device tree is probed.

The existing console code gets around this by being excessively chummy
with the hardware (and I gather KGI works the same way).  The downside
is that this is very non-portable - you need separate low-level console
code for each architecture and for each different possible console
device.

Peter

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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