fix(mask): remove system registers XXX_MASK definitions
This patch removes XXX_MASK definitions for system registers
bit fields which are replaced by MASK(XXX) macro used directly.
Masking and shifting operations are replaced with
INPLACE() and EXTRACT() macros.
XXX_BIT macros which were defined via INPLACE(XX, 1) are
replaced with (UL(1) << N) definitions, and their XXX_SHIFT
and XXX_WIDTH macros are removed to improve readability
and reduce code size.
This patch also fixes bug in duplicated declaration for
read_ID_AA64MMFR2_EL1() function in arch_helpers.c.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ife64413c45711ba39b043cdc3510cf90fca0cfb6
diff --git a/runtime/core/handler.c b/runtime/core/handler.c
index a87281d..31393b5 100644
--- a/runtime/core/handler.c
+++ b/runtime/core/handler.c
@@ -349,8 +349,8 @@
static bool is_el2_data_abort_gpf(unsigned long esr)
{
- if (((esr & ESR_EL2_EC_MASK) == ESR_EL2_EC_DATA_ABORT_SEL) &&
- ((esr & ESR_EL2_ABORT_FSC_MASK) == ESR_EL2_ABORT_FSC_GPF))
+ if (((esr & MASK(ESR_EL2_EC)) == ESR_EL2_EC_DATA_ABORT_SEL) &&
+ ((esr & MASK(ESR_EL2_ABORT_FSC)) == ESR_EL2_ABORT_FSC_GPF))
return true;
return false;
}