Page MenuHomeFreeBSD

uart: Add a signal to compute rclk from baudrate
ClosedPublic

Authored by imp on Fri, Oct 11, 9:53 PM.
Tags
None
Referenced Files
F102018452: D47072.id144856.diff
Wed, Nov 6, 2:56 PM
F102014555: D47072.id144676.diff
Wed, Nov 6, 1:47 PM
Unknown Object (File)
Fri, Nov 1, 10:06 AM
Unknown Object (File)
Sat, Oct 26, 10:09 PM
Unknown Object (File)
Sun, Oct 20, 10:42 PM
Unknown Object (File)
Sun, Oct 20, 8:10 AM
Unknown Object (File)
Sat, Oct 19, 2:27 PM
Unknown Object (File)
Fri, Oct 18, 9:37 PM
Subscribers
None

Details

Summary

With newer, more diverse hardware designs, the rclk can be
unknown. Currently deployed systems have no standard way to discover the
baud-clock generator frequency. However, sometimes we have a fairly good
idea that the firmware programmed the UART to be the baud rate that it's
telling us it's at. Create a way to instruct the uart class drivers to
compute the baud clock frequency the first time their init routines are
called. Usually the 'divisors' are relatively small, meaning we will
likely have a fairly large error (goes as 1 / (divisor + 1). However,
we also know that the baud-generator clock needs to be divided down
to the baud-rate +/- about 5% (so while the error could be large for
an arbitrary baud-clock, standard baud rates generally will give
an error of 5% or less).

Often, the console speed and the getty-configured speed are the same, so
this heuristic allows boot messages and login sessions to work.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59919
Build 56804: arc lint + arc unit