[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 20/23] target/arm: Remove default_exception_el
From: |
Richard Henderson |
Subject: |
[PATCH v3 20/23] target/arm: Remove default_exception_el |
Date: |
Thu, 9 Jun 2022 13:28:58 -0700 |
This function is no longer used. At the same time, remove
DisasContext.secure_routed_to_el3, as it in turn becomes unused.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.h | 16 ----------------
target/arm/translate-a64.c | 5 -----
target/arm/translate.c | 5 -----
3 files changed, 26 deletions(-)
diff --git a/target/arm/translate.h b/target/arm/translate.h
index 850bcdc155..88dc18a034 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -43,8 +43,6 @@ typedef struct DisasContext {
int fp_excp_el; /* FP exception EL or 0 if enabled */
int sve_excp_el; /* SVE exception EL or 0 if enabled */
int vl; /* current vector length in bytes */
- /* Flag indicating that exceptions from secure mode are routed to EL3. */
- bool secure_routed_to_el3;
bool vfp_enabled; /* FP enabled via FPSCR.EN */
int vec_len;
int vec_stride;
@@ -199,20 +197,6 @@ static inline int get_mem_index(DisasContext *s)
return arm_to_core_mmu_idx(s->mmu_idx);
}
-/* Function used to determine the target exception EL when otherwise not known
- * or default.
- */
-static inline int default_exception_el(DisasContext *s)
-{
- /* If we are coming from secure EL0 in a system with a 32-bit EL3, then
- * there is no secure EL1, so we route exceptions to EL3. Otherwise,
- * exceptions can only be routed to ELs above 1, so we target the higher of
- * 1 or the current EL.
- */
- return (s->mmu_idx == ARMMMUIdx_SE10_0 && s->secure_routed_to_el3)
- ? 3 : MAX(1, s->current_el);
-}
-
static inline void disas_set_insn_syndrome(DisasContext *s, uint32_t syn)
{
/* We don't need to save all of the syndrome so we mask and shift
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 4f6181a548..4c64546090 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -14585,11 +14585,6 @@ static void
aarch64_tr_init_disas_context(DisasContextBase *dcbase,
dc->condjmp = 0;
dc->aarch64 = true;
- /* If we are coming from secure EL0 in a system with a 32-bit EL3, then
- * there is no secure EL1, so we route exceptions to EL3.
- */
- dc->secure_routed_to_el3 = arm_feature(env, ARM_FEATURE_EL3) &&
- !arm_el_is_aa64(env, 3);
dc->thumb = false;
dc->sctlr_b = 0;
dc->be_data = EX_TBFLAG_ANY(tb_flags, BE_DATA) ? MO_BE : MO_LE;
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 81c27e7c70..6617de775f 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -9319,11 +9319,6 @@ static void arm_tr_init_disas_context(DisasContextBase
*dcbase, CPUState *cs)
dc->condjmp = 0;
dc->aarch64 = false;
- /* If we are coming from secure EL0 in a system with a 32-bit EL3, then
- * there is no secure EL1, so we route exceptions to EL3.
- */
- dc->secure_routed_to_el3 = arm_feature(env, ARM_FEATURE_EL3) &&
- !arm_el_is_aa64(env, 3);
dc->thumb = EX_TBFLAG_AM32(tb_flags, THUMB);
dc->be_data = EX_TBFLAG_ANY(tb_flags, BE_DATA) ? MO_BE : MO_LE;
condexec = EX_TBFLAG_AM32(tb_flags, CONDEXEC);
--
2.34.1
- [PATCH v3 12/23] target/arm: Introduce gen_exception_insn, (continued)
- [PATCH v3 12/23] target/arm: Introduce gen_exception_insn, Richard Henderson, 2022/06/09
- [PATCH v3 13/23] target/arm: Create helper_exception_swstep, Richard Henderson, 2022/06/09
- [PATCH v3 17/23] target/arm: Introduce gen_exception, Richard Henderson, 2022/06/09
- [PATCH v3 16/23] target/arm: Rename gen_exception to gen_exception_el, Richard Henderson, 2022/06/09
- [PATCH v3 05/23] target/arm: Move arm_generate_debug_exceptions out of line, Richard Henderson, 2022/06/09
- [PATCH v3 18/23] target/arm: Introduce gen_exception_el_v, Richard Henderson, 2022/06/09
- [PATCH v3 15/23] target/arm: Move gen_exception to translate.c, Richard Henderson, 2022/06/09
- [PATCH v3 14/23] target/arm: Remove TBFLAG_ANY.DEBUG_TARGET_EL, Richard Henderson, 2022/06/09
- [PATCH v3 21/23] target/arm: Create raise_exception_debug, Richard Henderson, 2022/06/09
- [PATCH v3 19/23] target/arm: Introduce helper_exception_with_syndrome, Richard Henderson, 2022/06/09
- [PATCH v3 20/23] target/arm: Remove default_exception_el,
Richard Henderson <=
- [PATCH v3 22/23] target/arm: Move arm_debug_target_el to debug_helper.c, Richard Henderson, 2022/06/09
- [PATCH v3 23/23] target/arm: Fix Secure PL1 tests in fp_exception_el, Richard Henderson, 2022/06/09
- Re: [PATCH v3 00/23] target/arm: tidy exception routing, Peter Maydell, 2022/06/10