summaryrefslogtreecommitdiff
path: root/include/common/asm_macros.S
diff options
context:
space:
mode:
Diffstat (limited to 'include/common/asm_macros.S')
-rw-r--r--include/common/asm_macros.S29
1 files changed, 27 insertions, 2 deletions
diff --git a/include/common/asm_macros.S b/include/common/asm_macros.S
index a331c051..d4bd11ee 100644
--- a/include/common/asm_macros.S
+++ b/include/common/asm_macros.S
@@ -66,11 +66,36 @@
b.ne $label
.endm
+ /*
+ * Declare the exception vector table, enforcing it is aligned on a
+ * 2KB boundary, as required by the ARMv8 architecture.
+ * Use zero bytes as the fill value to be stored in the padding bytes
+ * so that it inserts illegal AArch64 instructions. This increases
+ * security, robustness and potentially facilitates debugging.
+ */
+ .macro vector_base label
+ .section .vectors, "ax"
+ .align 11, 0
+ \label:
+ .endm
+
+ /*
+ * Create an entry in the exception vector table, enforcing it is
+ * aligned on a 128-byte boundary, as required by the ARMv8 architecture.
+ * Use zero bytes as the fill value to be stored in the padding bytes
+ * so that it inserts illegal AArch64 instructions. This increases
+ * security, robustness and potentially facilitates debugging.
+ */
+ .macro vector_entry label
+ .section .vectors, "ax"
+ .align 7, 0
+ \label:
+ .endm
/*
- * This macro verifies that the a given vector doesn't exceed the
+ * This macro verifies that the given vector doesn't exceed the
* architectural limit of 32 instructions. This is meant to be placed
- * immedately after the last instruction in the vector. It takes the
+ * immediately after the last instruction in the vector. It takes the
* vector entry as the parameter
*/
.macro check_vector_size since