Re: puc(4) man page update?



On Friday 04 July 2008 06:06:48 pm Marcel Moolenaar wrote:

On Jul 4, 2008, at 2:33 PM, John Baldwin wrote:

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.

That's because sio(4) compiles-in the acpi bus attachment
even if acpi is not compiled-in. That's cheating :-)

No, that's how new-bus works. :) It's perfectly fine to do that. The
attachments get bound at runtime. This is actually an important feature.
It's part of why you can have multiple drivers with the same name (e.g.
the "generic", "ACPI", and "OpenFirmware" PCI bus drivers).

--
John Baldwin
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: puc(4) man page update?
    ... used before pre-loaded modules are linked and/or usable. ... So, currently low-level console drivers, such as dcons, ... attach must be compiled into the kernel as well. ... Also note that the hints for sio0 aren't actually used, ...
    (freebsd-current)
  • Re: Reading acpi memory from a driver attached to hostb
    ... John Baldwin writes: ... That should basically work since almost everything is a child of acpi. ... you don't need to "attach" to acpi just allocate ...
    (freebsd-hackers)
  • Re: Code review
    ... On Tuesday 26 August 2008 03:23:57 am M. Warner Losh wrote: ... John Baldwin writes: ... just use a separate timer for the twister stuff. ... Also, if you are only doing this during attach or interface up, it might be ...
    (freebsd-arch)
  • Re: Code review
    ... On Tuesday 26 August 2008 03:23:57 am M. Warner Losh wrote: ... John Baldwin writes: ... just use a separate timer for the twister stuff. ... Also, if you are only doing this during attach or interface up, it might be ...
    (freebsd-net)