diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/fdt_support.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index 166f5e145d..33336be062 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -498,11 +498,12 @@ int fdt_resize(void *blob) /* * Calculate the actual size of the fdt - * plus the size needed for two fdt_add_mem_rsv, one - * for the fdt itself and one for a possible initrd + * plus the size needed for 5 fdt_add_mem_rsv, one + * for the fdt itself and 4 for a possible initrd + * ((initrd-start + initrd-end) * 2 (name & value)) */ actualsize = fdt_off_dt_strings(blob) + - fdt_size_dt_strings(blob) + 2*sizeof(struct fdt_reserve_entry); + fdt_size_dt_strings(blob) + 5 * sizeof(struct fdt_reserve_entry); /* Make it so the fdt ends on a page boundary */ actualsize = ALIGN(actualsize + ((uint)blob & 0xfff), 0x1000); |