diff options
author | Dave Martin <dave.martin@linaro.org> | 2012-09-06 18:12:42 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2012-09-26 14:06:30 +0100 |
commit | b9d0f17007e6109cba8760807c3814db57d67bef (patch) | |
tree | e80edeeb96d3195c3cfa8a3f51ce1c2c6325ea38 | |
parent | 9b9cabe5ba5937917a23fb85eafff41cdabc3276 (diff) |
bootwrapper: Fix misaligned Hyp mode vector table
Currently, it looks like we rely on luck in order to fall through
to the correct vector when a Hyp Trap exception occurs.
This patch aligns the Hyp mode vector table explicitly to a 32-byte
boundary, as required by the architecture.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | boot.S | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -12,6 +12,17 @@ .arch_extension virt .text +.align 5 +/* Once we get rid of monitor.S, use these smc vectors too! */ +hyp_vectors: + .word 0 /* reset */ + .word 0 /* undef */ + .word 0 /* svc */ + .word 0 /* pabt */ + .word 0 /* dabt */ + b into_hyp_mode /* hvc */ + .word 0 /* irq */ + .word 0 /* fiq */ .globl start start: @@ -68,7 +79,7 @@ start: mcr p15, 0, r0, c12, c0, 1 @ Monitor vector base address @ Set up hvbar so hvc comes back here. - ldr r0, =vectors + ldr r0, =hyp_vectors mov r7, #0xfffffff0 smc #0 @ Set HVBAR @@ -79,17 +90,6 @@ start: @ This is how we enter hyp mode, for booting the next stage. hvc #0 -/* Once we get rid of monitor.S, use these smc vectors too! */ -vectors: - .word 0 /* reset */ - .word 0 /* undef */ - .word 0 /* svc */ - .word 0 /* pabt */ - .word 0 /* dabt */ - b into_hyp_mode /* hvc */ - .word 0 /* irq */ - .word 0 /* fiq */ - into_hyp_mode: @ Check CPU nr again mrc p15, 0, r0, c0, c0, 5 @ MPIDR (ARMv7 only) |