mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
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: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6b4e942683
commit
7a70c9985c
1 changed files with 12 additions and 2 deletions
|
@ -109,8 +109,18 @@ relocation_return:
|
||||||
*/
|
*/
|
||||||
bl c_runtime_cpu_setup /* still call old routine */
|
bl c_runtime_cpu_setup /* still call old routine */
|
||||||
#endif /* !CONFIG_SPL_BUILD */
|
#endif /* !CONFIG_SPL_BUILD */
|
||||||
|
#if defined(CONFIG_SPL_BUILD)
|
||||||
/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
|
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
|
* Clear BSS section
|
||||||
|
|
Loading…
Add table
Reference in a new issue