]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arc/lib/start.S
Fix board init code to respect the C runtime environment
[people/ms/u-boot.git] / arch / arc / lib / start.S
index 26a593418938da72e3dcc43ec77ed45d43262d9a..90ee7e0fe4064cffbd57f865aec9ceaa268dfb1b 100644 (file)
@@ -50,18 +50,20 @@ ENTRY(_start)
 1:
 #endif
 
-       /* Setup stack- and frame-pointers */
+       /* Establish C runtime stack and frame */
        mov     %sp, CONFIG_SYS_INIT_SP_ADDR
        mov     %fp, %sp
 
-       /* Allocate and zero GD, update SP */
+       /* Allocate reserved area from current top of stack */
        mov     %r0, %sp
-       bl      board_init_f_mem
-
-       /* Update stack- and frame-pointers */
+       bl      board_init_f_alloc_reserve
+       /* Set stack below reserved area, adjust frame pointer accordingly */
        mov     %sp, %r0
        mov     %fp, %sp
 
+       /* Initialize reserved area - note: r0 already contains address */
+       bl      board_init_f_init_reserve
+
        /* Zero the one and only argument of "board_init_f" */
        mov_s   %r0, 0
        j       board_init_f