target/arm: Mark up VNCR offsets (offsets >= 0x200, except GIC)
Mark up the cpreginfo structs to indicate offsets for system registers from VNCR_EL2, as defined in table D8-66 in rule R_CSRPQ in the Arm ARM. This covers all the remaining offsets at 0x200 and above, except for the GIC ICH_* registers. (Note that because we don't implement FEAT_SPE, FEAT_TRF, FEAT_MPAM, FEAT_BRBE or FEAT_AMUv1p1 we don't implement any of the registers that use offsets at 0x800 and above.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Miguel Luis <miguel.luis@oracle.com>
This commit is contained in:
parent
46932cf26e
commit
f5bd261a61
@ -4287,6 +4287,7 @@ static const ARMCPRegInfo vmsa_pmsa_cp_reginfo[] = {
|
|||||||
.opc0 = 3, .crn = 6, .crm = 0, .opc1 = 0, .opc2 = 0,
|
.opc0 = 3, .crn = 6, .crm = 0, .opc1 = 0, .opc2 = 0,
|
||||||
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
||||||
.fgt = FGT_FAR_EL1,
|
.fgt = FGT_FAR_EL1,
|
||||||
|
.nv2_redirect_offset = 0x220 | NV2_REDIR_NV1,
|
||||||
.fieldoffset = offsetof(CPUARMState, cp15.far_el[1]),
|
.fieldoffset = offsetof(CPUARMState, cp15.far_el[1]),
|
||||||
.resetvalue = 0, },
|
.resetvalue = 0, },
|
||||||
};
|
};
|
||||||
@ -4302,6 +4303,7 @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = {
|
|||||||
.opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 0,
|
.opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 0,
|
||||||
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
||||||
.fgt = FGT_TTBR0_EL1,
|
.fgt = FGT_TTBR0_EL1,
|
||||||
|
.nv2_redirect_offset = 0x200 | NV2_REDIR_NV1,
|
||||||
.writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write,
|
.writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write,
|
||||||
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr0_s),
|
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr0_s),
|
||||||
offsetof(CPUARMState, cp15.ttbr0_ns) } },
|
offsetof(CPUARMState, cp15.ttbr0_ns) } },
|
||||||
@ -4309,6 +4311,7 @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = {
|
|||||||
.opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 1,
|
.opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 1,
|
||||||
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
.access = PL1_RW, .accessfn = access_tvm_trvm,
|
||||||
.fgt = FGT_TTBR1_EL1,
|
.fgt = FGT_TTBR1_EL1,
|
||||||
|
.nv2_redirect_offset = 0x210 | NV2_REDIR_NV1,
|
||||||
.writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write,
|
.writefn = vmsa_ttbr_write, .resetvalue = 0, .raw_writefn = raw_write,
|
||||||
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr1_s),
|
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.ttbr1_s),
|
||||||
offsetof(CPUARMState, cp15.ttbr1_ns) } },
|
offsetof(CPUARMState, cp15.ttbr1_ns) } },
|
||||||
@ -5741,6 +5744,7 @@ static const ARMCPRegInfo v8_cp_reginfo[] = {
|
|||||||
.type = ARM_CP_ALIAS,
|
.type = ARM_CP_ALIAS,
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 4, .crm = 0, .opc2 = 1,
|
.opc0 = 3, .opc1 = 0, .crn = 4, .crm = 0, .opc2 = 1,
|
||||||
.access = PL1_RW, .accessfn = access_nv1,
|
.access = PL1_RW, .accessfn = access_nv1,
|
||||||
|
.nv2_redirect_offset = 0x230 | NV2_REDIR_NV1,
|
||||||
.fieldoffset = offsetof(CPUARMState, elr_el[1]) },
|
.fieldoffset = offsetof(CPUARMState, elr_el[1]) },
|
||||||
{ .name = "SPSR_EL1", .state = ARM_CP_STATE_AA64,
|
{ .name = "SPSR_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
.type = ARM_CP_ALIAS,
|
.type = ARM_CP_ALIAS,
|
||||||
@ -5760,6 +5764,7 @@ static const ARMCPRegInfo v8_cp_reginfo[] = {
|
|||||||
.fieldoffset = offsetof(CPUARMState, sp_el[0]) },
|
.fieldoffset = offsetof(CPUARMState, sp_el[0]) },
|
||||||
{ .name = "SP_EL1", .state = ARM_CP_STATE_AA64,
|
{ .name = "SP_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
.opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0,
|
.opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0,
|
||||||
|
.nv2_redirect_offset = 0x240,
|
||||||
.access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP,
|
.access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP,
|
||||||
.fieldoffset = offsetof(CPUARMState, sp_el[1]) },
|
.fieldoffset = offsetof(CPUARMState, sp_el[1]) },
|
||||||
{ .name = "SPSel", .state = ARM_CP_STATE_AA64,
|
{ .name = "SPSel", .state = ARM_CP_STATE_AA64,
|
||||||
@ -6882,9 +6887,11 @@ static const ARMCPRegInfo minimal_ras_reginfo[] = {
|
|||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
{ .name = "VDISR_EL2", .state = ARM_CP_STATE_BOTH,
|
{ .name = "VDISR_EL2", .state = ARM_CP_STATE_BOTH,
|
||||||
.opc0 = 3, .opc1 = 4, .crn = 12, .crm = 1, .opc2 = 1,
|
.opc0 = 3, .opc1 = 4, .crn = 12, .crm = 1, .opc2 = 1,
|
||||||
|
.nv2_redirect_offset = 0x500,
|
||||||
.access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.vdisr_el2) },
|
.access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.vdisr_el2) },
|
||||||
{ .name = "VSESR_EL2", .state = ARM_CP_STATE_BOTH,
|
{ .name = "VSESR_EL2", .state = ARM_CP_STATE_BOTH,
|
||||||
.opc0 = 3, .opc1 = 4, .crn = 5, .crm = 2, .opc2 = 3,
|
.opc0 = 3, .opc1 = 4, .crn = 5, .crm = 2, .opc2 = 3,
|
||||||
|
.nv2_redirect_offset = 0x508,
|
||||||
.access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.vsesr_el2) },
|
.access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.vsesr_el2) },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -9548,6 +9555,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||||||
.access = PL1_RW, .writefn = vbar_write,
|
.access = PL1_RW, .writefn = vbar_write,
|
||||||
.accessfn = access_nv1,
|
.accessfn = access_nv1,
|
||||||
.fgt = FGT_VBAR_EL1,
|
.fgt = FGT_VBAR_EL1,
|
||||||
|
.nv2_redirect_offset = 0x250 | NV2_REDIR_NV1,
|
||||||
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.vbar_s),
|
.bank_fieldoffsets = { offsetof(CPUARMState, cp15.vbar_s),
|
||||||
offsetof(CPUARMState, cp15.vbar_ns) },
|
offsetof(CPUARMState, cp15.vbar_ns) },
|
||||||
.resetvalue = 0 },
|
.resetvalue = 0 },
|
||||||
|
Loading…
Reference in New Issue
Block a user