]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmPlatformPkg: position vectors relative to base
authorMark Rutland <mark.rutland@arm.com>
Thu, 19 Nov 2015 14:39:48 +0000 (14:39 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Thu, 19 Nov 2015 14:39:48 +0000 (14:39 +0000)
commitd855b261d19e2c21c059293befe6ab37db1e8efb
treee4d5519323fcd779516500d5f317cec21e074096
parentfafb7e9c110eb89d1d1da18a822cae49758b76f6
ArmPkg/ArmPlatformPkg: position vectors relative to base

We currently rely on .align directives to ensure that each exception
vector entry is the appropriate offset from the vector base address.

This is slightly fragile, as were an entry to become too large (greater
than 32 A64 instructions), all following entries would be silently
shifted until they meet the next alignment boundary. Thus we might
execute the wrong code in response to an exception.

To prevent this, introduce a new macro, VECTOR_ENTRY, that uses .org
directives to position each entry at the precise required offset from
the base of a vector. A vector entry which is too large will trigger a
build failure rather than a runtime failure which is difficult to debug.

For consistency, the base and end of each vector is similarly annotated,
with VECTOR_BASE and VECTOR_END, which provide the necessary alignment
and symbol exports. The now redundant directives and labels are removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18904 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S
ArmPkg/Include/Chipset/AArch64.h
ArmPkg/Library/DebugAgentSymbolsBaseLib/AArch64/DebugAgentException.S
ArmPlatformPkg/PrePeiCore/AArch64/Exception.S