Init and save / restore of PMCR_EL0 / PMCR
Currently TF does not initialise the PMCR_EL0 register in
the secure context or save/restore the register.

In particular, the DP field may not be set to one to prohibit
cycle counting in the secure state, even though event counting
generally is prohibited via the default setting of MDCR_EL3.SMPE
to 0.

This patch initialises PMCR_EL0.DP to one in the secure state
to prohibit cycle counting and also initialises other fields
that have an architectually UNKNOWN reset value.

Additionally, PMCR_EL0 is added to the list of registers that are
saved and restored during a world switch.

Similar changes are made for PMCR for the AArch32 execution state.

NOTE: secure world code at lower ELs that assume other values in PMCR_EL0
will be impacted.

Change-Id: Iae40e8c0a196d74053accf97063ebc257b4d2f3a
Signed-off-by: David Cunado <david.cunado@arm.com>
1 parent 9679297 commit 3e61b2b54336510475fbab83b7d97538f3ac5460
@David Cunado David Cunado authored on 2 Oct 2017
Showing 9 changed files
View
bl32/sp_min/aarch32/entrypoint.S
View
include/lib/aarch32/arch.h
View
include/lib/aarch32/smcc_helpers.h
View
include/lib/aarch32/smcc_macros.S
View
include/lib/aarch64/arch.h
View
include/lib/aarch64/arch_helpers.h
View
include/lib/el3_runtime/aarch64/context.h
View
lib/el3_runtime/aarch64/context.S
View
lib/el3_runtime/aarch64/context_mgmt.c