Add more ARM flag definitions and complete initialisation stage 1
[bootloader-ap.git] / arch / arm-head.S
index ef9e8cd..1fe24ce 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <boot/linkage.h>
 #include <boot/version.h>
+#include <boot/arm.h>
 
     .section ".text", #alloc, #execinstr
 ENTRY(_start)
@@ -55,4 +56,8 @@ ENTRY(__init)
     bl      SET_SA                  @ sense amp settings
     bl      __cpu_early_init
 
+    msr     cpsr_c, #(USR_MODE | PSR_F_BIT | PSR_I_BIT | SVC26_MODE)
+    ldr     r0,=0x0050078
+    mcr     p15,0,r0,c1,c0,0      //; WCP15_SCTLR  r2
+    ISB                             @ macro for "isb sy" because compiler may not support opcode
 // EOF