summaryrefslogtreecommitdiff
path: root/bl1/aarch64/bl1_arch_setup.c
diff options
context:
space:
mode:
authorVikram Kanigiri <vikram.kanigiri@arm.com>2014-03-11 17:41:00 +0000
committerDan Handley <dan.handley@arm.com>2014-03-21 17:17:48 +0000
commit6ba0b6d6743534b3d443602dc88558d62ea432b3 (patch)
tree4581ce3cd1104da70e38e8855ec35e824e5cb625 /bl1/aarch64/bl1_arch_setup.c
parent5132060c48fe2dbc3ce64755cd83b61d6e017f10 (diff)
Remove partially qualified asm helper functions
Each ARM Trusted Firmware image should know in which EL it is running and it should use the corresponding register directly instead of reading currentEL and knowing which asm register to read/write Change-Id: Ief35630190b6f07c8fbb7ba6cb20db308f002945
Diffstat (limited to 'bl1/aarch64/bl1_arch_setup.c')
-rw-r--r--bl1/aarch64/bl1_arch_setup.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bl1/aarch64/bl1_arch_setup.c b/bl1/aarch64/bl1_arch_setup.c
index e82ad09b..f9443aa1 100644
--- a/bl1/aarch64/bl1_arch_setup.c
+++ b/bl1/aarch64/bl1_arch_setup.c
@@ -41,10 +41,10 @@ void bl1_arch_setup(void)
unsigned long tmp_reg = 0;
/* Enable alignment checks and set the exception endianess to LE */
- tmp_reg = read_sctlr();
+ tmp_reg = read_sctlr_el3();
tmp_reg |= (SCTLR_A_BIT | SCTLR_SA_BIT);
tmp_reg &= ~SCTLR_EE_BIT;
- write_sctlr(tmp_reg);
+ write_sctlr_el3(tmp_reg);
/*
* Enable HVCs, route FIQs to EL3, set the next EL to be AArch64, route
@@ -67,11 +67,10 @@ void bl1_arch_setup(void)
* Set the Secure EL1 required architectural state
******************************************************************************/
void bl1_arch_next_el_setup(void) {
- unsigned long current_sctlr, next_sctlr;
+ unsigned long next_sctlr;
/* Use the same endianness than the current BL */
- current_sctlr = read_sctlr();
- next_sctlr = (current_sctlr & SCTLR_EE_BIT);
+ next_sctlr = (read_sctlr_el3() & SCTLR_EE_BIT);
/* Set SCTLR Secure EL1 */
next_sctlr |= SCTLR_EL1_RES1;