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)
Feb 23 2024, 7:49 PM
Unknown Object (File)
Feb 23 2024, 7:22 PM
Unknown Object (File)
Feb 23 2024, 7:14 PM
Unknown Object (File)
Feb 23 2024, 2:10 PM
Unknown Object (File)
Jan 30 2024, 6:44 AM
Unknown Object (File)
Jan 10 2024, 2:29 AM
Unknown Object (File)
Dec 13 2023, 7:50 PM
Unknown Object (File)
Nov 22 2023, 11:48 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.