feat(pmuv3): setup per world MDCR_EL3
MDCR_EL3 register will context switch across all worlds. Thus the pmuv3
init has to be part of context management initialization.
Change-Id: I10ef7a3071c0fc5c11a93d3c9c2a95ec8c6493bf
Signed-off-by: Mateusz Sulimowicz <matsul@google.com>
diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c
index f220d8a..3ad7133 100644
--- a/lib/el3_runtime/aarch64/context_mgmt.c
+++ b/lib/el3_runtime/aarch64/context_mgmt.c
@@ -573,6 +573,8 @@
if (is_feat_trf_supported()) {
trf_enable(ctx);
}
+
+ pmuv3_enable(ctx);
#endif /* IMAGE_BL31 */
/*
@@ -822,8 +824,6 @@
if (is_feat_brbe_supported()) {
brbe_enable(ctx);
}
-
- pmuv3_enable(ctx);
#endif /* IMAGE_BL31 */
}