summaryrefslogtreecommitdiff
path: root/services/std_svc
diff options
context:
space:
mode:
authorBoyan Karatotev <boyan.karatotev@arm.com>2023-02-15 13:21:50 +0000
committerJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>2023-06-29 09:59:06 +0100
commitc73686a11cea8f9d22d7df3c5480f8824cfeec09 (patch)
treea64bf0813458d8889cd3c324488bcd5ff80069e3 /services/std_svc
parent33815eb7194e662169676b2ce88ee4785aac9ccd (diff)
feat(pmu): introduce pmuv3 lib/extensions folder
The enablement code for the PMU is scattered and difficult to track down. Factor out the feature into its own lib/extensions folder and consolidate the implementation. Treat it is as an architecturally mandatory feature as it is currently. Additionally, do some cleanup on AArch64. Setting overflow bits in PMCR_EL0 is irrelevant for firmware so don't do it. Then delay the PMU initialisation until the context management stage which simplifies the early environment assembly. One side effect is that the PMU might count before this happens so reset all counters to 0 to prevent any leakage. Finally, add an enable to manage_extensions_realm() as realm world uses the pmu. This introduces the HPMN fixup to realm world. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Ie13a8625820ecc5fbfa467dc6ca18025bf6a9cd3
Diffstat (limited to 'services/std_svc')
-rw-r--r--services/std_svc/rmmd/rmmd_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/std_svc/rmmd/rmmd_main.c b/services/std_svc/rmmd/rmmd_main.c
index 24f6c4127..c80b524e6 100644
--- a/services/std_svc/rmmd/rmmd_main.c
+++ b/services/std_svc/rmmd/rmmd_main.c
@@ -18,6 +18,8 @@
#include <context.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/el3_runtime/pubsub.h>
+#include <lib/extensions/pmuv3.h>
+#include <lib/extensions/sys_reg_trace.h>
#include <lib/gpt_rme/gpt_rme.h>
#include <lib/spinlock.h>
@@ -125,6 +127,8 @@ static void manage_extensions_realm(cpu_context_t *ctx)
*/
sve_enable(ctx);
}
+
+ pmuv3_enable(ctx);
}
/*******************************************************************************