Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b4d2189 authored by Sebastian Siewior's avatar Sebastian Siewior Committed by Paul Mackerras
Browse files

powerpc/boot: Allocate more memory for dtb



David Gibson suggested that since we are now unconditionally copying
the dtb into a malloc()ed buffer, it would be sensible to add a little
padding to the buffer at that point, so that further device tree
manipulations won't need to reallocate it.

This implements that suggestion.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7d4320f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -185,7 +185,7 @@ void fdt_init(void *blob)


	/* Make sure the dt blob is the right version and so forth */
	/* Make sure the dt blob is the right version and so forth */
	fdt = blob;
	fdt = blob;
	bufsize = fdt_totalsize(fdt) + 4;
	bufsize = fdt_totalsize(fdt) + EXPAND_GRANULARITY;
	buf = malloc(bufsize);
	buf = malloc(bufsize);
	if(!buf)
	if(!buf)
		fatal("malloc failed. can't relocate the device tree\n\r");
		fatal("malloc failed. can't relocate the device tree\n\r");