From e7d57ded3616c42f63383a8c9875dacf600fc018 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 7 Aug 2014 16:48:50 +0200 Subject: [PATCH] hw & trustzone: fix alignm. of VM exception-vector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After modifying mode transition for branch prediction tz_vmm wasn't working anymore on hw_imx53_tz but the modifications had nothing to do with the VM code. However, the amount of instructions in the MT before the VM exception-vector changed. So I tried stuffing the last working version with NOPs and found that tz_vmm worked for some NOP amounts and for others not. Thus, I increased the alignment of the VM exception-vector from 16 bytes to 32 bytes, é voila, its working with any amount of NOPs as well as with branch prediction commits. ref #474 --- repos/base-hw/src/core/spec/arm_v7/mode_transition.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/spec/arm_v7/mode_transition.s b/repos/base-hw/src/core/spec/arm_v7/mode_transition.s index 8da5bed3eb..7566b9768a 100644 --- a/repos/base-hw/src/core/spec/arm_v7/mode_transition.s +++ b/repos/base-hw/src/core/spec/arm_v7/mode_transition.s @@ -434,7 +434,7 @@ * On vm exceptions the CPU has to jump to one of the following * 7 entry vectors to switch to a kernel context. */ - .p2align 4 + .p2align 5 .global _mon_kernel_entry _mon_kernel_entry: b _mon_rst_entry /* reset */