Only attach device_t objects to ACPI devices with a _HID

John Baldwin jhb at freebsd.org
Wed Jun 15 20:00:12 UTC 2011


On Wednesday, June 15, 2011 12:48:09 pm Nate Lawson wrote:
> On Jun 15, 2011, at 6:57 AM, John Baldwin wrote:
> > What I am proposing to do is to change the ACPI bus driver to only add 
> > device_t objects for Device() nodes that have a _HID or _CID.  This should not 
> > break any devices that have a current driver, but it will avoid having ACPI 
> > attach to PCI devices.  This does mean that _CRS is currently ignored for PCI 
> > devices.  My feeling on that is that if we do feel that is important to 
> > reserve those resources, we should handle that in the ACPI PCI bus driver 
> > itself instead (it can examine _CRS for those devices and allocate resources
> > if we so choose).
> 
> While this should be fine for legacy devices, I do worry about other synthetic devices, such as CPUs, NUMA zones, etc. Would it be better just not 
to attach acpi device_t's to any nodes under PCI busses?

This is harder to arrange.  Note that the proposed patch only applies to a
Device(), not to Processor() or ThermalZone(), etc. objects.  I believe
though that all such things that you mentioned use either an object type other
than ACPI_TYPE_DEVICE, an entirely different table (MADT, SRAT, etc.), or a
Device() with a HID or CID.

> Also, it's still possible some PCI devices would have a CID, so you'd still have to handle this case, right?

Yes, and we already handle that case (there's an older tablet that hung a
system resource device off its PCI-ISA bridge).  In that case you still (as
now) end up with two device_t's, one attached to acpi0, the other attached
to the relevant PCI bus.


-- 
John Baldwin


More information about the freebsd-acpi mailing list