xlat v2: Dynamically detect need for CnP bit
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 11 Jan 2019 11:20:10 +0000 (11:20 +0000)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 11 Jan 2019 11:20:10 +0000 (11:20 +0000)
commit2559b2c8256f798e7e9fc9eef58257b13b9e8514
treeab1e11bffe4bc1d0acaa536595f03f63e7f09e7b
parent300afb387ea3ce588a9b4c6746316bf9bc55dd56
xlat v2: Dynamically detect need for CnP bit

ARMv8.2-TTCNP is mandatory from ARMv8.2 onwards, but it can be implemented
in CPUs that don't implement all mandatory 8.2 features (and so have to
claim to be a lower version).

This patch removes usage of the ARM_ARCH_AT_LEAST() macro and uses system
ID registers to detect whether it is needed to set the bit or not.

Change-Id: I7bcbf0c7c937590dfc2ca668cfd9267c50f7d52c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
include/arch/aarch32/arch.h
include/arch/aarch32/arch_features.h [new file with mode: 0644]
include/arch/aarch32/arch_helpers.h
include/arch/aarch64/arch.h
include/arch/aarch64/arch_features.h [new file with mode: 0644]
include/arch/aarch64/arch_helpers.h
lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
lib/xlat_tables_v2/aarch64/xlat_tables_arch.c