aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2013-09-26 12:35:36 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-09-26 16:21:27 +0100
commitc883eed77ae2bec5aca2f678bfd7fe4642fa6d37 (patch)
tree1ac716a10121f9936d37b7529241f4b03b9425ac /xen/common
parent1fbb3b146c7b8a4e9ff4d29234931c57879b4ca8 (diff)
downloadxen-c883eed77ae2bec5aca2f678bfd7fe4642fa6d37.tar.gz
xen-c883eed77ae2bec5aca2f678bfd7fe4642fa6d37.tar.bz2
xen-c883eed77ae2bec5aca2f678bfd7fe4642fa6d37.zip
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 <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/common')
-rw-r--r--xen/common/device_tree.c9
1 files changed, 8 insertions, 1 deletions
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();