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
Unknown Object (File)
Mon, Jan 13, 5:22 PM
Unknown Object (File)
Jan 8 2025, 7:03 PM
Unknown Object (File)
Dec 3 2024, 12:25 PM
Unknown Object (File)
Nov 28 2024, 9:54 PM
Unknown Object (File)
Nov 16 2024, 6:18 PM
Unknown Object (File)
Oct 29 2024, 5:32 AM
Unknown Object (File)
Oct 5 2024, 3:12 AM
Unknown Object (File)
Oct 4 2024, 7:54 AM
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 Not Applicable
Unit
Tests Not Applicable

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.