Workaround for CVE-2017-5715 on Cortex A57 and A72
authorDimitris Papastamos <dimitris.papastamos@arm.com>
Thu, 30 Nov 2017 14:53:53 +0000 (14:53 +0000)
committerDimitris Papastamos <dimitris.papastamos@arm.com>
Thu, 11 Jan 2018 10:26:15 +0000 (10:26 +0000)
commitf62ad322695d16178db464dc062fe0af592c6780
treef814211090c6e75550c908a47a45fcad022a186f
parent08e06be81946de2701429e72840bb76ee3f9a48e
Workaround for CVE-2017-5715 on Cortex A57 and A72

Invalidate the Branch Target Buffer (BTB) on entry to EL3 by disabling
and enabling the MMU.  To achieve this without performing any branch
instruction, a per-cpu vbar is installed which executes the workaround
and then branches off to the corresponding vector entry in the main
vector table.  A side effect of this change is that the main vbar is
configured before any reset handling.  This is to allow the per-cpu
reset function to override the vbar setting.

This workaround is enabled by default on the affected CPUs.

Change-Id: I97788d38463a5840a410e3cea85ed297a1678265
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
bl31/aarch64/runtime_exceptions.S
bl31/bl31.mk
docs/cpu-specific-build-macros.rst
include/common/aarch64/el3_common_macros.S
lib/cpus/aarch64/cortex_a57.S
lib/cpus/aarch64/cortex_a72.S
lib/cpus/aarch64/workaround_cve_2017_5715_mmu.S [new file with mode: 0644]
lib/cpus/cpu-ops.mk