
These two patches try to address the issue that the default ARMv8 exception vectors take up quite some code space, but don't provide much benefit apart from a crash dump. Since the overhead might not be justified for some very size-restricted SPLs, we try to reduce the code size: - Patch 1/2 stuffs the shared register save/restore code into the gaps between the exception entries, which have to follow an architectural 128 byte alignment requirement. This reduces the code size by about 250 bytes, while still having the full functionality. - Patch 2/2 goes much further by introducing a Kconfig symbol allowing to drop the exception vector table for the SPL at all, at the expense of losing the crash dump feature. On the Allwinner A64 SPL this saves about 3KB of code, which sound quite worthwhile with our chronically tight SPL builds.
The last feature is off by default, but could be selected manually in menuconfig to fix too big SPL builds.
Cheers, Andre.
Andre Przywara (2): armv8: Reduce exception handling code armv8: make SPL exception vectors optional
arch/arm/cpu/armv8/Kconfig | 11 ++++ arch/arm/cpu/armv8/Makefile | 4 ++ arch/arm/cpu/armv8/exceptions.S | 132 +++++++++++++++++++++++++--------------- arch/arm/cpu/armv8/start.S | 19 ++++-- 4 files changed, 112 insertions(+), 54 deletions(-)