Date: Fri, 4 Jul 2008 17:33:24 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org Cc: Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de>, Marcel Moolenaar <xcllnt@mac.com>, Dmitry Morozovsky <marck@rinet.ru> Subject: Re: puc(4) man page update? Message-ID: <200807041733.25301.jhb@freebsd.org> In-Reply-To: <22A6B038-44BB-4072-8A6E-8C1D5855CB14@mac.com> References: <20080701181358.GA93601@wep4017.physik.uni-wuerzburg.de> <20080704135827.H35668@woozle.rinet.ru> <22A6B038-44BB-4072-8A6E-8C1D5855CB14@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 July 2008 03:31:41 pm Marcel Moolenaar wrote: > > On Jul 4, 2008, at 2:59 AM, Dmitry Morozovsky wrote: > > > doesn't splitting uart out of kernel broke serial console? Last time > > I checked > > it did. > > Yes, it does. The serial console is setup/initialized and > used before pre-loaded modules are linked and/or usable. > We don't have the support in place that allows you to boot > without console until pre-loaded modules are initialized, > at which time add a low-level console device is setup. > It's not that hard to do, I think. > > So, currently low-level console drivers, such as dcons(4), > sio(4) and uart(4) need to be compiled into the kernel. > Consequently any devices/busses to which any of these can > attach must be compiled into the kernel as well. Of these > acpi(4) and puc(4) are good examples. acpi(4) is a good > example because we use hints to work around the issue and > have sio(4) attach to isa(4) instead... Actually, sio does attach to acpi0. What happens for sio is that the low-level console stuff is just doing bare-bones inb/outb anyway. sioX devices do attach to acpi0 though just fine. Note that in the common case acpi is a module on i386 yet it still manages to work fine. :) Also note that the hints for sio0 aren't actually used, just the 'flags' are applied. Thus, you can have: hint.sio.0.at="isa0" hint.sio.0.port="0x3f8" hint.sio.0.irq="4" hint.sio.0.flags=0x10 But if ACPI lists COM2 before COM1 in the namespace you end up with: sio0 at port 0x2f8 irq 3 (used as serial console!) sio1 at port 0x3f8 irq 4 This is why I wanted to wire devices using the resources in hints so that people would reliably get a serial console on COM1 == sio0 with the existing hints. As it is, people have to engage in far uglier hacks currently since there is no in-tree solution. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807041733.25301.jhb>