mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 05:01:06 +00:00
target/arm: Implement the access tag cache flushes
Like the regular data cache flushes, these are nops within qemu. Backports commit 5463df160ecee510e78493993eb1bd38b4838a10 from qemu
This commit is contained in:
parent
4bb37fc3c1
commit
7147f5f28a
|
@ -6631,6 +6631,32 @@ static const ARMCPRegInfo mte_reginfo[] = {
|
|||
.opc0 = 3, .opc1 = 3, .crn = 4, .crm = 2, .opc2 = 7,
|
||||
.type = ARM_CP_NO_RAW,
|
||||
.access = PL0_RW, .readfn = tco_read, .writefn = tco_write },
|
||||
{ .name = "DC_IGVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 3,
|
||||
.type = ARM_CP_NOP, .access = PL1_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_IGSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 4,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
{ .name = "DC_IGDVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 5,
|
||||
.type = ARM_CP_NOP, .access = PL1_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_IGDSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 6,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
{ .name = "DC_CGSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 10, .opc2 = 4,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
{ .name = "DC_CGDSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 10, .opc2 = 6,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
{ .name = "DC_CIGSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 14, .opc2 = 4,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
{ .name = "DC_CIGDSW", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 7, .crm = 14, .opc2 = 6,
|
||||
.type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw },
|
||||
REGINFO_SENTINEL
|
||||
};
|
||||
|
||||
|
@ -6641,6 +6667,42 @@ static const ARMCPRegInfo mte_tco_ro_reginfo[] = {
|
|||
REGINFO_SENTINEL
|
||||
};
|
||||
|
||||
static const ARMCPRegInfo mte_el0_cacheop_reginfo[] = {
|
||||
{ .name = "DC_CGVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 10, .opc2 = 3,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CGDVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 10, .opc2 = 5,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CGVAP", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 12, .opc2 = 3,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CGDVAP", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 12, .opc2 = 5,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CGVADP", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 13, .opc2 = 3,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CGDVADP", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 13, .opc2 = 5,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CIGVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 14, .opc2 = 3,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
{ .name = "DC_CIGDVAC", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 3, .crn = 7, .crm = 14, .opc2 = 5,
|
||||
.type = ARM_CP_NOP, .access = PL0_W,
|
||||
.accessfn = aa64_cacheop_poc_access },
|
||||
REGINFO_SENTINEL
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static CPAccessResult access_predinv(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
|
@ -7760,8 +7822,10 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
*/
|
||||
if (cpu_isar_feature(aa64_mte, cpu)) {
|
||||
define_arm_cp_regs(cpu, mte_reginfo);
|
||||
define_arm_cp_regs(cpu, mte_el0_cacheop_reginfo);
|
||||
} else if (cpu_isar_feature(aa64_mte_insn_reg, cpu)) {
|
||||
define_arm_cp_regs(cpu, mte_tco_ro_reginfo);
|
||||
define_arm_cp_regs(cpu, mte_el0_cacheop_reginfo);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue