Prepare v2023.10
[platform/kernel/u-boot.git] / arch / x86 / cpu / start64.S
index a78a331..78e894d 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * 64-bit x86 Startup Code
  *
- * (C) Copyright 216 Google, Inc
+ * Copyright 2019 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
  */
 
@@ -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