[Skiboot] [PATCH] mem_region: Check for no-map in reserved nodes
Oliver O'Halloran
oohall at gmail.com
Thu Jul 20 16:16:20 AEST 2017
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 at gmail.com>
---
core/mem_region.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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);
}
--
2.9.4
More information about the Skiboot
mailing list