audk/ArmPkg
Mark Rutland d855b261d1 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
2015-11-19 14:39:48 +00:00
..
Application/LinuxLoader ArmPkg/Application: Add new EFI application to boot Linux 2015-07-06 16:49:40 +00:00
Drivers ArmPkg/ArmPlatformPkg: position vectors relative to base 2015-11-19 14:39:48 +00:00
Filesystem/SemihostFs ArmPkg/SemihostFs: Implement SetInfo() and handle seeking past the end of a file 2014-10-27 10:42:51 +00:00
Include ArmPkg/ArmPlatformPkg: position vectors relative to base 2015-11-19 14:39:48 +00:00
Library ArmPkg/ArmPlatformPkg: position vectors relative to base 2015-11-19 14:39:48 +00:00
ArmPkg.dec ArmPkg/ArmV7Mmu: introduce feature PCD to map normal memory non-shareable 2015-11-18 15:59:22 +00:00
ArmPkg.dsc ArmPkg: remove ARMv6 support code 2015-08-19 10:51:59 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt EDK II Packages: Added License.txt files 2012-04-12 16:40:32 +00:00