qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: <tobias.roehmel@rwth-aachen.de>
To: <qemu-devel@nongnu.org>
Cc: peter.maydell@linaro.org,
	"Tobias Röhmel" <tobias.roehmel@rwth-aachen.de>
Subject: [PATCH v3 6/9] target/arm: Enable TTBCR_EAE for ARMv8-R AArch32
Date: Sat, 20 Aug 2022 16:19:11 +0200	[thread overview]
Message-ID: <20220820141914.217399-7-tobias.roehmel@rwth-aachen.de> (raw)
In-Reply-To: <20220820141914.217399-1-tobias.roehmel@rwth-aachen.de>

From: Tobias Röhmel <tobias.roehmel@rwth-aachen.de>

ARMv8-R AArch32 CPUs behave as if TTBCR.EAE is always 1 even
tough they don't have the TTBCR register.
See ARM Architecture Reference Manual Supplement - ARMv8, for the ARMv8-R
AArch32 architecture profile Version:A.c section C1.2.

Signed-off-by: Tobias Röhmel <tobias.roehmel@rwth-aachen.de>
---
 target/arm/debug_helper.c | 3 ++-
 target/arm/internals.h    | 3 ++-
 target/arm/tlb_helper.c   | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index b18a6bd3a2..44b1e32974 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -434,7 +434,8 @@ static uint32_t arm_debug_exception_fsr(CPUARMState *env)
         using_lpae = true;
     } else {
         if (arm_feature(env, ARM_FEATURE_LPAE) &&
-            (env->cp15.tcr_el[target_el].raw_tcr & TTBCR_EAE)) {
+            ((env->cp15.tcr_el[target_el].raw_tcr & TTBCR_EAE)
+            || arm_feature(env, ARM_FEATURE_V8_R))) {
             using_lpae = true;
         }
     }
diff --git a/target/arm/internals.h b/target/arm/internals.h
index b03049d920..e2a2b03d41 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -254,7 +254,8 @@ static inline bool extended_addresses_enabled(CPUARMState *env)
 {
     TCR *tcr = &env->cp15.tcr_el[arm_is_secure(env) ? 3 : 1];
     return arm_el_is_aa64(env, 1) ||
-           (arm_feature(env, ARM_FEATURE_LPAE) && (tcr->raw_tcr & TTBCR_EAE));
+           (arm_feature(env, ARM_FEATURE_LPAE) && ((tcr->raw_tcr & TTBCR_EAE)
+           || arm_feature(env, ARM_FEATURE_V8_R)));
 }
 
 /* Update a QEMU watchpoint based on the information the guest has set in the
diff --git a/target/arm/tlb_helper.c b/target/arm/tlb_helper.c
index 7d8a86b3c4..891326edb8 100644
--- a/target/arm/tlb_helper.c
+++ b/target/arm/tlb_helper.c
@@ -20,7 +20,8 @@ bool regime_using_lpae_format(CPUARMState *env, ARMMMUIdx mmu_idx)
         return true;
     }
     if (arm_feature(env, ARM_FEATURE_LPAE)
-        && (regime_tcr(env, mmu_idx)->raw_tcr & TTBCR_EAE)) {
+        && ((regime_tcr(env, mmu_idx)->raw_tcr & TTBCR_EAE)
+        || arm_feature(env, ARM_FEATURE_V8_R))) {
         return true;
     }
     return false;
-- 
2.25.1



  parent reply	other threads:[~2022-08-20 14:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20 14:19 [PATCH v3 0/9] Add ARM Cortex-R52 cpu tobias.roehmel
2022-08-20 14:19 ` [PATCH v3 1/9] target/arm: Add ARM_FEATURE_V8_R tobias.roehmel
2022-08-20 14:19 ` [PATCH v3 2/9] target/arm: Don't add all MIDR aliases for cores that immplement PMSA tobias.roehmel
2022-09-27 16:29   ` Peter Maydell
2022-08-20 14:19 ` [PATCH v3 3/9] target/arm: Make RVBAR available for all ARMv8 CPUs tobias.roehmel
2022-09-27 13:01   ` Peter Maydell
2022-08-20 14:19 ` [PATCH v3 4/9] target/arm: Make stage_2_format for cache attributes optional tobias.roehmel
2022-09-27 12:52   ` Peter Maydell
2022-08-20 14:19 ` [PATCH v3 5/9] target/arm: Add ARMCacheAttrs to the signature of pmsav8_mpu_lookup tobias.roehmel
2022-09-27 13:05   ` Peter Maydell
2022-08-20 14:19 ` tobias.roehmel [this message]
2022-09-27 13:20   ` [PATCH v3 6/9] target/arm: Enable TTBCR_EAE for ARMv8-R AArch32 Peter Maydell
2022-08-20 14:19 ` [PATCH v3 7/9] target/arm: Add PMSAv8r registers tobias.roehmel
2022-09-27 13:50   ` Peter Maydell
2022-10-15 13:07     ` Tobias Roehmel
2022-10-20 15:02       ` Peter Maydell
2022-08-20 14:19 ` [PATCH v3 8/9] target/arm: Add PMSAv8r functionality tobias.roehmel
2022-09-27 16:23   ` Peter Maydell
2022-08-20 14:19 ` [PATCH v3 9/9] target/arm: Add ARM Cortex-R52 cpu tobias.roehmel
2022-09-27 16:31 ` [PATCH v3 0/9] " Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220820141914.217399-7-tobias.roehmel@rwth-aachen.de \
    --to=tobias.roehmel@rwth-aachen.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).