diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2025-01-30 18:23:05 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2025-02-20 14:20:28 +0000 |
| commit | 2d60f1acdb950e85335b018bcaf4ba0f042a350c (patch) | |
| tree | ebf2fd0eeb8dc5ab64be616448bc9ec225b86df2 /target/arm/debug_helper.c | |
| parent | 273d0e84ccd1f0a94f893d2f1ab750f812dfa219 (diff) | |
| download | focaccia-qemu-2d60f1acdb950e85335b018bcaf4ba0f042a350c.tar.gz focaccia-qemu-2d60f1acdb950e85335b018bcaf4ba0f042a350c.zip | |
target/arm: Use CP_ACCESS_TRAP_EL1 for traps that are always to EL1
We currently use CP_ACCESS_TRAP in a number of access functions where we know we're currently at EL0; in this case the "usual target EL" is EL1, so CP_ACCESS_TRAP and CP_ACCESS_TRAP_EL1 behave the same. Use CP_ACCESS_TRAP_EL1 to more closely match the pseudocode for this sort of check. Note that in the case of the access functions foc cacheop to PoC or PoU, the code was correct but the comment was wrong: SCTLR_EL1.UCI traps for DC CVAC, DC CIVAC, DC CVAP, DC CVADP, DC CVAU and IC IVAU should be system access traps, not UNDEFs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20250130182309.717346-11-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/debug_helper.c')
| -rw-r--r-- | target/arm/debug_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index c3c1eb5f62..36bffde74e 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -875,7 +875,7 @@ static CPAccessResult access_tdcc(CPUARMState *env, const ARMCPRegInfo *ri, (env->cp15.mdcr_el3 & MDCR_TDCC); if (el < 1 && mdscr_el1_tdcc) { - return CP_ACCESS_TRAP; + return CP_ACCESS_TRAP_EL1; } if (el < 2 && (mdcr_el2_tda || mdcr_el2_tdcc)) { return CP_ACCESS_TRAP_EL2; |