提交 ded57c5f 编写于 作者: A Alexander Graf

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: NAlexander Graf <agraf@suse.de>
上级 ccbcfedd
...@@ -41,6 +41,7 @@ void *load_device_tree(const char *filename_path, int *sizep) ...@@ -41,6 +41,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
} }
/* Expand to 2x size to give enough room for manipulation. */ /* Expand to 2x size to give enough room for manipulation. */
dt_size += 10000;
dt_size *= 2; dt_size *= 2;
/* First allocate space in qemu for device tree */ /* First allocate space in qemu for device tree */
fdt = g_malloc0(dt_size); fdt = g_malloc0(dt_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册