[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/11] target/arm: Make RVBAR available for non AARCH64 CPUs
From: |
Peter Maydell |
Subject: |
Re: [PATCH 04/11] target/arm: Make RVBAR available for non AARCH64 CPUs |
Date: |
Thu, 14 Jul 2022 16:28:57 +0100 |
On Thu, 14 Jul 2022 at 15:54, Tobias Roehmel <quic_trohmel@quicinc.com> wrote:
>
> From: Tobias Röhmel <quic_trohmel@quicinc.com>
>
> The ARM Cortex-R52 is not AARCH64 but uses RVBAR.
>
> Signed-off-by: Tobias Röhmel <quic_trohmel@quicinc.com>
> ---
> target/arm/cpu.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 1b5d535788..2c26a5387d 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -258,6 +258,10 @@ static void arm_cpu_reset(DeviceState *dev)
> env->cp15.cpacr_el1 = FIELD_DP64(env->cp15.cpacr_el1,
> CPACR, CP11, 3);
> #endif
> + if (arm_feature(env, ARM_FEATURE_V8_R)) {
> + env->cp15.rvbar = cpu->rvbar_prop;
> + env->regs[15] = cpu->rvbar_prop;
> + }
> }
>
> #if defined(CONFIG_USER_ONLY)
> @@ -1273,7 +1277,8 @@ void arm_cpu_post_init(Object *obj)
> qdev_property_add_static(DEVICE(obj),
> &arm_cpu_reset_hivecs_property);
> }
>
> - if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
> + if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) ||
> + arm_feature(&cpu->env, ARM_FEATURE_V8_R)) {
Rather than doing this, we should correct the feature bit
being tested -- the RVBAR register itself is present on all
v8 CPUs, so we should correspondingly provide the property on
all v8 CPUs, by checking ARM_FEATURE_V8 (ie the same check we
use for whether to add the RVBAR register definition).
> object_property_add_uint64_ptr(obj, "rvbar",
> &cpu->rvbar_prop,
> OBJ_PROP_FLAG_READWRITE);
> --
thanks
-- PMM
- [PATCH 00/11] Add Cortex-R52, Tobias Roehmel, 2022/07/14
- [PATCH 01/11] target/arm: Add ARM_FEATURE_V8_R, Tobias Roehmel, 2022/07/14
- [PATCH 04/11] target/arm: Make RVBAR available for non AARCH64 CPUs, Tobias Roehmel, 2022/07/14
- Re: [PATCH 04/11] target/arm: Make RVBAR available for non AARCH64 CPUs,
Peter Maydell <=
- [PATCH 06/11] target/arm: Add ARMCacheAttrs to the signature of pmsav8_mpu_lookup, Tobias Roehmel, 2022/07/14
- [PATCH 09/11] target/arm: Add PMSAv8r functionality, Tobias Roehmel, 2022/07/14
- [PATCH 08/11] target/arm Add PMSAv8r registers, Tobias Roehmel, 2022/07/14
- [PATCH 05/11] target/arm: Make stage_2_format for cache attributes optional, Tobias Roehmel, 2022/07/14
- [PATCH 03/11] target/arm: Add v8R MIDR register, Tobias Roehmel, 2022/07/14
- [PATCH 07/11] target/arm: Enable TTBCR_EAE for ARM_FEATURE_V8_R, Tobias Roehmel, 2022/07/14
- [PATCH 10/11] target/arm: Make SPSR_hyp accessible for Cortex-R52, Tobias Roehmel, 2022/07/14