summaryrefslogtreecommitdiff
path: root/target-arm/internals.h
diff options
context:
space:
mode:
authorRob Herring <rob.herring@linaro.org>2014-04-15 19:18:39 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-04-17 21:34:03 +0100
commit00892383c9f5f663230921c6cf6b6d3a8a61b45b (patch)
tree13caf0570649c491c3cade689924218df7a8396e /target-arm/internals.h
parentd4a2dc675bde36443c3a73051ca863d878d8bc31 (diff)
downloadqemu-00892383c9f5f663230921c6cf6b6d3a8a61b45b.tar.gz
target-arm: Provide syndrome information for MMU faults
Set up the required syndrome information when we detect an MMU fault. Signed-off-by: Rob Herring <rob.herring@linaro.org> [PMM: split out from exception handling patch, tweaked to bring in line with how we create other kinds of syndrome information] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Diffstat (limited to 'target-arm/internals.h')
-rw-r--r--target-arm/internals.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-arm/internals.h b/target-arm/internals.h
index 0300ba305c..fad203bbaa 100644
--- a/target-arm/internals.h
+++ b/target-arm/internals.h
@@ -188,4 +188,17 @@ static inline uint32_t syn_cp15_rrt_trap(int cv, int cond, int opc1, int crm,
| (rt2 << 10) | (rt << 5) | (crm << 1) | isread;
}
+static inline uint32_t syn_insn_abort(int same_el, int ea, int s1ptw, int fsc)
+{
+ return (EC_INSNABORT << ARM_EL_EC_SHIFT) | (same_el << ARM_EL_EC_SHIFT)
+ | (ea << 9) | (s1ptw << 7) | fsc;
+}
+
+static inline uint32_t syn_data_abort(int same_el, int ea, int cm, int s1ptw,
+ int wnr, int fsc)
+{
+ return (EC_DATAABORT << ARM_EL_EC_SHIFT) | (same_el << ARM_EL_EC_SHIFT)
+ | (ea << 9) | (cm << 8) | (s1ptw << 7) | (wnr << 6) | fsc;
+}
+
#endif