aboutsummaryrefslogtreecommitdiff
path: root/core/mem_region.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-07-20 16:16:20 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-25 15:40:48 +1000
commit6430a7e98273b106925dbf6bc1c15e052cf72c5f (patch)
tree67f63404dbb30c0e9e6735b486f941627c920e80 /core/mem_region.c
parent0443f602036647132f7e724a5cba6c33d6d8b98a (diff)
downloadskiboot-6430a7e98273b106925dbf6bc1c15e052cf72c5f.zip
skiboot-6430a7e98273b106925dbf6bc1c15e052cf72c5f.tar.gz
skiboot-6430a7e98273b106925dbf6bc1c15e052cf72c5f.tar.bz2
mem_region: Check for no-map in reserved nodes
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> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/mem_region.c')
-rw-r--r--core/mem_region.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/mem_region.c b/core/mem_region.c
index 77324d7..a098685 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);
}