arm-trusted-firmware/include/lib/cpus
Antonio Nino Diaz ff6f62e105 Update macro to check need for CVE-2017-5715 mitigation
Armv8.5 introduces the field CSV2 to register ID_AA64PFR0_EL1. It can
have the following 3 values:

- 0: Branch targets trained in one hardware described context may affect
     speculative execution in a different hardware described context. In
     some CPUs it may be needed to apply mitigations.

- 1: Branch targets trained in one hardware described context can only
     affect speculative execution in a different hardware described
     context in a hard-to-determine way. No mitigation required.

- 2: Same as 1, but the device is also aware of SCXTNUM_ELx register
     contexts. The TF doesn't use the registers, so there is no
     difference with 1.

The field CSV2 was originally introduced in the TRM of the Cortex-A76
before the release of the Armv8.5 architecture. That TRM only mentions
the meaning of values 0 and 1. Because of this, the code only checks if
the field has value 1 to know whether to enable or disable the
mitigations.

This patch makes it aware of value 2 as well. Both values 1 and 2
disable the mitigation, and 0 enables it.

Change-Id: I5af33de25a0197c98173f52c6c8c77b51a51429f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2019-02-14 14:43:43 +00:00
..
aarch32 cpus: Add casts to all definitions in CPU headers 2019-02-11 13:34:57 +00:00
aarch64 Update macro to check need for CVE-2017-5715 mitigation 2019-02-14 14:43:43 +00:00
errata_report.h Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
wa_cve_2017_5715.h Fix MISRA defects in workaround and errata framework 2018-10-29 14:41:48 +00:00
wa_cve_2018_3639.h Fix MISRA defects in workaround and errata framework 2018-10-29 14:41:48 +00:00