aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/arm64/include/armv8/arch/lib_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm64/include/armv8/arch/lib_helpers.h')
-rw-r--r--src/arch/arm64/include/armv8/arch/lib_helpers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/arm64/include/armv8/arch/lib_helpers.h b/src/arch/arm64/include/armv8/arch/lib_helpers.h
index bb7300f2b..315a0c0b0 100644
--- a/src/arch/arm64/include/armv8/arch/lib_helpers.h
+++ b/src/arch/arm64/include/armv8/arch/lib_helpers.h
@@ -261,6 +261,16 @@
402:
.endm
+/* Macro to read from an el1 register */
+.macro read_el1 xreg sysreg
+ mrs \xreg, \sysreg\()_el1
+.endm
+
+/* Macro to write to an el1 register */
+.macro write_el1 sysreg xreg temp
+ msr \sysreg\()_el1, \xreg
+.endm
+
/* Macro to read from an el0 register */
.macro read_el0 xreg sysreg
mrs \xreg, \sysreg\()_el0