mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fix(context-mgmt): keep actlr_el2 value in the init context
The system register actlr_el2 can be set during CPU or platform reset handler. E.g. on Arm Total Compute platform, the CLUSTERPMUEN bit of actlr_el2 is set in the platform reset handler to enable the write access to DSU PMU registers from EL1. However, as EL2 context gets restored without saving it beforehand during jump to SPM and next NS image, therefore, the initialized value of actlr_el2 is not retained. To fix this issue, keep track of actlr_el2 value during the EL2 context initialization. This applies for both secure and non-secure security state. Change-Id: I1bd7b984216c042c056ad20c6724bedce5a6a3e2 Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com> Signed-off-by: Leo Yan <leo.yan@arm.com>
This commit is contained in:
parent
31d4c3e983
commit
0aa3284a45
1 changed files with 6 additions and 0 deletions
|
@ -335,6 +335,12 @@ static void setup_context_common(cpu_context_t *ctx, const entry_point_info_t *e
|
|||
u_register_t icc_sre_el2_val = ICC_SRE_DIB_BIT | ICC_SRE_DFB_BIT |
|
||||
ICC_SRE_EN_BIT | ICC_SRE_SRE_BIT;
|
||||
write_el2_ctx_common(el2_ctx, icc_sre_el2, icc_sre_el2_val);
|
||||
|
||||
/*
|
||||
* The actlr_el2 register can be initialized in platform's reset handler
|
||||
* and it may contain access control bits (e.g. CLUSTERPMUEN bit).
|
||||
*/
|
||||
write_el2_ctx_common(el2_ctx, actlr_el2, read_actlr_el2());
|
||||
#endif /* CTX_INCLUDE_EL2_REGS */
|
||||
|
||||
/* Start with a clean SCR_EL3 copy as all relevant values are set */
|
||||
|
|
Loading…
Add table
Reference in a new issue