[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 5/6] target/arm: Conditionalize DBGDIDR vs ID_AA64
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC 5/6] target/arm: Conditionalize DBGDIDR vs ID_AA64DFR0_EL1 assert |
Date: |
Tue, 30 Apr 2019 13:40:47 +0100 |
On Sat, 23 Feb 2019 at 02:40, Richard Henderson
<address@hidden> wrote:
>
> Only perform the assert when both registers exist.
> Extract the variables from ID_AA64DFR0_EL1 for AArch64.
>
> Signed-off-by: Richard Henderson <address@hidden>
> + if (have_aa32) {
> + ARMCPRegInfo dbgdidr = {
> + .name = "DBGDIDR", .cp = 14, .crn = 0, .crm = 0,
> + .opc1 = 0, .opc2 = 0, .access = PL0_R, .accessfn = access_tda,
> + .type = ARM_CP_CONST, .resetvalue = cpu->dbgdidr,
> + };
> + define_one_arm_cp_reg(cpu, &dbgdidr);
> + }
So if only EL0 has AArch32 it doesn't architecturally require
that this AArch32 system register doesn't exist, because the
register is still readable from EL0. The Arm ARM says that
"implementation of this register is optional and deprecated".
I would suggest that we should probably go with "implement the
register if cpu->dbgdidr is non-zero", since at least bit 15
must be set so zero isn't a valid real value for it.
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC 5/6] target/arm: Conditionalize DBGDIDR vs ID_AA64DFR0_EL1 assert,
Peter Maydell <=