From b739f22a99c96d5a295f083125505b5b5ec2f8b6 Mon Sep 17 00:00:00 2001 From: Achin Gupta Date: Sat, 18 Jan 2014 16:50:09 +0000 Subject: Setup VBAR_EL3 incrementally This patch ensures that VBAR_EL3 points to the simple stack-less 'early_exceptions' when the C runtime stack is not correctly setup to use the more complex 'runtime_exceptions'. It is initialised to 'runtime_exceptions' once this is done. This patch also moves all exception vectors into a '.vectors' section and modifies linker scripts to place all such sections together. This will minimize space wastage from alignment restrictions. Change-Id: I8c3e596ea3412c8bd582af9e8d622bb1cb2e049d --- bl1/aarch64/early_exceptions.S | 9 +++++---- bl1/bl1.ld.S | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'bl1') diff --git a/bl1/aarch64/early_exceptions.S b/bl1/aarch64/early_exceptions.S index ef47f9e..84bdae1 100644 --- a/bl1/aarch64/early_exceptions.S +++ b/bl1/aarch64/early_exceptions.S @@ -37,12 +37,12 @@ .globl early_exceptions .weak display_boot_progress - .section .text, "ax"; .align 11 + .section .vectors, "ax"; .align 11 /* ----------------------------------------------------- - * Very simple exception handlers used by BL1 and BL2. - * Apart from one SMC exception all other traps loop - * endlessly. + * Very simple stackless exception handlers used by all + * bootloader stages. BL31 uses them before stacks are + * setup. BL1/BL2 use them throughout. * ----------------------------------------------------- */ .align 7 @@ -164,6 +164,7 @@ SErrorA32: .align 7 + .section .text, "ax" process_exception: sub sp, sp, #0x40 stp x0, x1, [sp, #0x0] diff --git a/bl1/bl1.ld.S b/bl1/bl1.ld.S index 969b8c2..ac52e52 100644 --- a/bl1/bl1.ld.S +++ b/bl1/bl1.ld.S @@ -45,6 +45,7 @@ SECTIONS *bl1_entrypoint.o(.text) *(.text) *(.rodata*) + *(.vectors) __RO_END__ = .; } >ROM -- cgit v1.2.3