Page MenuHomeFreeBSD

[mips/broadcom] Add CFE-based EARLY_PRINTF support.
ClosedPublic

Authored by landonf on Aug 14 2016, 11:28 PM.
Tags
None
Referenced Files
F161483334: D7498.id19268.diff
Sat, Jul 4, 5:24 AM
F161467345: D7498.id.diff
Sat, Jul 4, 2:21 AM
Unknown Object (File)
Thu, Jul 2, 8:50 AM
Unknown Object (File)
Mon, Jun 22, 5:53 PM
Unknown Object (File)
Sat, Jun 20, 10:33 AM
Unknown Object (File)
Wed, Jun 17, 1:00 PM
Unknown Object (File)
May 6 2026, 2:10 PM
Unknown Object (File)
Apr 27 2026, 4:46 PM
Subscribers

Details

Summary

This adds support for EARLY_PRINTF via the CFE console; the aim is to
provide a fix for the otherwise cyclic dependency between PMU detection
and console printf/DELAY:

  • We need to parse the bhnd(4) core table to determine the address (and type) of the PMU/PLL registers and calculate the CPU clock frequency.
  • The core table parsing code will emit a printf() if a parse error is hit.
  • Calling printf() without EARLY_PRINTF requires a working DELAY, which means we need the PMU.

Errors in core table parsing shouldn't happen, but lack of EARLY_PRINTF
makes debugging more difficult.

PMU detection hasn't been dropped in yet; the end-goal is to use the new
PMU code (D7492) to query the actual clockspeed as configured by the boot
loader (and in NVRAM), rather than assuming a fixed clock speed for a given
chip identifier.

Test Plan

Verified that 'printf' succeeds prior to cninit() on N16, N51, and
WGT634U hardware.

Diff Detail

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

Event Timeline

landonf retitled this revision from to [mips/broadcom] Add CFE-based EARLY_PRINTF support..
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.Aug 16 2016, 10:16 PM
This revision was automatically updated to reflect the committed changes.