This defines a new bhnd_erom_if API, providing a common interface to device
enumeration on siba(4) and bcma(4) devices, for use both in the bhndb bridge
and SoC early boot contexts, and migrates mips/broadcom over to the new API.
This replaces the previous adhoc device enumeration support implemented for
mips/broadcom.
Migration of bhndb to the new API will be implemented in a follow-up delta;
this will allow us to perform full bhndb bridge configuration *prior* to
actually attaching and enumerating the bhnd(4) child device, eliminating a
cyclic dependency that currently exists, and allowing us to safely allocate
bus-level agent/device resources during bhnd(4) bus enumeration (something
that's required for the bhnd(4) interrupt handling).
Changes:
- Defined a new bhnd_erom_if interfaces for bhnd(4) device enumeration.
- Migrated the bcma_erom API to the new bhnd_erom_if interface.
- Added a new siba(4) implementation of bhnd_erom_if.
- Fixed a minor bug in bhndb that logged an error when we attempted to map the full siba(4) bus space (18000000-17FFFFFF) in the siba EROM parser.
- Reverted use of the resource's start address as the ChipCommon enum_addr in bhnd_read_chipid(). When called from bhndb, this address is found within the host address space, resulting in an invalid bridged enum_addr.
- Added support for falling back on standard bus_activate_resource() in bhnd_bus_generic_activate_resource(), enabling allocation of the bhnd_erom's bhnd_resource directly from a nexus-attached bhnd(4) device.
- Removed BHND_BUS_GET_CORE_TABLE(); it has been replaced by the erom API.
- Added support for statically initializing bhnd_erom instances, for use prior to malloc availability. The statically allocated buffer size is verified both at runtime, and via a compile-time assertion (see BHND_EROM_STATIC_BYTES).
- bhnd_erom instances are registered within a module via a linker set, allowing mips/broadcom to probe available EROM parser instances without creating a strong reference to bcma/siba-specific symbols.
- Migrated mips/broadcom to bhnd_erom_if, replacing the bcm_bcma/bcm_siba-specific implementations.