mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(cm): handle asymmetry for SPE feature
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. SPE is one of the features which can be asymmetric across cores. Add a function to handle this asymmetry by re-visting the feature presence on running core. There are two possible cases: - If the primary has the feature and secondary does not have it then, the feature needs to be disabled. - If the primary does not have the feature and secondary has it then, the feature need to be enabled Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ibb2b88b5ef63b3efcb80801898ae8d8967e5c271
This commit is contained in:
parent
2f41c9a7be
commit
188f8c4b60
1 changed files with 11 additions and 0 deletions
|
@ -1537,6 +1537,17 @@ void cm_el2_sysregs_context_restore(uint32_t security_state)
|
|||
*********************************************************************************/
|
||||
void cm_handle_asymmetric_features(void)
|
||||
{
|
||||
#if ENABLE_SPE_FOR_NS == FEAT_STATE_CHECK_ASYMMETRIC
|
||||
cpu_context_t *spe_ctx = cm_get_context(NON_SECURE);
|
||||
|
||||
assert(spe_ctx != NULL);
|
||||
|
||||
if (is_feat_spe_supported()) {
|
||||
spe_enable(spe_ctx);
|
||||
} else {
|
||||
spe_disable(spe_ctx);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue