Skip to content

Commit

Permalink
device_tree: Increase FDT_MAX_SIZE to 1 MiB
Browse files Browse the repository at this point in the history
It is not uncommon for a contemporary FDT to be larger than 64 KiB,
leading to failures loading the device tree from sysfs:

    qemu-system-aarch64: qemu_fdt_setprop: Couldn't set ...: FDT_ERR_NOSPACE

Hence increase the limit to 1 MiB, like on PPC.

For reference, the largest arm64 DTB created from the Linux sources is
ca. 75 KiB large (100 KiB when built with symbols/fixup support).

Cc: [email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
geertu authored and pm215 committed Apr 26, 2018
1 parent 4743c23 commit 14ec3cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion device_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <libfdt.h>

#define FDT_MAX_SIZE 0x10000
#define FDT_MAX_SIZE 0x100000

void *create_device_tree(int *sizep)
{
Expand Down

0 comments on commit 14ec3cb

Please sign in to comment.