Page MenuHomeFreeBSD

Migrate bhndb(4) to the new bhnd_erom API.
ClosedPublic

Authored by landonf on Sep 3 2016, 2:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 12:07 AM
Unknown Object (File)
Feb 24 2024, 6:45 AM
Unknown Object (File)
Dec 20 2023, 1:06 AM
Unknown Object (File)
Dec 1 2023, 1:11 AM
Unknown Object (File)
Nov 9 2023, 3:18 AM
Unknown Object (File)
Nov 5 2023, 2:07 PM
Unknown Object (File)
Nov 4 2023, 4:43 AM
Unknown Object (File)
Nov 2 2023, 7:55 PM
Subscribers

Details

Summary

This adds support for probing and initializing bhndb(4) bridge state using
the bhnd_erom API, ensuring that full bridge configuration is available
*prior* to actually attaching and enumerating the bhnd(4) child device,
allowing us to safely allocate bus-level agent/device resources during bhnd(4)
bus enumeration (as required for bhnd(4) interrupt handling).

Changes:

  • Add a bhnd_erom_probe() method usable by bhndb(4). This is an analogue to the existing bhnd_erom_probe_static() method, and allows the bhndb bridge to discover the best available erom parser class prior to newbus probing of its children.
  • Add support for supplying identification hints when probing erom devices. This is required on early EXTIF-only chipsets, where chip identification registers are not available.
  • Migrate bhndb over to the new bhnd_erom API, using bhnd_core_info records rather than bridged bhnd(4) device_t references to determine the bridged chipsets' capability/bridge configuration.
  • We now require that the bhndb parent (e.g. if_bwn) supply a hardware priority table to the bridge. The default table is currently sufficient for our supported devices.
  • Drop the two-pass attach approach we used for compatibility with bhndb(4) in the bhnd(4) bus drivers, and instead perform bus enumeration immediately, and allocate bridged per-child bus-level resources during that enumeration.

Depends on D7748

Test Plan

Verified that platform/bus enumeration executes successfully on:

  • BCM43225 (wifi/bcma)
  • BCM4312 (wifi/siba)
  • BCM4716 (mips/bcma)
  • BCM5357 (mips/bcma)
  • BCM5365 (mips/siba)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

landonf retitled this revision from to Migrate bhndb(4) to the new bhnd_erom API..
landonf updated this object.
landonf edited the test plan for this revision. (Show Details)
landonf added reviewers: adrian, mizhka.
adrian edited edge metadata.
This revision is now accepted and ready to land.Sep 3 2016, 4:29 AM
This revision was automatically updated to reflect the committed changes.