MCPcopy Create free account
hub / github.com/coreboot/coreboot / alloc_node

Function alloc_node

src/commonlib/device_tree.c:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#define LP_ALLOC_PROP_SCRATCH_COUNT 10000
36
37static struct device_tree_node *alloc_node(void)
38{
39#ifndef __COREBOOT__
40 static struct device_tree_node scratch[LP_ALLOC_NODE_SCRATCH_COUNT];
41 static int counter = 0;
42
43 if (counter < ARRAY_SIZE(scratch))
44 return &scratch[counter++];
45#endif
46 return xzalloc(sizeof(struct device_tree_node));
47}
48
49static struct device_tree_property *alloc_prop(void)
50{

Callers 3

fdt_unflatten_nodeFunction · 0.85
_dt_find_nodeFunction · 0.85
dt_copy_subtreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected