According to the ASCII-ART above, before the end of memory comes the optee memory, then the scratch stack.
Signed-off-by: Fabian Pflug <[email protected]> --- arch/arm/include/asm/barebox-arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h index 11be8b8583..e630969796 100644 --- a/arch/arm/include/asm/barebox-arm.h +++ b/arch/arm/include/asm/barebox-arm.h @@ -159,7 +159,7 @@ static inline unsigned long arm_mem_stack_top(unsigned long endmem) static inline const void *arm_mem_scratch_get(void) { - return (const void *)arm_mem_scratch(arm_mem_endmem_get()); + return (const void *)arm_mem_scratch(arm_mem_optee(arm_mem_endmem_get())); } static inline unsigned long arm_mem_guard_page_get(void) -- 2.47.3
