diff options
-rw-r--r-- | src/arch/armv7/exception.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/arch/armv7/exception.c b/src/arch/armv7/exception.c index 14f82163c6..1055cb5663 100644 --- a/src/arch/armv7/exception.c +++ b/src/arch/armv7/exception.c @@ -143,9 +143,8 @@ void exception_init(void) sctlr &= ~sctlr_te; /* Set V=0 in SCTLR so VBAR points to the exception vector table. */ sctlr &= ~sctlr_v; - /* Enforce alignment. */ - sctlr |= sctlr_a; - set_sctlr(sctlr); + /* Enforce alignment temporarily. */ + set_sctlr(sctlr | sctlr_a); extern uint32_t exception_table[]; set_vbar((uintptr_t)exception_table); @@ -155,4 +154,7 @@ void exception_init(void) exception_test(); test_abort = 0; printk(BIOS_ERR, "Testing exceptions: DONE\n"); + + /* Restore original alignment settings. */ + set_sctlr(sctlr); } |