From 8c52ca8c1775989b1eb161db1ada4cfc7bc51a5a Mon Sep 17 00:00:00 2001 From: Sona Mathew Date: Tue, 10 Dec 2024 13:48:41 -0600 Subject: [PATCH] refactor(cpufeat): add FGT2 and Debugv8p9 to realm state Enable FEAT_FGT2 and FEAT_Debugv8p9 in Realm state as well. Change-Id: Ib9cdde3af328ffdd8718b1ba404265757f2e542b Signed-off-by: Sona Mathew --- lib/el3_runtime/aarch64/context_mgmt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index f396752ef..2e6bce0ab 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -191,6 +191,16 @@ static void setup_realm_context(cpu_context_t *ctx, const struct entry_point_inf } write_ctx_reg(state, CTX_SCR_EL3, scr_el3); + + if (is_feat_fgt2_supported()) { + fgt2_enable(ctx); + } + + if (is_feat_debugv8p9_supported()) { + debugv8p9_extended_bp_wp_enable(ctx); + } + + } #endif /* ENABLE_RME */