Commit e07ad428 authored by Simon Glass's avatar Simon Glass
Browse files

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.

Series-changes: 2
- Add a new patch allowing jumping from TPL to SPL
Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent d1704f9d
......@@ -190,6 +190,17 @@ board_init_f_r_trampoline:
/* Re-enter U-Boot by calling board_init_f_r() */
call board_init_f_r
.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
die:
hlt
jmp die
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment