HomeFreeBSD

ofwbus: remove handling of resources from ofwbus

Description

ofwbus: remove handling of resources from ofwbus

The architecture nexus should handle allocation and release of memory and
interrupts. This is to ensure that system-wide resources such as these
are available to all devices, not just children of ofwbus0.

On powerpc this moves the ownership of these resources up one level,
from ofwbus0 to nexus0. Other architectures already have the required
logic in their nexus implementation, so this eliminates the duplication
of resources. An implementation of nexus_adjust_resource() is added for
arm, arm64, and riscv.

As noted by ian@ in the review, resource handling was the main bit of
logic distinguishing ofwbus from simplebus. With some attention to
detail, it should be possible to merge the two in the future.

Co-authored by: mhorne
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D30554

Details

Provenance
ehem_freebsd_m5p.comAuthored on Feb 8 2023, 8:17 PM
mhorneCommitted on Feb 8 2023, 8:50 PM
Differential Revision
D30554: ofwbus: remove handling of resources from ofwbus
Parents
rG1d03c3578d05: arm: add an interrupt rman to nexus
Branches
Unknown
Tags
Unknown