HomeFreeBSD

acpi: Cleanup handling of suballocated resources

Description

acpi: Cleanup handling of suballocated resources

For resources suballocated from the system resource rmans, handle
those in the ACPI bus driver without passing them up to the parent.
This means using bus_generic_rman_* for several bus methods for
operations on suballocated resources. For bus_map/unmap_resource,
find the system resource allocated from the parent bus (nexus) that
contains the range being mapped and request a mapping of that parent
resource.

This avoids a layering violation where nexus drivers were previously
asked to manage the activation and mapping of resources created
belonging to the ACPI resource managers.

Note that this does require passing RF_ACTIVE (with RF_UNMAPPED) when
allocating system resources from the parent.

While here, don't assume that the parent bus (nexus) provides a
resource list that sysres resources are placed on. Instead, create a
dedicated resource_list in the ACPI bus driver's softc to hold sysres
resources.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43687

Details

Provenance
jhbAuthored on Feb 9 2024, 6:27 PM
Reviewer
imp
Differential Revision
D43687: acpi: Cleanup handling of suballocated resources
Parents
rG1fb5445206a5: acpi: Use bus_generic_alloc_resource instead of duplicating it
Branches
Unknown
Tags
Unknown