From 93483b04e29f959bff29b8e3f707f5c72d8c42c0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 26 Sep 2013 12:35:39 +0100 Subject: xen/arm: Support dtb /memreserve/ regions This requires a mapping of the DTB during setup_mm. Previously this was in the BOOT_MISC slot, which is clobbered by setup_pagetables. Split it out into its own slot which can be preserved. Also handle these regions as part of consider_modules() and when adding pages to the heaps to ensure we do not locate any part of Xen or the heaps over them. Signed-off-by: Ian Campbell Acked-by: Tim Deegan --- xen/common/device_tree.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'xen/common') diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 793e9a8056..4a1391cfc2 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -399,7 +399,7 @@ static void __init early_print_info(void) { struct dt_mem_info *mi = &early_info.mem; struct dt_module_info *mods = &early_info.modules; - int i; + int i, nr_rsvd; for ( i = 0; i < mi->nr_banks; i++ ) early_printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", @@ -412,6 +412,17 @@ static void __init early_print_info(void) mods->module[i].start, mods->module[i].start + mods->module[i].size, mods->module[i].cmdline); + nr_rsvd = fdt_num_mem_rsv(device_tree_flattened); + for ( i = 0; i < nr_rsvd; i++ ) + { + paddr_t s, e; + if ( fdt_get_mem_rsv(device_tree_flattened, i, &s, &e) < 0 ) + continue; + /* fdt_get_mem_rsv returns length */ + e += s; + early_printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", + i, s, e); + } } /** -- cgit v1.2.3