freebsd-skq/sys/mips
landonf 982e7e3df8 Implement a generic bhnd(4) device enumeration table API.
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 also 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 commit.


- Defined new bhnd_erom_if interface for bhnd(4) device enumeration, along
  with bcma(4) and siba(4)-specific implementations.
- 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 classes 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 previous MIPS-specific
  device enumeration implementation.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7748
2016-09-03 23:57:17 +00:00
..
adm5120 Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
alchemy Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
atheros [arge] add some extra MDIO debugging support 2016-08-05 17:16:35 +00:00
beri Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
broadcom Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
cavium sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
conf [mips] move AR91XX_BASE to std.AR91XX. 2016-08-28 04:10:23 +00:00
gxemul Add 32-bit support for Gxemul's oldtestmips machine emulation 2013-09-04 20:34:36 +00:00
idt Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
include [mips] add support for using the MIPS user register for TLS data. 2016-08-07 01:29:55 +00:00
malta Fixed FreeBSD/mips MALTA support for QEMU 2016-06-29 23:33:44 +00:00
mediatek Build etherswitch support for appropriate Ralink/Mediatek SoCs 2016-05-25 06:47:28 +00:00
mips Remove support for idle page zeroing. 2016-09-03 20:38:13 +00:00
nlm Consistently use device_t 2016-08-09 19:32:06 +00:00
rmi Consistently use device_t 2016-08-09 19:32:06 +00:00
rt305x Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
sibyte sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00