HomeFreeBSD

vt/ofwfb: Check that /chosen/stdout is valid before using it in initialization

Description

vt/ofwfb: Check that /chosen/stdout is valid before using it in initialization

The FDT implementation of OF_instance_to_package() backend checks the
cross-reference to get the node. On failure, this returns the input handle
unchanged. In the case of ofwfb attachment, if /chosen/stdout property does not
exist, sc->sc_handle is either garbage or 0, which then gets propagated to node.
This will prevent "screen" from being used, resulting in not properly attaching.
Correct this by matching the code in ofwfb_probe().

Details

Provenance
jhibbitsAuthored on
Parents
rS336553: Apply some late-arriving markup suggestions from the phab review, and add a
Branches
Unknown
Tags
Unknown