target/arm: Add syndrome data for EC_GCS
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20251008215613.300150-38-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
de83d60a84
commit
f0fdbfae97
1 changed files with 35 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ enum arm_exception_class {
|
|||
EC_MOP = 0x27,
|
||||
EC_AA32_FPTRAP = 0x28,
|
||||
EC_AA64_FPTRAP = 0x2c,
|
||||
EC_GCS = 0x2d,
|
||||
EC_SERROR = 0x2f,
|
||||
EC_BREAKPOINT = 0x30,
|
||||
EC_BREAKPOINT_SAME_EL = 0x31,
|
||||
|
|
@ -83,6 +84,23 @@ typedef enum {
|
|||
SME_ET_InaccessibleZT0,
|
||||
} SMEExceptionType;
|
||||
|
||||
typedef enum {
|
||||
GCS_ET_DataCheck,
|
||||
GCS_ET_EXLOCK,
|
||||
GCS_ET_GCSSTR_GCSSTTR,
|
||||
} GCSExceptionType;
|
||||
|
||||
typedef enum {
|
||||
GCS_IT_RET_nPauth = 0,
|
||||
GCS_IT_GCSPOPM = 1,
|
||||
GCS_IT_RET_PauthA = 2,
|
||||
GCS_IT_RET_PauthB = 3,
|
||||
GCS_IT_GCSSS1 = 4,
|
||||
GCS_IT_GCSSS2 = 5,
|
||||
GCS_IT_GCSPOPCX = 8,
|
||||
GCS_IT_GCSPOPX = 9,
|
||||
} GCSInstructionType;
|
||||
|
||||
#define ARM_EL_EC_LENGTH 6
|
||||
#define ARM_EL_EC_SHIFT 26
|
||||
#define ARM_EL_IL_SHIFT 25
|
||||
|
|
@ -351,6 +369,23 @@ static inline uint32_t syn_pcalignment(void)
|
|||
return (EC_PCALIGNMENT << ARM_EL_EC_SHIFT) | ARM_EL_IL;
|
||||
}
|
||||
|
||||
static inline uint32_t syn_gcs_data_check(GCSInstructionType it, int rn)
|
||||
{
|
||||
return ((EC_GCS << ARM_EL_EC_SHIFT) | ARM_EL_IL |
|
||||
(GCS_ET_DataCheck << 20) | (rn << 5) | it);
|
||||
}
|
||||
|
||||
static inline uint32_t syn_gcs_exlock(void)
|
||||
{
|
||||
return (EC_GCS << ARM_EL_EC_SHIFT) | ARM_EL_IL | (GCS_ET_EXLOCK << 20);
|
||||
}
|
||||
|
||||
static inline uint32_t syn_gcs_gcsstr(int ra, int rn)
|
||||
{
|
||||
return ((EC_GCS << ARM_EL_EC_SHIFT) | ARM_EL_IL |
|
||||
(GCS_ET_GCSSTR_GCSSTTR << 20) | (ra << 10) | (rn << 5));
|
||||
}
|
||||
|
||||
static inline uint32_t syn_serror(uint32_t extra)
|
||||
{
|
||||
return (EC_SERROR << ARM_EL_EC_SHIFT) | ARM_EL_IL | extra;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue