aboutsummaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-07-23 10:54:11 +0200
committerAlexander Graf <agraf@suse.de>2011-10-06 09:48:01 +0200
commitded57c5f3a2dd49728b1cb51f17194e880514ff6 (patch)
tree281cd69de90802fdd0415d779e5c6117efbb5ff5 /device_tree.c
parentccbcfedd17fd2d13521fcee66810d0df464ec1cc (diff)
device tree: give dt more size
We currently load a device tree blob and then just take its size x2 to account for modifications we do inside. While this is nice and great, it fails when we have a small device tree as blob and lots of nodes added in machine init code. So for now, just make it 20k bigger than it was before. We maybe want to be more clever about this later. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'device_tree.c')
-rw-r--r--device_tree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/device_tree.c b/device_tree.c
index 751538ec1d..dc69232f10 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -41,6 +41,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
}
/* Expand to 2x size to give enough room for manipulation. */
+ dt_size += 10000;
dt_size *= 2;
/* First allocate space in qemu for device tree */
fdt = g_malloc0(dt_size);