Message ID | 20170720061620.2365-1-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
Oliver O'Halloran <oohall@gmail.com> writes: > Regions with the no-map property should be handled seperately to > "normal" firmware reservations. When creating mem_region regions > from a reserved-memory DT node use the no-map property to select > the right reservation type. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > core/mem_region.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) Merged to master as of 6430a7e98273b106925dbf6bc1c15e052cf72c5f
diff --git a/core/mem_region.c b/core/mem_region.c index 77324d715160..a09868599cec 100644 --- a/core/mem_region.c +++ b/core/mem_region.c @@ -975,6 +975,7 @@ static bool mem_region_parse_reserved_nodes(const char *path) dt_for_each_child(parent, node) { const struct dt_property *reg; struct mem_region *region; + int type; reg = dt_find_property(node, "reg"); if (!reg) { @@ -985,10 +986,15 @@ static bool mem_region_parse_reserved_nodes(const char *path) continue; } + if (dt_has_node_property(node, "no-map", NULL)) + type = REGION_RESERVED; + else + type = REGION_FW_RESERVED; + region = new_region(strdup(node->name), dt_get_number(reg->prop, 2), dt_get_number(reg->prop + sizeof(u64), 2), - node, REGION_FW_RESERVED); + node, type); add_region(region); }
Regions with the no-map property should be handled seperately to "normal" firmware reservations. When creating mem_region regions from a reserved-memory DT node use the no-map property to select the right reservation type. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- core/mem_region.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)