Skip to content
Snippets Groups Projects
Commit 7a70c998 authored by Philipp Tomsich's avatar Philipp Tomsich Committed by Tom Rini
Browse files

armv8: spl: Call spl_relocate_stack_gd for ARMv8


As part of the startup process for boards using the SPL, we need to
call spl_relocate_stack_gd. This is needed to set up malloc with its
DRAM buffer.

Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: default avatarAndre Przywara <andre.przywara@arm.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 6b4e9426
No related branches found
No related tags found
No related merge requests found
......@@ -109,8 +109,18 @@ relocation_return:
*/
bl c_runtime_cpu_setup /* still call old routine */
#endif /* !CONFIG_SPL_BUILD */
/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
#if defined(CONFIG_SPL_BUILD)
bl spl_relocate_stack_gd /* may return NULL */
/*
* Perform 'sp = (x0 != NULL) ? x0 : sp' while working
* around the constraint that conditional moves can not
* have 'sp' as an operand
*/
mov x1, sp
cmp x0, #0
csel x0, x0, x1, ne
mov sp, x0
#endif
/*
* Clear BSS section
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment