diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2010-10-07 20:03:28 +1100 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2010-10-07 20:03:28 +1100 |
commit | 5f2679055d5f58db9548efe5545fac256d1c7d4d (patch) | |
tree | 13e09065ce1750ea593a5185c299ae9688b05b68 /arch | |
parent | 88fa0a6eb906b532cd073b6e3d8f688c47404709 (diff) | |
download | u-boot-imx-5f2679055d5f58db9548efe5545fac256d1c7d4d.zip u-boot-imx-5f2679055d5f58db9548efe5545fac256d1c7d4d.tar.gz u-boot-imx-5f2679055d5f58db9548efe5545fac256d1c7d4d.tar.bz2 |
x86: Don't clobber %ebx
%ebx will hold low-level boot flags and must be preserved
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/cpu/sc520/sc520_asm.S | 15 | ||||
-rw-r--r-- | arch/i386/cpu/start.S | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/arch/i386/cpu/sc520/sc520_asm.S b/arch/i386/cpu/sc520/sc520_asm.S index a18e2c3..63c14b7 100644 --- a/arch/i386/cpu/sc520/sc520_asm.S +++ b/arch/i386/cpu/sc520/sc520_asm.S @@ -174,6 +174,9 @@ .globl mem_init mem_init: + /* Preserve Boot Flags */ + movl %ebx, %ebp + /* initialize dram controller registers */ xorw %ax, %ax movl $DBCTL, %edi @@ -517,6 +520,8 @@ bad_ram: jmp bad_reint dram_done: + /* Restore Boot Flags */ + movl %ebx, %ebp jmp mem_init_ret #if CONFIG_SYS_SDRAM_ECC_ENABLE @@ -579,7 +584,7 @@ bank0: movl (%edi), %eax jz bank1 andl $0x0000007f, %eax shll $22, %eax - movl %eax, %ebx + movl %eax, %edx bank1: movl (%edi), %eax movl %eax, %ecx @@ -587,7 +592,7 @@ bank1: movl (%edi), %eax jz bank2 andl $0x00007f00, %eax shll $14, %eax - movl %eax, %ebx + movl %eax, %edx bank2: movl (%edi), %eax movl %eax, %ecx @@ -595,7 +600,7 @@ bank2: movl (%edi), %eax jz bank3 andl $0x007f0000, %eax shll $6, %eax - movl %eax, %ebx + movl %eax, %edx bank3: movl (%edi), %eax movl %eax, %ecx @@ -603,8 +608,8 @@ bank3: movl (%edi), %eax jz done andl $0x7f000000, %eax shrl $2, %eax - movl %eax, %ebx + movl %eax, %edx done: - movl %ebx, %eax + movl %edx, %eax jmp get_mem_size_ret diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S index 551965f..63f7334 100644 --- a/arch/i386/cpu/start.S +++ b/arch/i386/cpu/start.S @@ -118,8 +118,8 @@ mem_ok: cmpl $0, %eax jne die push $0x55aa55aa - popl %ebx - cmpl $0x55aa55aa, %ebx + popl %ecx + cmpl $0x55aa55aa, %ecx jne die wbinvd |