coreboot-kgpe-d16/src/arch/arm64
Julius Werner 0c5f61a01c arm64: Drop checks for current exception level, hardcode EL3 assumption
When we first created the arm64 port, we weren't quite sure whether
coreboot would always run in EL3 on all platforms. The AArch64 A.R.M.
technically considers this exception level optional, but in practice all
SoCs seem to support it. We have since accumulated a lot of code that
already hardcodes an implicit or explicit assumption of executing in EL3
somewhere, so coreboot wouldn't work on a system that tries to enter it
in EL1/2 right now anyway.

However, some of our low level support libraries (in particular those
for accessing architectural registers) still have provisions for
running at different exception levels built-in, and often use switch
statements over the current exception level to decide which register to
access. This includes an unnecessarily large amount of code for what
should be single-instruction operations and precludes further
optimization via inlining.

This patch removes any remaining code that dynamically depends on the
current exception level and makes the assumption that coreboot executes
at EL3 official. If this ever needs to change for a future platform, it
would probably be cleaner to set the expected exception level in a
Kconfig rather than always probing it at runtime.

Change-Id: I1a9fb9b4227bd15a013080d1c7eabd48515fdb67
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/27880
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-08-10 04:16:25 +00:00
..
armv8 arm64: Drop checks for current exception level, hardcode EL3 assumption 2018-08-10 04:16:25 +00:00
include arm64: Drop checks for current exception level, hardcode EL3 assumption 2018-08-10 04:16:25 +00:00
arch_timer.c arm64: Add ARCH Timer 2018-04-30 06:25:58 +00:00
arm_tf.c lib/prog_loaders: Move argument selection into selfload 2018-06-19 14:28:01 +00:00
boot.c arm64: Drop checks for current exception level, hardcode EL3 assumption 2018-08-10 04:16:25 +00:00
div0.c arch/arm & arm64: Remove unnecessary whitespace before "\n" 2016-08-23 15:45:46 +02:00
eabi_compat.c src/arch: Update license headers missing paragraph 2 2016-01-26 04:44:20 +01:00
fit_payload.c lib: Add FIT payload support 2018-06-19 18:10:05 +00:00
id.S arch/arm64: add missing license headers 2016-01-13 22:58:17 +01:00
Kconfig arch/arm64: Add Kconfig to include BL31 as blob 2018-07-26 00:44:33 +00:00
Makefile.inc arch/arm64: Add Kconfig to include BL31 as blob 2018-07-26 00:44:33 +00:00
memcpy.S
memmove.S
memset.S
tables.c lib/bootmem: Add more bootmem tags 2018-05-04 10:05:36 +00:00
transition.c arm64: Drop checks for current exception level, hardcode EL3 assumption 2018-08-10 04:16:25 +00:00
transition_asm.S arm64: Drop checks for current exception level, hardcode EL3 assumption 2018-08-10 04:16:25 +00:00