Re: Proposal v2: SBI PMU Extension
toggle quoted message Show quoted text
Can I request that the default code path for turning an event_idx value into a value to write into mhpmeventX is to simply write event_idx[XLEN-1:0] into mhpmeventX.
Future hardware can then (optionally) choose to implement their mhpmeventX's with this standardized format and avoid the need to provide implementation-specific code for translating event_idx to the value to write into the implementation's mhpmeventX's. Other past and future implementations can of course do whatever they want and provide a custom piece of "translation" code for use within OpenSBI.
In essence, this SBI PMU extension serves to standardize the low twenty bits (event_idx.type + event_idx.code) of mhpmeventX in a way that meshes fully and cleanly with what Linux perf currently supports (which is great). While type==RAW (and the event_idx.info field) provides support for whatever else an implementation wants to do with all the other bits of mhpmeventX.
On Thu, Jul 9, 2020 at 12:57 AM Anup Patel <Anup.Patel@...> wrote: