Re: Add OpenSBI performance monitoring unit extension


Greg Favor
 

Anup,

For HARDWARE events, event_idx.code encodes a standard set of events starting from encoding '0'.  Insofar as it would be very nice for this to be writeable as is into an mhpmevent CSR without need for remapping of the encoding (for implementations that choose to directly support the SBI PMU encoding instead of having their own different encoding), this would be architecturally problematic.

In particular, the Privileged spec says the following about the mhpmevent CSRs:
"The meaning of these events is defined by the platform, but event 0 is defined to mean “no event.”"

In short, can the encoding assignment for HARDWARE events be shifted to start from encoding '1', and for encoding '0' to be defined as "no event"?

Greg

Join {tech-unixplatformspec@lists.riscv.org to automatically receive all group messages.