]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
microblaze: start.S: use stack space as scratch memory for endian offset
authorOvidiu Panait <ovidiu.panait@windriver.com>
Tue, 30 Nov 2021 16:33:52 +0000 (18:33 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 5 Jan 2022 09:22:03 +0000 (10:22 +0100)
To simpify the code, use stack space as scratch memory for endian offset
calculation, rather than saving/restoring the first unused MB vector.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Link: https://lore.kernel.org/r/20211130163358.2531677-5-ovidiu.panait@windriver.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/cpu/start.S

index 463e0feba47e87f2d02acf7ee3f15cfcd0db3d34..a1c06108d72332ee2e4866ab7603642926fb19e6 100644 (file)
@@ -125,10 +125,8 @@ __setup_exceptions:
         * 4b) BIG endian - r10 contains 0x0 because 0x2 offset is on addr 0x3
         */
        addik   r6, r0, 0x2 /* BIG/LITTLE endian offset */
-       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
+       sw      r6, r1, r0
+       lbu     r10, r1, r0
 
        /* add opcode instruction for 32bit jump - 2 instruction imm & brai */
        addi    r2, r0, 0xb0000000      /* hex b000 opcode imm */