[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 11/11] target/arm: Implement cortex-a710
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 11/11] target/arm: Implement cortex-a710 |
Date: |
Tue, 29 Aug 2023 13:38:53 +0100 |
On Fri, 11 Aug 2023 at 22:42, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The cortex-a710 is a first generation ARMv9.0-A processor.
> diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
> index b12e10d3ab..81c27c70e8 100644
> --- a/target/arm/tcg/cpu64.c
> +++ b/target/arm/tcg/cpu64.c
> @@ -758,6 +758,239 @@ static void aarch64_neoverse_v1_initfn(Object *obj)
> aarch64_add_sve_properties(obj);
> }
>
> +static bool trap_tidcp(CPUARMState *env)
> +{
> + return arm_current_el(env) < 2 && (arm_hcr_el2_eff(env) & HCR_TIDCP);
> +}
> +
> +static CPAccessResult access_tidcp(CPUARMState *env, const ARMCPRegInfo *r,
> + bool read)
> +{
> + return trap_tidcp(env) ? CP_ACCESS_TRAP_EL2 : CP_ACCESS_OK;
> +}
> +
> +static CPAccessResult access_tidcp_actlr_w(CPUARMState *env,
> + const ARMCPRegInfo *r, bool read)
> +{
> + if (trap_tidcp(env)) {
> + return CP_ACCESS_TRAP_EL2;
> + }
> + return access_actlr_w(env, r, read);
> +}
HCR_EL2.TIDCP traps accesses to a whole IMPDEF range, not
just to the registers that the implementation happens to
define. We should implement this in translate.c, translate-a64.c
and op_helper.c in a similar way to what we do for the aa64_ids
feature, so that we correctly prioritize the trap over the
UNDEF for registers in the space that don't exist, and so
that we don't need to explicitly add the TICDP check to
every IMPDEF register.
Since we already don't implement this correctly for the
other CPUs, we don't need to gate Cortex-A710 on doing
it right.
thanks
-- PMM
- [PATCH v2 10/11] target/arm: Implement FEAT_HPDS2 as a no-op, (continued)
- [PATCH v2 10/11] target/arm: Implement FEAT_HPDS2 as a no-op, Richard Henderson, 2023/08/11
- [PATCH v2 02/11] target/arm: Allow cpu to configure GM blocksize, Richard Henderson, 2023/08/11
- [PATCH v2 07/11] target/arm: Apply access checks to neoverse-v1 special registers, Richard Henderson, 2023/08/11
- [PATCH v2 01/11] target/arm: Reduce dcz_blocksize to uint8_t, Richard Henderson, 2023/08/11
- [PATCH v2 05/11] target/arm: Introduce make_ccsidr64, Richard Henderson, 2023/08/11
- [PATCH v2 11/11] target/arm: Implement cortex-a710, Richard Henderson, 2023/08/11
- Re: [PATCH v2 11/11] target/arm: Implement cortex-a710,
Peter Maydell <=
- Re: [PATCH v2 00/11] target/arm: Implement cortex-a710, Peter Maydell, 2023/08/29