diff options
| author | Boyan Karatotev <boyan.karatotev@arm.com> | 2025-07-07 13:21:13 +0100 |
|---|---|---|
| committer | Boyan Karatotev <boyan.karatotev@arm.com> | 2026-01-19 10:50:58 +0000 |
| commit | 553c24c3ad1fd996b4ae873b09a325c1747990a8 (patch) | |
| tree | b7d68a1cb1c1e9d0997a8d154a95df98c17496f3 /Makefile | |
| parent | 869cac12df11d4af1f746b25ed42731b81b4a0ef (diff) | |
| download | arm-trusted-firmware-553c24c3ad1fd996b4ae873b09a325c1747990a8.tar.gz arm-trusted-firmware-553c24c3ad1fd996b4ae873b09a325c1747990a8.zip | |
feat(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED again
FEAT_RAS was originally converted to FEAT_STATE_CHECKED in 6503ff291.
However, the ability to use it was removed with 970a4a8d8 by simply
saying it impacts execution at EL3. That's true, but FEAT_STATE_CHECKED
can still be allowed by being a bit clever about it.
First, the remainder of common code can be converted to use the
is_feat_ras_supported() helper instead of the `#if FEATURE` pattern.
There are no corner cases to consider there. The feature is either
present (and appropriate action must be taken) or the feature is not (so
we can skip RAS code).
A conscious choice is taken to check the RAS code in synchronize_errors
despite it being in a hot path. Any fixed platform that seeks to be
performant should be setting features to 0 or 1. Then, the
SCTLR_EL3.IESB bit is always set if ENABLE_FEAT_RAS != 0 since we expect
FEAT_IESB to be present if FEAT_RAS is (despite the architecture not
guaranteeing it). If FEAT_RAS isn't present then we don't particularly
care about the status of FEAT_IESB.
Second, platforms that don't set ENABLE_FEAT_RAS must continue to work.
This is true out of the box with the is_feat_xyz_supported() helpers, as
they make sure to fully disable code within them.
Third, platforms that do set ENABLE_FEAT_RAS=1 must continue to work.
This is also true out of the box and no logical change is undertaken in
common code.
Finally, ENABLE_FEAT_RAS is set to 2 on FVP. Having RAS implies that the
whole handling machinery will be built-in and registered as appropriate.
However, when RAS is built-in but not present in hardware, these
registrations can still happen, they will only never be invoked at
runtime.
Change-Id: I949e648601dc0951ef9c2b217f34136b6ea4b3dc
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2025, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2026, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -585,7 +585,6 @@ $(eval $(call assert_booleans,\ ENABLE_SME_FOR_SWD \ ENABLE_SVE_FOR_SWD \ ENABLE_FEAT_GCIE \ - ENABLE_FEAT_RAS \ FFH_SUPPORT \ ERROR_DEPRECATED \ FAULT_INJECTION_SUPPORT \ @@ -717,6 +716,7 @@ $(eval $(call assert_numerics,\ ENABLE_FEAT_VHE \ ENABLE_FEAT_MPAM \ ENABLE_FEAT_MPAM_PE_BW_CTRL \ + ENABLE_FEAT_RAS \ ENABLE_RME \ ENABLE_SPE_FOR_NS \ ENABLE_SYS_REG_TRACE_FOR_NS \ |
