HomeFreeBSD

MFC r322289: Enable uing ofw_bus_find_compatible in early platform code

Description

MFC r322289: Enable uing ofw_bus_find_compatible in early platform code

Before this patch function ofw_bus_find_compatible was using
memory allocations in order to find compatible node and the property's
length. This way there was always a suited buffer for property,
however this approach had also disadvantages - ofw_bus_find_compatible
couldn't be used when malloc is not available, e.g. during fdt fixup stage.

In order to remove the usage limitation of ofw_bus_find_compatible(),
this patch modifies the function to use ofw_bus_node_is_compatible()
(instead of the one without _int suffix), which uses a fixed
buffer on stack instead of dynamic allocations.

Details

Provenance
kevansAuthored on
Parents
rS330900: MFC r322287 (mw): Add support for "compatible" parameter in ofw_fdt_fixup
Branches
Unknown
Tags
Unknown