aboutsummaryrefslogtreecommitdiff
path: root/bl31/aarch64
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2013-11-12 16:41:16 +0000
committerDan Handley <dan.handley@arm.com>2013-11-27 15:31:06 +0000
commitc10bd2ce69e54a8c71fa773810e130fc465c03ac (patch)
tree34e34f2b4a21a448c4823f8b591579cfd1ca9f36 /bl31/aarch64
parentba3155bb0eb51ca4b5dcf43877c394381cff2fb1 (diff)
downloadarm-trusted-firmware-c10bd2ce69e54a8c71fa773810e130fc465c03ac.tar.gz
Move generic architectural setup out of blx_plat_arch_setup().
blx_plat_arch_setup() should only perform platform-specific architectural setup, e.g. enabling the MMU. This patch moves generic architectural setup code out of blx_plat_arch_setup(). Change-Id: I4ccf56b8c4a2fa84909817779a2d97a14aaafab6
Diffstat (limited to 'bl31/aarch64')
-rw-r--r--bl31/aarch64/bl31_entrypoint.S26
1 files changed, 24 insertions, 2 deletions
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S
index 3a850e6..3922840 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -31,6 +31,7 @@
#include <bl1.h>
#include <bl_common.h>
#include <platform.h>
+#include <arch.h>
.globl bl31_entrypoint
@@ -50,8 +51,29 @@ bl31_entrypoint:; .type bl31_entrypoint, %function
* indicating BL31 should be run, memory layout
* of the trusted SRAM available to BL31 and
* information about running the non-trusted
- * software already loaded by BL2. Check the
- * opcode out of paranoia.
+ * software already loaded by BL2.
+ * ---------------------------------------------
+ */
+
+ /* ---------------------------------------------
+ * Set the exception vector to something sane.
+ * ---------------------------------------------
+ */
+ adr x1, runtime_exceptions
+ msr vbar_el3, x1
+
+ /* ---------------------------------------------
+ * Enable the instruction cache.
+ * ---------------------------------------------
+ */
+ mrs x1, sctlr_el3
+ orr x1, x1, #SCTLR_I_BIT
+ msr sctlr_el3, x1
+
+ isb
+
+ /* ---------------------------------------------
+ * Check the opcodes out of paranoia.
* ---------------------------------------------
*/
mov x19, #RUN_IMAGE