Page MenuHomeFreeBSD

Allow the FDT uart driver to select witch device node to use

Authored by andrew on Sep 3 2015, 4:57 PM.
Referenced Files
Unknown Object (File)
Thu, May 25, 11:04 PM
Unknown Object (File)
Apr 12 2023, 12:08 AM
Unknown Object (File)
Feb 28 2023, 7:24 AM
Unknown Object (File)
Feb 22 2023, 4:17 AM
Unknown Object (File)
Feb 6 2023, 7:46 PM
Unknown Object (File)
Feb 1 2023, 1:48 PM
Unknown Object (File)
Jan 25 2023, 10:50 PM
Unknown Object (File)
Jan 20 2023, 5:50 AM



Some upstream dts files lack a stdout in /choosen. In these cases
we default to serial0, however this may be incorrect. This adds
support to set the node we should use in loader.

An example of this would be to add the following to loader.conf:

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Allow the FDT uart driver to select witch device node to use.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: ARM, MIPS.

Generally I like this, though hw.fdt.console seems limiting. hw.uart.console already exists, and also lets you set UART parameters. I see that we do this to a limited extent for current-speed below and hard-wire 8:1:N. We've done this for a long time, so I don't know how important it is, but I thought I'd point out the inconsistency.

156 ↗(On Diff #8460)

There are other things than /chose/stdin /chosen/stdout. Perhaps you should limit things explicitly to those?

166–167 ↗(On Diff #8460)

I'm torn. Is there some reason we don't do this when the user has specified a node that doesn't exist (eg node == -1 when cp != NULL)

We could follow the stdout-path bindings [1] in this node, but this would need us to parse them first.

I'm also open to a better name for the environment variable.


156 ↗(On Diff #8460)

This is just changing the indentation of existing code, there is extra data in some of these, but that is out of the scope for this change.

166–167 ↗(On Diff #8460)

The user could disable the fdt console with this by setting it to an invalid node, e.g. hw.fdt.console="none"

This revision was automatically updated to reflect the committed changes.