[PULL,03/13] target/arm: Add M profile secure MMU index values to get_a32_user_mem_index()

Message ID 1507824216-29058-4-git-send-email-peter.maydell@linaro.org
State New
Headers show
  • [PULL,01/13] watchdog/aspeed: fix variable type to store reload value
Related show

Commit Message

Peter Maydell Oct. 12, 2017, 4:03 p.m.
Add the M profile secure MMU index values to the switch in
get_a32_user_mem_index() so that LDRT/STRT work correctly
rather than asserting at translate time.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1507556919-24992-2-git-send-email-peter.maydell@linaro.org
 target/arm/translate.c | 4 ++++
 1 file changed, 4 insertions(+)


diff --git a/target/arm/translate.c b/target/arm/translate.c
index fdc46cc..61fd0ef 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -165,6 +165,10 @@  static inline int get_a32_user_mem_index(DisasContext *s)
     case ARMMMUIdx_MPriv:
     case ARMMMUIdx_MNegPri:
         return arm_to_core_mmu_idx(ARMMMUIdx_MUser);
+    case ARMMMUIdx_MSUser:
+    case ARMMMUIdx_MSPriv:
+    case ARMMMUIdx_MSNegPri:
+        return arm_to_core_mmu_idx(ARMMMUIdx_MSUser);
     case ARMMMUIdx_S2NS: