summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-01 10:53:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-01 13:58:01 +0200
commit75c96bd2459ea013bf6bf4eea7f53094a4d66e93 (patch)
tree497e65e4fb66bce768bacdff1a15499b3c66a195 /arch/arm/cpu
parentc44d92683f24d234a51c2cea62d199e7ab43d08a (diff)
downloadbarebox-75c96bd2459ea013bf6bf4eea7f53094a4d66e93.tar.gz
barebox-75c96bd2459ea013bf6bf4eea7f53094a4d66e93.tar.xz
ARM: Do not use last 64KiB of address space for barebox
The last 64KiB of address space may be used for the vector table at 0xffff0000, so we cannot use it for barebox. The easiest way to archieve this is to never use the last 64KiB of memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/entry.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/cpu/entry.c b/arch/arm/cpu/entry.c
index 3b74c6a6c1..0cdcfece73 100644
--- a/arch/arm/cpu/entry.c
+++ b/arch/arm/cpu/entry.c
@@ -1,6 +1,7 @@
#include <types.h>
#include <asm/cache.h>
+#include <asm/barebox-arm.h>
#include "entry.h"
@@ -26,7 +27,7 @@
void __naked __noreturn barebox_arm_entry(unsigned long membase,
unsigned long memsize, void *boarddata)
{
- arm_setup_stack(membase + memsize - 16);
+ arm_setup_stack(arm_mem_stack(membase, membase + memsize) + STACK_SIZE - 16);
arm_early_mmu_cache_invalidate();
if (IS_ENABLED(CONFIG_PBL_MULTI_IMAGES))