Page MenuHomeFreeBSD

[bhnd] Initial NVRAM support
ClosedPublic

Authored by landonf on Aug 12 2016, 8:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 9:35 PM
Unknown Object (File)
Mar 1 2024, 2:58 PM
Unknown Object (File)
Feb 23 2024, 1:25 PM
Unknown Object (File)
Feb 23 2024, 1:25 PM
Unknown Object (File)
Feb 23 2024, 1:25 PM
Unknown Object (File)
Feb 23 2024, 1:25 PM
Unknown Object (File)
Feb 23 2024, 1:11 PM
Unknown Object (File)
Jan 11 2024, 7:59 AM
Subscribers

Details

Summary

Implement NVRAM support required for PMU bring-up on
SoCs:

  • Added new bhnd_nvram_parser API, with support for the TLV format used on WGT634U devices, the standard BCM NVRAM format used on most modern devices, and the "board text file" format used on some hardware to supply external NVRAM data at runtime (e.g. via an EFI variable).
  • Extended to the bhnd_bus_if and bhnd_nvram_if APIs to support both string-based and primitive data type variable access.
  • Extended the existing SPROM implementation to support the new string-based NVRAM APIs.
  • Added a generic bhnd_nvram driver, implementing the bhnd_nvram_if atop the bhnd_nvram_parser API.
  • Add a read-only CFE-based bhnd_nvram driver as a stop-gap solution on MIPS SoCs. This reads NVRAM data from the CFE-advertised NVRAM device, but does not support writing, and operates independently of flash/GEOM handling of the flash device.

This initial patchset also does not include support for:

  • Querying variables under device-specific paths, (required for WiFi bring-up on SoCs).
  • Extracting a specific device's NVRAM variables (required for WiFi bring-up of some fullmac devices).
  • Write support (pending changes are tracked, but no support exists for committing the changes to the backing flash device.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4774
Build 4828: arc lint + arc unit

Event Timeline

landonf retitled this revision from to [bhnd] Initial NVRAM support.
landonf updated this object.
landonf edited the test plan for this revision. (Show Details)
landonf added reviewers: adrian, mizhka.

Minor fixes:

  • Fix build warning on architectures with an unsigned char type.
  • Fix comment spelling.
adrian edited edge metadata.

lordie, so much code to handle nvram support. :)

This revision is now accepted and ready to land.Aug 15 2016, 6:59 PM
This revision was automatically updated to reflect the committed changes.