Skip to contentSkip to conversation

target-arm: Add ARM_CP_IO notation to PMCR reginfo

PATCH In review Peter Maydell 2 participants 2 messages Mar 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-arm: Add ARM_CP_IO notation to PMCR reginfo

Now that the PMCR writefn makes timer accesses, its reginfo needs the ARM_CP_IO flag, so that icount mode works correctly. (Fixes the bug accidentally introduced in commit 7c2cb42b).

---
 target-arm/helper.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/helper.c +1 -0
index aa5f22d..e895879 100644
@@ -1983,6 +1983,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
         ARMCPRegInfo pmcr = {
             .name = "PMCR", .cp = 15, .crn = 9, .crm = 12, .opc1 = 0, .opc2 = 0,
             .access = PL0_RW, .resetvalue = cpu->midr & 0xff000000,
+            .type = ARM_CP_IO,
             .fieldoffset = offsetof(CPUARMState, cp15.c9_pmcr),
             .accessfn = pmreg_access, .writefn = pmcr_write,
             .raw_writefn = raw_write,
Signature · 1 line
1.9.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Peter Maydell

Now that the PMCR writefn makes timer accesses, its reginfo needs the ARM_CP_IO flag, so that icount mode works correctly. (Fixes the bug accidentally introduced in commit 7c2cb42b).

Thanks,

Laurent

Quoted 19 lines
---
 target-arm/helper.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/helper.c +1 -1
index aa5f22d..e895879 100644
@@ -1983,6 +1983,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
         ARMCPRegInfo pmcr = {
             .name = "PMCR", .cp = 15, .crn = 9, .crm = 12, .opc1 = 0, .opc2 = 0,
             .access = PL0_RW, .resetvalue = cpu->midr & 0xff000000,
+            .type = ARM_CP_IO,
             .fieldoffset = offsetof(CPUARMState, cp15.c9_pmcr),
             .accessfn = pmreg_access, .writefn = pmcr_write,
             .raw_writefn = raw_write,
--

1.9.0