Re: New-bus unit wiring via hints..

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: John Baldwin
Date: Monday, October 15, 2007 - 12:10 pm

On Monday 15 October 2007 01:53:49 pm Marcel Moolenaar wrote:

Actually, the patch removes a kludge from sio because of this (sio(4) 
currently tries to keep sio0 and sio1 "free" for non-PCI devices in the 
sio_pci attachment, but with this patch to make new-bus always honor hints, 
sio0 and sio1 never get used by a sio part on a PCI bus).


Note that PCs do still have an ISA DMA controller that the fdc(4) driver uses.


I see ACPI as a way to enumerate devices on "dumb" busses.  For example, I 
could see ACPI enumerating devices on other non-ISA busses, like an IPMI 
controller on an I2C bus.  That's not an ACPI device now is it?

Put another way, look at openfirmware which to my understanding includes a 
device tree/namespace with properties about devices.  (I think at least some 
sparc systems use OFW info to route interrupts for example.)  We don't make 
those devices live an on OFW bus though, they live on PCI busses, sbus 
busses, etc.  ACPI to me is much more of a firmware than a bus.  There are 
some devices (PCI links, acpi_ec, batteries, etc.) that are only enumerated 
via ACPI, and so we hang them off of acpi0 for lack of a better place to put 
them, and we leave ISA PNPBIOS devices hung off of acpi0 b/c it would be a 
bit of work to move them under the isa0 device.


*sigh*  FreeBSD already just accepts the current configuration of PNPBIOS 
devices, and yes, I do think that FreeBSD should trust the resources coming 
from the BIOS (ACPI or PNPBIOS, even if my laptop's PNPBIOS has the wrong IRQ 
for my laptop's COM1 (but ACPI gets it right)).  However, in the case that 
COM1 doesn't have the same resources as the "sio0" hints it ends up as sio2 
rather than sio0.  In your world where unit numbers are meaningless why do 
you care if it's sio2 rather than sio0?  The bug complaints I've seen on the 
lists and in various places are all about how ACPI gets it backwards and 
confuses things.  How do propose to fix the problem of ACPI listing COM2 
before COM1 short of completely rearchitecting how we name devices and expose 
them to userland?

Besides which this is all _optional_ since users can adjust hints however they 
see fit.


Hmm, ok.  So are you thinking of a registry ala Windows to remember previous 
bindings?  /dev/<some uuid-ish thing but longer> (what Windows does) probably 
wouldn't be considered usable by most folks, so you'd have to make aliases, 
but then you are back to how do "wire" the aliases?  And how should the 
kernel figure out which devices are console devices?

-- 
John Baldwin
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
New-bus unit wiring via hints.., John Baldwin, (Thu Oct 11, 2:41 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Thu Oct 11, 2:59 pm)
Re: New-bus unit wiring via hints.., Peter Wemm, (Thu Oct 11, 9:01 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Thu Oct 11, 11:23 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Fri Oct 12, 11:09 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Fri Oct 12, 12:49 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Fri Oct 12, 1:20 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Fri Oct 12, 2:17 pm)
Re: New-bus unit wiring via hints.., 韓家標 Bill Hacker, (Fri Oct 12, 11:01 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Mon Oct 15, 9:16 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Mon Oct 15, 10:53 am)
Re: New-bus unit wiring via hints.., John Baldwin, (Mon Oct 15, 12:10 pm)
Re: New-bus unit wiring via hints.., Adrian Chadd, (Wed Oct 17, 4:08 am)
Re: New-bus unit wiring via hints.., John-Mark Gurney, (Sat Oct 27, 10:42 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Sat Oct 27, 10:48 am)
Re: New-bus unit wiring via hints.., John-Mark Gurney, (Sat Oct 27, 10:58 am)
Re: New-bus unit wiring via hints.., Erik Trulsson, (Sat Oct 27, 11:53 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Sat Oct 27, 12:09 pm)
Re: New-bus unit wiring via hints.. , Kevin Oberman, (Sat Oct 27, 12:40 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Sat Oct 27, 1:57 pm)
Re: New-bus unit wiring via hints.., Astrodog, (Sat Oct 27, 2:19 pm)
Re: New-bus unit wiring via hints.. , Kevin Oberman, (Sat Oct 27, 2:24 pm)
Re: New-bus unit wiring via hints.., 韓家標 Bill Hacker, (Sat Oct 27, 2:46 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Sat Oct 27, 3:04 pm)
Re: New-bus unit wiring via hints.. , Kevin Oberman, (Sun Oct 28, 12:02 am)
Re: New-bus unit wiring via hints.. , Kevin Oberman, (Sun Oct 28, 12:07 am)
Re: New-bus unit wiring via hints.., 韓家標 Bill Hacker, (Sun Oct 28, 1:16 am)
Re: New-bus unit wiring via hints.., Robert Backhaus, (Sun Oct 28, 4:08 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Sun Oct 28, 8:50 pm)
Re: New-bus unit wiring via hints.., Daniel O'Connor, (Mon Oct 29, 8:50 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Tue Oct 30, 7:15 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Tue Oct 30, 10:07 am)
Re: New-bus unit wiring via hints.., John Baldwin, (Tue Oct 30, 10:48 am)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Tue Oct 30, 1:00 pm)
Re: New-bus unit wiring via hints.., John Baldwin, (Tue Oct 30, 1:56 pm)
Re: New-bus unit wiring via hints.., Marcel Moolenaar, (Tue Oct 30, 4:20 pm)