summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2018-03-20 11:50:58 +0000
committerRussell King <rmk@arm.linux.org.uk>2018-03-20 14:57:23 +0000
commitf57f0bf8975d24fe1e7c4936fdfb5c3b123ab75f (patch)
tree494dcade82aa5636f1d1840c5a6c9b422e2d9a91
parentb4bd5dd7f207df0e277f27fa3559db27959a952e (diff)
ARM: Include stack and malloc space in zImage size
Include the stack and malloc space in our calculation of the zImage size, both of which must be avoided when locating the dtb. Signed-off-by: Russell King <rmk@armlinux.org.uk>
-rw-r--r--kexec/arch/arm/kexec-zImage-arm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index 3305d9b..2a7eea9 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -552,6 +552,12 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
*/
kernel_mem_size = len + 4;
+ /*
+ * The zImage length does not include its stack (4k) or its
+ * malloc space (64k). Include this.
+ */
+ len += 0x11000;
+
dbgprintf("zImage requires 0x%08llx bytes\n", (unsigned long long)len);
/*