mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
refactor(context-mgmt): remove el1_context routines from RMM
This is an effort to optimise the unused members in the cpu_context_t structure. TF-A statically allocates memory for context entry for each wolrd per PE. Some of the members in this struct are not used for all the build combinations. RMM in particular, is not using this context member and henceforth removing them. Change-Id: Ia5bf9c8dfef6e856ba6d88fa678876c704d42858 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
This commit is contained in:
parent
59f8882b44
commit
e58daa663b
1 changed files with 4 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -70,7 +70,6 @@ uint64_t rmmd_rmm_sync_entry(rmmd_rmm_context_t *rmm_ctx)
|
|||
cm_set_context(&(rmm_ctx->cpu_ctx), REALM);
|
||||
|
||||
/* Restore the realm context assigned above */
|
||||
cm_el1_sysregs_context_restore(REALM);
|
||||
cm_el2_sysregs_context_restore(REALM);
|
||||
cm_set_next_eret_context(REALM);
|
||||
|
||||
|
@ -78,12 +77,10 @@ uint64_t rmmd_rmm_sync_entry(rmmd_rmm_context_t *rmm_ctx)
|
|||
rc = rmmd_rmm_enter(&rmm_ctx->c_rt_ctx);
|
||||
|
||||
/*
|
||||
* Save realm context. EL1 and EL2 Non-secure
|
||||
* contexts will be restored before exiting to
|
||||
* Non-secure world, therefore there is no need
|
||||
* to clear EL1 and EL2 context registers.
|
||||
* Save realm context. EL2 Non-secure context will be restored
|
||||
* before exiting Non-secure world, therefore there is no need
|
||||
* to clear EL2 context registers.
|
||||
*/
|
||||
cm_el1_sysregs_context_save(REALM);
|
||||
cm_el2_sysregs_context_save(REALM);
|
||||
|
||||
return rc;
|
||||
|
@ -279,11 +276,9 @@ static uint64_t rmmd_smc_forward(uint32_t src_sec_state,
|
|||
cpu_context_t *ctx = cm_get_context(dst_sec_state);
|
||||
|
||||
/* Save incoming security state */
|
||||
cm_el1_sysregs_context_save(src_sec_state);
|
||||
cm_el2_sysregs_context_save(src_sec_state);
|
||||
|
||||
/* Restore outgoing security state */
|
||||
cm_el1_sysregs_context_restore(dst_sec_state);
|
||||
cm_el2_sysregs_context_restore(dst_sec_state);
|
||||
cm_set_next_eret_context(dst_sec_state);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue