Arm64 fix a bug of vbar_el3 initialization
authorDavid Feng <fenghua@phytium.com.cn>
Sat, 19 Apr 2014 01:45:21 +0000 (09:45 +0800)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 25 May 2014 13:26:00 +0000 (15:26 +0200)
Signed-off-by: David Feng <fenghua@phytium.com.cn>
arch/arm/cpu/armv8/start.S

index 33d3f3688ae83bc45f13a79e12c84a0848d20d05..4b11aa4f22272cfa1766b0482ff8b1797e15db6e 100644 (file)
@@ -50,10 +50,10 @@ reset:
         */
        adr     x0, vectors
        switch_el x1, 3f, 2f, 1f
-3:     mrs     x0, scr_el3
+3:     msr     vbar_el3, x0
+       mrs     x0, scr_el3
        orr     x0, x0, #0xf                    /* SCR_EL3.NS|IRQ|FIQ|EA */
        msr     scr_el3, x0
-       msr     vbar_el3, x0
        msr     cptr_el3, xzr                   /* Enable FP/SIMD */
        ldr     x0, =COUNTER_FREQUENCY
        msr     cntfrq_el0, x0                  /* Initialize CNTFRQ */