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

(cherry picked from commit f9bdaab95ec469738fbfc1f0edd3e8c744b7f71f)

Details

Provenance
ehem_freebsd_m5p.comAuthored on Feb 8 2023, 8:17 PM
mhorneCommitted on Apr 17 2023, 4:04 PM
Differential Revision
D30554: ofwbus: remove handling of resources from ofwbus
Parents
rG5cdaedd8cc6a: physmem: add ram0 pseudo-driver
Branches
Unknown
Tags
Unknown