diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2016-05-24 16:56:03 +0100 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2016-05-26 17:04:39 +0100 |
commit | e0ae9fab61263bf7ec5beaa8256c573f09c744f0 (patch) | |
tree | a2eb07bc604e9c53c7d4bbec0bf92e48bd4bca7b /include/common/asm_macros.S | |
parent | e141aa0357fd4977ba874f4f86874e2cadc73498 (diff) |
Introduce some helper macros for exception vectors
This patch introduces some assembler macros to simplify the
declaration of the exception vectors. It abstracts the section
the exception code is put into as well as the alignments
constraints mandated by the ARMv8 architecture. For all TF images,
the exception code has been updated to make use of these macros.
This patch also updates some invalid comments in the exception
vector code.
Change-Id: I35737b8f1c8c24b6da89b0a954c8152a4096fa95
Diffstat (limited to 'include/common/asm_macros.S')
-rw-r--r-- | include/common/asm_macros.S | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/common/asm_macros.S b/include/common/asm_macros.S index a331c051..00c7d88b 100644 --- a/include/common/asm_macros.S +++ b/include/common/asm_macros.S @@ -66,11 +66,30 @@ b.ne $label .endm + /* + * Declare the exception vector table, enforcing it is aligned on a + * 2KB boundary, as required by the ARMv8 architecture. + */ + .macro vector_base label + .section .vectors, "ax" + .align 11 + \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. + */ + .macro vector_entry label + .section .vectors, "ax" + .align 7 + \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 |