* @param misc_reg Register number (see miscregs.hh)
* @param val Value to store
*/
- void setMiscReg(int misc_reg, MiscReg val) override;
+ void setMiscReg(int misc_reg, RegVal val) override;
/**
* Read a register within the PMU.
*
* @param misc_reg Register number (see miscregs.hh)
* @return Register value.
*/
- MiscReg readMiscReg(int misc_reg) override;
+ RegVal readMiscReg(int misc_reg) override;
protected: // PMU register types and constants
BitUnion32(PMCR_t)
typedef unsigned int EventTypeId;
protected: /* High-level register and interrupt handling */
- MiscReg readMiscRegInt(int misc_reg);
+ RegVal readMiscRegInt(int misc_reg);
/**
* PMCR write handling
*/
void raiseInterrupt();
+ /**
+ * Clear a PMU interrupt.
+ */
+ void clearInterrupt();
+
/**
* Get the value of a performance counter.
*
*/
void setCounterTypeRegister(CounterId id, PMEVTYPER_t type);
+ /**
+ * Used for writing the Overflow Flag Status Register (SET/CLR)
+ *
+ * This method implements a write to the PMOVSSET/PMOVSCLR registers.
+ * It is capturing change of state in the register bits so that
+ * the overflow interrupt can be raised/cleared as a side effect
+ * of the write.
+ *
+ * @param new_val New value of the Overflow Status Register
+ */
+ void setOverflowStatus(RegVal new_val);
+
protected: /* Probe handling and counter state */
struct CounterState;
protected: /* State that needs to be serialized */
/** Performance Monitor Count Enable Register */
- MiscReg reg_pmcnten;
+ RegVal reg_pmcnten;
/** Performance Monitor Control Register */
PMCR_t reg_pmcr;
PMSELR_t reg_pmselr;
/** Performance Monitor Interrupt Enable Register */
- MiscReg reg_pminten;
+ RegVal reg_pminten;
/** Performance Monitor Overflow Status Register */
- MiscReg reg_pmovsr;
+ RegVal reg_pmovsr;
/**
* Performance counter ID register
PMCR_t reg_pmcr_conf;
/** PMCR write mask when accessed from the guest */
- static const MiscReg reg_pmcr_wr_mask;
+ static const RegVal reg_pmcr_wr_mask;
/** Performance monitor interrupt number */
- ArmInterruptPin *const interrupt;
+ ArmInterruptPin *interrupt;
/**
* List of event types supported by this PMU.