mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 05:35:35 +00:00
target/arm: Move DBGDIDR into ARMISARegisters
We're going to want to read the DBGDIDR register from KVM in a subsequent commit, which means it needs to be in the ARMISARegisters sub-struct. Move it. Backports commit 4426d3617d64922d97b74ed22e67e33b6fb7de0a from qemu
This commit is contained in:
parent
a6c9c87a5d
commit
cef6f3e72c
|
@ -1520,7 +1520,7 @@ static void cortex_a8_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_isar2 = 0x21232031;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x00111142;
|
||||
cpu->dbgdidr = 0x15141000;
|
||||
cpu->isar.dbgdidr = 0x15141000;
|
||||
cpu->clidr = (1 << 27) | (2 << 24) | 3;
|
||||
cpu->ccsidr[0] = 0xe007e01a; /* 16k L1 dcache. */
|
||||
cpu->ccsidr[1] = 0x2007e01a; /* 16k L1 icache. */
|
||||
|
@ -1593,7 +1593,7 @@ static void cortex_a9_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x00111142;
|
||||
cpu->dbgdidr = 0x35141000;
|
||||
cpu->isar.dbgdidr = 0x35141000;
|
||||
cpu->clidr = (1 << 27) | (1 << 24) | 3;
|
||||
cpu->ccsidr[0] = 0xe00fe019; /* 16k L1 dcache. */
|
||||
cpu->ccsidr[1] = 0x200fe019; /* 16k L1 icache. */
|
||||
|
@ -1659,7 +1659,7 @@ static void cortex_a7_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x10011142;
|
||||
cpu->dbgdidr = 0x3515f005;
|
||||
cpu->isar.dbgdidr = 0x3515f005;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32K L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32K L1 icache */
|
||||
|
@ -1702,7 +1702,7 @@ static void cortex_a15_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x10011142;
|
||||
cpu->dbgdidr = 0x3515f021;
|
||||
cpu->isar.dbgdidr = 0x3515f021;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32K L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32K L1 icache */
|
||||
|
|
|
@ -833,6 +833,7 @@ struct ARMCPU {
|
|||
uint32_t mvfr1;
|
||||
uint32_t mvfr2;
|
||||
uint32_t id_dfr0;
|
||||
uint32_t dbgdidr;
|
||||
uint64_t id_aa64isar0;
|
||||
uint64_t id_aa64isar1;
|
||||
uint64_t id_aa64pfr0;
|
||||
|
@ -860,7 +861,6 @@ struct ARMCPU {
|
|||
uint32_t id_mmfr4;
|
||||
uint64_t id_aa64afr0;
|
||||
uint64_t id_aa64afr1;
|
||||
uint32_t dbgdidr;
|
||||
uint32_t clidr;
|
||||
uint64_t mp_affinity; /* MP ID without feature bits */
|
||||
/* The elements of this array are the CCSIDR values for each cache,
|
||||
|
|
|
@ -133,7 +133,7 @@ static void aarch64_a57_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001124;
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */
|
||||
|
@ -184,7 +184,7 @@ static void aarch64_a53_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001122; /* 40 bit physical addr */
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x700fe01a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32KB L1 icache */
|
||||
|
@ -233,7 +233,7 @@ static void aarch64_a72_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001124;
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */
|
||||
|
|
|
@ -6031,7 +6031,7 @@ static void define_debug_regs(ARMCPU *cpu)
|
|||
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,
|
||||
.type = ARM_CP_CONST, .resetvalue = cpu->isar.dbgdidr,
|
||||
};
|
||||
|
||||
/* Note that all these register fields hold "number of Xs minus 1". */
|
||||
|
|
|
@ -943,7 +943,7 @@ static inline int arm_num_brps(ARMCPU *cpu)
|
|||
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
|
||||
return FIELD_EX64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, BRPS) + 1;
|
||||
} else {
|
||||
return FIELD_EX32(cpu->dbgdidr, DBGDIDR, BRPS) + 1;
|
||||
return FIELD_EX32(cpu->isar.dbgdidr, DBGDIDR, BRPS) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -957,7 +957,7 @@ static inline int arm_num_wrps(ARMCPU *cpu)
|
|||
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
|
||||
return FIELD_EX64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, WRPS) + 1;
|
||||
} else {
|
||||
return FIELD_EX32(cpu->dbgdidr, DBGDIDR, WRPS) + 1;
|
||||
return FIELD_EX32(cpu->isar.dbgdidr, DBGDIDR, WRPS) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ static inline int arm_num_ctx_cmps(ARMCPU *cpu)
|
|||
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
|
||||
return FIELD_EX64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, CTX_CMPS) + 1;
|
||||
} else {
|
||||
return FIELD_EX32(cpu->dbgdidr, DBGDIDR, CTX_CMPS) + 1;
|
||||
return FIELD_EX32(cpu->isar.dbgdidr, DBGDIDR, CTX_CMPS) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue