We want to reserve memory for OP-TEE at the end of available SDRAM, so move the scratch area below OP-TEE and not above. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/include/asm/barebox-arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h index f446044be6..6e6606d005 100644 --- a/arch/arm/include/asm/barebox-arm.h +++ b/arch/arm/include/asm/barebox-arm.h @@ -71,14 +71,14 @@ static inline void arm_fixup_vectors(void) void *barebox_arm_boot_dtb(void); -#define arm_mem_scratch(endmem) ((endmem) - SZ_32K) +#define arm_mem_scratch(endmem) ((endmem) - OPTEE_SIZE - SZ_32K) static inline const void *arm_mem_scratch_get(void) { return (const void *)arm_mem_scratch(arm_mem_endmem_get()); } -#define arm_mem_stack_top(endmem) ((endmem) - SZ_64K - OPTEE_SIZE) +#define arm_mem_stack_top(endmem) ((endmem) - SZ_64K) static inline unsigned long arm_mem_stack(unsigned long endmem) { -- 2.39.2