[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/51] target/arm: Add syn_smetrap
From: |
Richard Henderson |
Subject: |
[PATCH v3 03/51] target/arm: Add syn_smetrap |
Date: |
Mon, 20 Jun 2022 10:51:47 -0700 |
This will be used for raising various traps for SME.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/syndrome.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h
index c105f9e6ba..73df5e3793 100644
--- a/target/arm/syndrome.h
+++ b/target/arm/syndrome.h
@@ -48,6 +48,7 @@ enum arm_exception_class {
EC_AA64_SMC = 0x17,
EC_SYSTEMREGISTERTRAP = 0x18,
EC_SVEACCESSTRAP = 0x19,
+ EC_SMETRAP = 0x1d,
EC_INSNABORT = 0x20,
EC_INSNABORT_SAME_EL = 0x21,
EC_PCALIGNMENT = 0x22,
@@ -68,6 +69,13 @@ enum arm_exception_class {
EC_AA64_BKPT = 0x3c,
};
+typedef enum {
+ SME_ET_AccessTrap,
+ SME_ET_Streaming,
+ SME_ET_NotStreaming,
+ SME_ET_InactiveZA,
+} SMEExceptionType;
+
#define ARM_EL_EC_SHIFT 26
#define ARM_EL_IL_SHIFT 25
#define ARM_EL_ISV_SHIFT 24
@@ -207,6 +215,12 @@ static inline uint32_t syn_sve_access_trap(void)
return EC_SVEACCESSTRAP << ARM_EL_EC_SHIFT;
}
+static inline uint32_t syn_smetrap(SMEExceptionType etype, bool is_16bit)
+{
+ return (EC_SMETRAP << ARM_EL_EC_SHIFT)
+ | (is_16bit ? 0 : ARM_EL_IL) | etype;
+}
+
static inline uint32_t syn_pactrap(void)
{
return EC_PACTRAP << ARM_EL_EC_SHIFT;
--
2.34.1
- [PATCH v3 00/51] target/arm: Scalable Matrix Extension, Richard Henderson, 2022/06/20
- [PATCH v3 01/51] target/arm: Implement TPIDR2_EL0, Richard Henderson, 2022/06/20
- [PATCH v3 03/51] target/arm: Add syn_smetrap,
Richard Henderson <=
- [PATCH v3 05/51] target/arm: Add SVCR, Richard Henderson, 2022/06/20
- [PATCH v3 02/51] target/arm: Add SMEEXC_EL to TB flags, Richard Henderson, 2022/06/20
- [PATCH v3 07/51] target/arm: Add SMIDR_EL1, SMPRI_EL1, SMPRIMAP_EL2, Richard Henderson, 2022/06/20
- [PATCH v3 04/51] target/arm: Add ARM_CP_SME, Richard Henderson, 2022/06/20
- [PATCH v3 06/51] target/arm: Add SMCR_ELx, Richard Henderson, 2022/06/20
- [PATCH v3 10/51] target/arm: Implement SMSTART, SMSTOP, Richard Henderson, 2022/06/20
- [PATCH v3 08/51] target/arm: Add PSTATE.{SM,ZA} to TB flags, Richard Henderson, 2022/06/20
- [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState, Richard Henderson, 2022/06/20
- [PATCH v3 11/51] target/arm: Move error for sve%d property to arm_cpu_sve_finalize, Richard Henderson, 2022/06/20