aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/start64.S19
-rw-r--r--arch/x86/include/asm/u-boot-x86.h11
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/x86/cpu/start64.S b/arch/x86/cpu/start64.S
index 7be8347..78e894d 100644
--- a/arch/x86/cpu/start64.S
+++ b/arch/x86/cpu/start64.S
@@ -26,3 +26,22 @@ _start:
/* Should not return here */
jmp .
+
+.globl board_init_f_r_trampoline64
+.type board_init_f_r_trampoline64, @function
+board_init_f_r_trampoline64:
+ /*
+ * SDRAM has been initialised, U-Boot code has been copied into
+ * RAM, BSS has been cleared and relocation adjustments have been
+ * made. It is now time to jump into the in-RAM copy of U-Boot
+ *
+ * %eax = Address of top of new stack
+ */
+
+ /* Stack grows down from top of SDRAM */
+ movq %rsi, %rsp
+
+ /* New gd is in rdi */
+
+ /* Re-enter U-Boot by calling board_init_f_r() */
+ call board_init_f_r
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index 1d8aa32..02a8b0f 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -117,6 +117,17 @@ void __noreturn board_init_f_r_trampoline(ulong sp);
*/
void __noreturn board_init_f_r(void);
+/*
+ * board_init_f_r_trampoline64() - jump to relocated address with new stack
+ *
+ * This is the 64-bit version
+ *
+ * @new_gd: New global_data pointer to use
+ * @sp: New stack pointer to pass on to board_init_r()
+ */
+void __noreturn board_init_f_r_trampoline64(struct global_data *new_gd,
+ ulong sp);
+
int arch_misc_init(void);
/* Read the time stamp counter */