freebsd-dev/sys/dev/ofw
Marcin Wojtas edf3dd3b0a Enable using 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.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11880
2017-08-09 01:06:40 +00:00
..
ofw_bus_if.m
ofw_bus_subr.c Enable using ofw_bus_find_compatible in early platform code 2017-08-09 01:06:40 +00:00
ofw_bus_subr.h Expand OpenFirmware API with ofw_bus_node_status_okay 2017-01-25 10:28:21 +00:00
ofw_bus.h
ofw_console.c
ofw_cpu.c Update comment ot reflect realilty, we know also take care of CPUs that 2017-04-20 15:06:16 +00:00
ofw_cpu.h
ofw_disk.c
ofw_fdt.c Add support for "compatible" parameter in ofw_fdt_fixup 2017-08-09 00:56:29 +00:00
ofw_if.m
ofw_pci.h
ofw_standard.c
ofw_subr.c Add a ofw_parse_bootargs function, and use it for powerpc 2016-09-21 02:28:39 +00:00
ofw_subr.h Add a ofw_parse_bootargs function, and use it for powerpc 2016-09-21 02:28:39 +00:00
ofwbus.c INTRNG: Rework handling with resources. Partially revert r301453. 2016-08-19 10:52:39 +00:00
ofwpci.c Convert PCIe Hot Plug to using pci_request_feature 2017-02-25 06:11:59 +00:00
ofwpci.h OFWPCI: Add support for NEW_PCIB. 2016-07-17 13:43:46 +00:00
ofwvar.h
openfirm.c
openfirm.h
openfirmio.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
openfirmio.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
openpromio.c Remove NULL checks after M_WAITOK allocations from sys/dev/ofw/. 2016-08-09 15:55:14 +00:00
openpromio.h