]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
microblaze: Save and restore first unused vector
authorMichal Simek <monstr@monstr.eu>
Mon, 15 Nov 2010 09:54:43 +0000 (09:54 +0000)
committerMichal Simek <monstr@monstr.eu>
Mon, 3 Oct 2011 06:01:56 +0000 (08:01 +0200)
Use one memory space to detect little/big endian platforms.
The first unused address(0x28) is used instead 0x0 address (reset vectors).
Detection rewrited reset vector setup from first stage bootloader.

Workflow:
1. Store 0x28 to r7
2. Do little/big endian test
3. Restore r7 to 0x28

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/cpu/start.S

index 17c0e287b1b3a24c01a821e3128bf029f6174781..42104faf9ec7edad28accd99b9e6bb4f6f2b3d4f 100644 (file)
@@ -51,8 +51,10 @@ _start:
         * 4b) BIG endian - r10 contains 0x0 because 0x2 offset is on addr 0x3
         */
        addik   r6, r0, 0x2 /* BIG/LITTLE endian offset */
-       swi     r6, r0, 0
-       lbui    r10, r0, 0
+       lwi     r7, r0, 0x28
+       swi     r6, r0, 0x28 /* used first unused MB vector */
+       lbui    r10, r0, 0x28 /* used first unused MB vector */
+       swi     r7, r0, 0x28
 
        /* add opcode instruction for 32bit jump - 2 instruction imm & brai */
        addi    r2, r0, 0xb0000000      /* hex b000 opcode imm */