From f5360cfa819f13ed1caf1cfb774a876bc3f29377 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 17 Nov 2022 16:42:09 +0000 Subject: refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED At the moment we only support FEAT_TRBE to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_TRBE_FOR_NS=2), by splitting is_feat_trbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access TRBE related registers. The FVP platform decided to compile in support unconditionally (=1), even though FEAT_TRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime. Change-Id: Iee7f88ea930119049543a8a4a105389997e7692c Signed-off-by: Andre Przywara --- plat/arm/board/fvp/platform.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plat') diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk index efbf68f00..7991c14f6 100644 --- a/plat/arm/board/fvp/platform.mk +++ b/plat/arm/board/fvp/platform.mk @@ -446,7 +446,7 @@ DYN_DISABLE_AUTH := 1 endif # enable trace buffer control registers access to NS by default -ENABLE_TRBE_FOR_NS := 1 +ENABLE_TRBE_FOR_NS := 2 # enable branch record buffer control registers access in NS by default # only enable for aarch64 -- cgit v1.2.1 From ff491036603c34bd80137f5fd43878eae5585197 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 17 Nov 2022 16:42:09 +0000 Subject: refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED At the moment we only support FEAT_BRBE to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_BRBE_FOR_NS=2), by splitting is_feat_brbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access BRBE related registers. The FVP platform decided to compile in support unconditionally (=1), even though FEAT_BRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime. Change-Id: I5f2e2c9648300f65f0fa9a5f8e2f34e73529d053 Signed-off-by: Andre Przywara --- plat/arm/board/fvp/platform.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plat') diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk index 7991c14f6..dda7e6cfe 100644 --- a/plat/arm/board/fvp/platform.mk +++ b/plat/arm/board/fvp/platform.mk @@ -453,7 +453,7 @@ ENABLE_TRBE_FOR_NS := 2 # do not enable when ENABLE_RME=1 ifeq (${ARCH}, aarch64) ifeq (${ENABLE_RME},0) - ENABLE_BRBE_FOR_NS := 1 + ENABLE_BRBE_FOR_NS := 2 endif endif -- cgit v1.2.1 From fc8d2d3980352f92cf378155c1f4449b4a0ab4c0 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 17 Nov 2022 17:30:43 +0000 Subject: refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED At the moment we only support FEAT_TRF to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_TRF_FOR_NS=2), by splitting is_feat_trf_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access TRF related registers. Also move the context saving code from assembly to C, and use the new is_feat_trf_supported() function to guard its execution. The FVP platform decided to compile in support unconditionally (=1), even though FEAT_TRF is an ARMv8.4 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime. Change-Id: Ia97b01adbe24970a4d837afd463dc5506b7295a3 Signed-off-by: Andre Przywara --- plat/arm/board/fvp/platform.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plat') diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk index dda7e6cfe..9b09a6bb9 100644 --- a/plat/arm/board/fvp/platform.mk +++ b/plat/arm/board/fvp/platform.mk @@ -461,7 +461,7 @@ endif ENABLE_SYS_REG_TRACE_FOR_NS := 1 # enable trace filter control registers access to NS by default -ENABLE_TRF_FOR_NS := 1 +ENABLE_TRF_FOR_NS := 2 # Linux relies on EL3 enablement if those features are present ENABLE_FEAT_FGT := 2 -- cgit v1.2.1