From c883eed77ae2bec5aca2f678bfd7fe4642fa6d37 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 26 Sep 2013 12:35:36 +0100 Subject: xen/arm: Reserve FDT via early module mechanism This will stop us putting any heaps or relocating Xen itself over the FDT. The devicetree will be copied to allocated memory in setup_mm and the original copy will be freed by discard_initial_modules. Signed-off-by: Ian Campbell Acked-by: Tim Deegan --- xen/common/device_tree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xen/common') diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 9a16650ee1..793e9a8056 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -420,14 +420,21 @@ static void __init early_print_info(void) * * Returns the size of the DTB. */ -size_t __init device_tree_early_init(const void *fdt) +size_t __init device_tree_early_init(const void *fdt, paddr_t paddr) { + struct dt_mb_module *mod; int ret; ret = fdt_check_header(fdt); if ( ret < 0 ) early_panic("No valid device tree\n"); + mod = &early_info.modules.module[MOD_FDT]; + mod->start = paddr; + mod->size = fdt_totalsize(fdt); + + early_info.modules.nr_mods = max(MOD_FDT, early_info.modules.nr_mods); + device_tree_for_each_node((void *)fdt, early_scan_node, NULL); early_print_info(); -- cgit v1.2.3