Skip to content
Snippets Groups Projects
Commit 9e9579bb authored by Kumar Gala's avatar Kumar Gala Committed by Wolfgang Denk
Browse files

powerpc: Fix device tree padding associated with ramdisk


When booting with a ramdisk we bump the amount of memory reserved for
the device tree by FDT_RAMDISK_OVERHEAD.  However we did not increase
the actual size in the device tree blob to match.

Its possible on boundary cases that we dont have enough memory according
to the device tree blob and get errors like:

WARNING: could not set linux,initrd-end FDT_ERR_NOSPACE

We can easily fix this by setting the device tree size at the same time
we bump the amount of memory reserved for the device tree.

Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
parent 3cfe6954
No related branches found
No related tags found
No related merge requests found
......@@ -288,8 +288,10 @@ static int boot_body_linux(bootm_headers_t *images)
return ret;
of_size = ret;
if (*initrd_start && *initrd_end)
if (*initrd_start && *initrd_end) {
of_size += FDT_RAMDISK_OVERHEAD;
fdt_set_totalsize(*of_flat_tree, of_size);
}
/* Create a new LMB reservation */
lmb_reserve(lmb, (ulong)*of_flat_tree, of_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment