summaryrefslogtreecommitdiff
path: root/src/arch/armv7/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/armv7/include')
-rw-r--r--src/arch/armv7/include/arch/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/armv7/include/arch/cpu.h b/src/arch/armv7/include/arch/cpu.h
index 2613025348..ec37a969ce 100644
--- a/src/arch/armv7/include/arch/cpu.h
+++ b/src/arch/armv7/include/arch/cpu.h
@@ -98,4 +98,10 @@ inline static void sev(void)
asm volatile ("sev");
}
+/* puts CPU into SVC32 mode and disable interrupts. */
+inline static void set_svc32_mode(void)
+{
+ asm volatile("msr cpsr_c, %0" :: "r"(0x13 | 0xc0));
+}
+
#endif /* __ARCH_CPU_H__ */