diff --git a/qemu/target-arm/cpu-qom.h b/qemu/target-arm/cpu-qom.h index 9f60d26b..9de8dec0 100644 --- a/qemu/target-arm/cpu-qom.h +++ b/qemu/target-arm/cpu-qom.h @@ -147,6 +147,8 @@ typedef struct ARMCPU { uint32_t id_pfr0; uint32_t id_pfr1; uint32_t id_dfr0; + uint32_t pmceid0; + uint32_t pmceid1; uint32_t id_afr0; uint32_t id_mmfr0; uint32_t id_mmfr1; diff --git a/qemu/target-arm/cpu.c b/qemu/target-arm/cpu.c index 192e8f63..6191cf49 100644 --- a/qemu/target-arm/cpu.c +++ b/qemu/target-arm/cpu.c @@ -1043,6 +1043,8 @@ static void cortex_a15_initfn(struct uc_struct *uc, Object *obj, void *opaque) cpu->id_pfr0 = 0x00001131; cpu->id_pfr1 = 0x00011011; cpu->id_dfr0 = 0x02010555; + cpu->pmceid0 = 0x00000000; + cpu->pmceid1 = 0x00000000; cpu->id_afr0 = 0x00000000; cpu->id_mmfr0 = 0x10201105; cpu->id_mmfr1 = 0x20000000; diff --git a/qemu/target-arm/cpu64.c b/qemu/target-arm/cpu64.c index efddbfde..94cb7409 100644 --- a/qemu/target-arm/cpu64.c +++ b/qemu/target-arm/cpu64.c @@ -118,6 +118,8 @@ static void aarch64_a57_initfn(struct uc_struct *uc, Object *obj, void *opaque) cpu->id_isar5 = 0x00011121; cpu->id_aa64pfr0 = 0x00002222; cpu->id_aa64dfr0 = 0x10305106; + cpu->pmceid0 = 0x00000000; + cpu->pmceid1 = 0x00000000; cpu->id_aa64isar0 = 0x00011120; cpu->id_aa64mmfr0 = 0x00001124; cpu->dbgdidr = 0x3516d000; diff --git a/qemu/target-arm/helper.c b/qemu/target-arm/helper.c index aa7c6b33..2f72c7ef 100644 --- a/qemu/target-arm/helper.c +++ b/qemu/target-arm/helper.c @@ -3789,6 +3789,18 @@ void register_cp_regs_for_features(ARMCPU *cpu) ARM_CP_CONST, PL1_R, 0, NULL, cpu->mvfr1 }, { "MVFR2_EL1", 0,0,3, 3,0,2, ARM_CP_STATE_AA64, ARM_CP_CONST, PL1_R, 0, NULL, cpu->mvfr2 }, + { "PMCEID0", 15,9,12, 0,0,6, ARM_CP_STATE_AA32, ARM_CP_CONST, + PL0_R, 0, NULL, cpu->pmceid0, 0, {0, 0}, + pmreg_access }, + { "PMCEID0_EL0", 0,9,12, 3,3,6, ARM_CP_STATE_AA64, ARM_CP_CONST, + PL0_R, 0, NULL, cpu->pmceid0, 0, {0, 0}, + pmreg_access }, + { "PMCEID1", 15,9,12, 0,0,7, ARM_CP_STATE_AA32, ARM_CP_CONST, + PL0_R, 0, NULL, cpu->pmceid1, 0, {0, 0}, + pmreg_access }, + { "PMCEID1_EL0", 0,9,12, 3,3,7, ARM_CP_STATE_AA64, ARM_CP_CONST, + PL0_R, 0, NULL, cpu->pmceid1, 0, {0, 0}, + pmreg_access }, REGINFO_SENTINEL }; /* RVBAR_EL1 is only implemented if EL1 is the highest EL */