arm: fix u-boot port syscall interface va_arg handling
authorLeif Lindholm <leif.lindholm@linaro.org>
Sat, 16 Nov 2013 12:15:53 +0000 (12:15 +0000)
committerLeif Lindholm <leif.lindholm@linaro.org>
Sat, 16 Nov 2013 14:12:12 +0000 (14:12 +0000)
Commit c9cd02c broke the u-boot syscall API for va_args that spill over
to the stack, causing the disk support to stop working. This patch
resolves the problem, while keeping the new, cleaner transition_space
handling.

ChangeLog
grub-core/kern/arm/uboot/startup.S

index f8bcd18..c86a274 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-16  Leif Lindholm <leif.lindholm@linaro.org>
+
+       * grub-core/kern/arm/uboot/startup.S: fix grub_uboot_syscall va_arg
+       handling
 2013-11-16  Andrey Borzenkov <arvidjaar@gmail.com>
 
        * configure.ac: Restore -nostdlib for libgcc symbols tests.
index f54b14b..df1e329 100644 (file)
@@ -131,11 +131,6 @@ FUNCTION(grub_uboot_syscall)
        str     r8, transition_space
        str     lr, transition_space + 4
        str     r9, transition_space + 8
-       str     sp, transition_space + 12
-
-       sub     sp, sp, #0x20
-       lsr     sp, sp, #3
-       lsl     sp, sp, #3
 
        ldr     r8, gd_backup
        ldr     r9, gd_backup + 4
@@ -147,7 +142,6 @@ FUNCTION(grub_uboot_syscall)
        ldr     r8, transition_space
        ldr     lr, transition_space + 4
        ldr     r9, transition_space + 8
-       ldr     sp, transition_space + 12
 
        bx      lr
        
@@ -166,8 +160,8 @@ entry_state_end:
        .long   0       @ r6
        .long   0       @ r7
 gd_backup:     
-       .long   0       @ r8 - U-Boot global data pointer
-       .long   0       @ r9
+       .long   0       @ r8 - U-Boot global data pointer up to 2013-09-21
+       .long   0       @ r9 - U-Boot global data pointer 2013-09-21 onwards
        .long   0       @ r10
        .long   0       @ r11
 VARIABLE(grub_uboot_search_hint)@ U-Boot stack pointer - 
@@ -180,7 +174,6 @@ transition_space:
        .long   0       @ r8
        .long   0       @ lr
        .long   0       @ r9
-       .long   0       @ sp
 
 VARIABLE(grub_uboot_syscall_ptr)
        .long   0       @