[edk2,6/7] ArmPkg/ArmExceptionLib: avoid indirect call if using vector table in place

Message ID 1458220815-6944-7-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 5d7238cae8061f64a0eaa18cf6e823283c617b66
Headers show

Commit Message

Ard Biesheuvel March 17, 2016, 1:20 p.m.
If we are using the vector table in place, there is no need to make an
indirect call to the common handler routine from the vector table entries,
so just use a straight branch instruction in that case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

 ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S | 4 ++++
 1 file changed, 4 insertions(+)


edk2-devel mailing list


diff --git a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S
index c7ea061a93ea..0fd304db2dbf 100644
--- a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S
+++ b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S
@@ -187,9 +187,13 @@  VECTOR_BASE(ExceptionHandlersStart)
   mov       x0, #\val
   // Jump to our general handler to deal with all the common parts and process the exception.
   ldr       x1, =ASM_PFX(CommonExceptionEntry)
   br        x1
+  b         ASM_PFX(CommonExceptionEntry)