mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
x86: Add a way to jump from TPL to SPL
When TPL finishes it needs to jump to SPL with the stack set up correctly. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
094ba7bb5b
commit
49dffb7a07
1 changed files with 13 additions and 0 deletions
|
@ -190,6 +190,19 @@ board_init_f_r_trampoline:
|
|||
/* Re-enter U-Boot by calling board_init_f_r() */
|
||||
call board_init_f_r
|
||||
|
||||
#ifdef CONFIG_TPL
|
||||
.globl jump_to_spl
|
||||
.type jump_to_spl, @function
|
||||
jump_to_spl:
|
||||
/* Reset stack to the top of CAR space */
|
||||
movl $(CONFIG_SYS_CAR_ADDR + CONFIG_SYS_CAR_SIZE - 4), %esp
|
||||
#ifdef CONFIG_DCACHE_RAM_MRC_VAR_SIZE
|
||||
subl $CONFIG_DCACHE_RAM_MRC_VAR_SIZE, %esp
|
||||
#endif
|
||||
|
||||
jmp *%eax
|
||||
#endif
|
||||
|
||||
die:
|
||||
hlt
|
||||
jmp die
|
||||
|
|
Loading…
Reference in a new issue