summaryrefslogtreecommitdiff
path: root/plat/fvp
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2014-05-09 11:23:11 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2014-05-09 11:23:11 +0100
commitb3254e8547707ff57ed7766aba53933884bd6a1c (patch)
treece10aa2b21b36c307b7cb643ae21904bc226ae56 /plat/fvp
parent60bc4bbd0bf705f30327e3c37973bcf1e1851110 (diff)
Introduce IS_IN_ELX() macros
The goal of these macros is to improve code readability by providing a concise way to check whether we are running in the expected exception level. Change-Id: If9aebadfb6299a5196e9a582b442f0971d9909b1
Diffstat (limited to 'plat/fvp')
-rw-r--r--plat/fvp/aarch64/plat_common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plat/fvp/aarch64/plat_common.c b/plat/fvp/aarch64/plat_common.c
index edeb6e0..9e205a0 100644
--- a/plat/fvp/aarch64/plat_common.c
+++ b/plat/fvp/aarch64/plat_common.c
@@ -52,7 +52,6 @@ static unsigned long platform_config[CONFIG_LIMIT];
void enable_mmu()
{
unsigned long mair, tcr, ttbr, sctlr;
- unsigned long current_el = read_current_el();
/* Set the attributes in the right indices of the MAIR */
mair = MAIR_ATTR_SET(ATTR_DEVICE, ATTR_DEVICE_INDEX);
@@ -68,7 +67,7 @@ void enable_mmu()
/* Set TTBR bits as well */
ttbr = (unsigned long) l1_xlation_table;
- if (GET_EL(current_el) == MODE_EL3) {
+ if (IS_IN_EL3()) {
assert((read_sctlr_el3() & SCTLR_M_BIT) == 0);
write_mair_el3(mair);