freebsd-dev/sys/dev/bwn
Landon J. Fuller 77cb4d3e50 bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding.
- Defined an abstract NVRAM I/O API (bhnd_nvram_io), decoupling NVRAM/SPROM
  parsing from the actual underlying NVRAM data provider (e.g. CFE firmware
  devices).
- Defined an abstract NVRAM data API (bhnd_nvram_data), decoupling
  higher-level NVRAM operations (indexed lookup, data conversion, etc) from
  the underlying NVRAM file format parsing/serialization.
- Implemented a new high-level bhnd_nvram_store API, providing indexed
  variable lookup, pending write tracking, etc on top of an arbitrary
  bhnd_nvram_data instance.
- Migrated all bhnd(4) NVRAM device drivers to the common bhnd_nvram_store
  API.
- Implemented a common bhnd_nvram_val API for parsing/encoding NVRAM
  variable values, including applying format-specific behavior when
  converting to/from the NVRAM string representations.
- Dropped the now unnecessary bhnd_nvram driver, and moved the
  broadcom/mips-specific CFE NVRAM driver out into sys/mips/broadcom.
- Implemented a new nvram_map file format:
        - Variable definitions are now defined separately from the SPROM
          layout. This will also allow us to define CIS tuple NVRAM
          mappings referencing the common NVRAM variable definitions.
        - Variables can now be defined within arbitrary named groups.
        - Textual descriptions and help information can be defined inline
          for both variables and variable groups.
        - Implemented a new, compact encoding of SPROM image layout
          offsets.
- Source-level (but not build system) support for building the NVRAM file
  format APIs (bhnd_nvram_io, bhnd_nvram_data, bhnd_nvram_store) as a
  userspace library.

The new compact SPROM image layout encoding is loosely modeled on Apple
dyld compressed LINKEDIT symbol binding opcodes; it provides a compact
state-machine encoding of the mapping between NVRAM variables and the SPROM
image offset, mask, and shift instructions necessary to decode or encode
the SPROM variable data.

The compact encoding reduces the size of the generated SPROM layout data
from roughly 60KB to 3KB. The sequential nature SPROM layout opcode tables
also simplify iteration of the SPROM variables, as it's no longer
neccessary to iterate the full NVRAM variable definition table, but
instead simply scan the SPROM revision's layout opcode table.

Approved by:    adrian (mentor)
Differential Revision:  https://reviews.freebsd.org/D8645
2016-11-26 23:22:32 +00:00
..
bwn_mac.c bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding. 2016-11-26 23:22:32 +00:00
if_bwn_chipid.h [bwn] add BCMA chip identifiers. 2016-05-14 20:03:24 +00:00
if_bwn_cordic.h [bwn] add an implementation of "cordic" and imaginary math. 2016-05-14 23:33:13 +00:00
if_bwn_debug.h [bwn] add opt_wlan.h and opt_bwn.h so we can enable bwn debugging as appropriate. 2016-05-16 22:56:45 +00:00
if_bwn_misc.h [bwn] implement reset improvements in preparation for PHY-N support 2016-05-14 23:20:46 +00:00
if_bwn_pci.c bwn(4): ignore BCM4321's unpopulated USB11 host controller core. 2016-09-05 21:55:27 +00:00
if_bwn_pcivar.h bwn(4): ignore BCM4321's unpopulated USB11 host controller core. 2016-09-05 21:55:27 +00:00
if_bwn_phy_common.c [bwn] add extra debugging for non-SIBA devices. 2016-05-24 01:20:30 +00:00
if_bwn_phy_common.h [bwn] begin migrating PHY common routines into if_bwn_phy_common.[ch]. 2016-05-14 20:11:48 +00:00
if_bwn_phy_g.c [bwn] add opt_wlan.h and opt_bwn.h so we can enable bwn debugging as appropriate. 2016-05-16 22:56:45 +00:00
if_bwn_phy_g.h [bwn] add new types, prepare for PHY-N; prepare for rev 5xx firmware. 2016-05-14 23:38:21 +00:00
if_bwn_phy_lp.c [bwn] add opt_wlan.h and opt_bwn.h so we can enable bwn debugging as appropriate. 2016-05-16 22:56:45 +00:00
if_bwn_phy_lp.h [bwn] break out the LP PHY code into a separate file. 2016-05-02 21:06:02 +00:00
if_bwn_phy_n.c [bwn] complain usefully if a PHY-N PHY is detected with no support is compiled in. 2016-06-05 07:51:36 +00:00
if_bwn_phy_n.h [bwn] add PHY-N glue. 2016-05-17 07:11:12 +00:00
if_bwn_util.c [bwn] add opt_wlan.h and opt_bwn.h so we can enable bwn debugging as appropriate. 2016-05-16 22:56:45 +00:00
if_bwn_util.h [bwn] add Q52 macros. 2016-05-14 20:09:37 +00:00
if_bwn.c net80211: ieee80211_ratectl*: switch to reusable KPI 2016-10-02 20:35:55 +00:00
if_bwnreg.h [bwn] program in the MAC capabilities somewhere where later microcode 2016-05-19 05:06:48 +00:00
if_bwnvar.h [bwn] add initial 5xx firmware API support 2016-05-18 05:56:25 +00:00