2581072f | 30-Oct-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Add another parameter to BUS_ADD_CHILD to allow children to inherit code from grandparents.
Formalize and document the IDENTIFY mechanism and actually use it properly to add PCI busses rather then t
Add another parameter to BUS_ADD_CHILD to allow children to inherit code from grandparents.
Formalize and document the IDENTIFY mechanism and actually use it properly to add PCI busses rather then the severe hacks that existed before.
Instead of attaching PCI busses (pcib) directly to nexus, create a pass-through bus layer under nexus called 'legacypci' and attach the PCI busses to that. Use the new BUS_ADD_CHILD and IVARS recursion capability to still allow the pcib's under legacypci to get nexus generated IVARS.
NOTE ON IVARS: These can be utterly confusing because a BUS device may manage and control the IVARS attached to its children. In addition, if the BUS method for the device accessing the IVARs does not properly match up with or recurse to the device that actually created the ivars, mass confusion can result. I have attempted to document the issue but XXX it needs some sanity check code.
Add a 'pcib_owner' global that is used to determine which of the several possible PCI mainbus subsystems actually own the PCI mainbus. This is not yet tied into ACPI but will be soon. No longer add legacy "pcib" busses if it is detected that another subsystem controls the mainbus. Before the busses were added but then simply not scanned later on, creating confusing pcibX designations. Now the busses aren't added... legacypci stops cold if it doesn't own the PCI mainbus. Get rid of the twisted checks for "pci" devices that used to handle this job.
Document many aspects of the PCI code and redo some of the APIs slightly to make them more obvious. In particular, document the odd fact that pci_*() accessor function actually operate on a pci function code based sub-device of the "pci" driver and call device_get_parent() to get to the pci" driver layer. This sub layer really needs its own formal designation.
Change "pciX" attachments to "pcibY" busses. Use the secondary bus id for 'X' and require it to be unique. Also reorder "pcibY" attachments so the physical bus number tends to (but is not guarenteed to be) the same 'Y' in pcibY.
Change IVARS access for bridges. Require that the device representing the "pcib" device be passed to pcib_get/set_*() routines instead of children of said device.
Add a function devclass_find_unit() to shortcut the more complex operation of locating the devclass by name and then getting the device relative to the devclass.
Add numerous bus_generic_*() BUS methods which now recurse through the parent instead of terminate with an error.
show more ...
|