[PATCH v2 3/3] Add PMU section


Signed-off-by: Atish Patra <atish.patra@...>
riscv-platform-spec.adoc | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 5f52edf47a44..574734fc6243 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -72,6 +72,9 @@ The M platform has the following extensions:
|APLIC | Advanced PLIC
|AIA | Advanced Interrupt Architecture
|IMSIC | Incomning MSI Controller
+|L1D | L1 Data cache
+|LL | Last level cache
+|DTLB | DATA TLB cache

=== Specifications
@@ -103,6 +106,18 @@ to all hart-related caches.

==== PMU

+The RVA22 profile defines 32 PMU counters out-of-which first three counters are
+defined by the privilege specification while other 29 counters are programmable.
+The SBI PMU extension defines a set of hardware events that can be monitored using
+these programmable counters. This section defines the minimum number of programmable
+counters and hardware events required for an OS-A compatible platform.
+* Counters
+** The platform do not require to implement any of the programmable counters.
+* Events
+** The platform do not require to implement any of the hardware events defined
+in SBI PMU extensions.
==== Debug
The OS-A base platform requirements are -

@@ -409,6 +424,24 @@ The platforms which conform to server extension are required to implement +

==== PMU

+* Counters
+** The platform must implement at least 8 programmable counters.
+* Events
+** Hardware general events
+*** The platform must implement all of the general hardware events defined by
+the SBI PMU extension.
+** Hardware cache events
+*** The platform must implement all of the hardware cache events for READ operations
+while WRITE operation must be implemented for L1D, LL and DTLB caches.
+[underline]*_Implementation Note_*
+Any platform that do not implement the micro-architectural features related to
+a hardware event may hardwire the event value to zero.
==== Debug
The OS-A server platform requirements are all of the base above plus:


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