feat(pncd): switch to simd_ctx_save/restore apis

Change-Id: I662c0b35e938f8b2013ec60f863de55445f559da
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
This commit is contained in:
Madhukar Pappireddy 2024-04-25 22:56:29 -05:00
parent e6e348689a
commit a9b64ed969
2 changed files with 8 additions and 4 deletions

View file

@ -67,8 +67,9 @@ uint64_t pncd_synchronous_sp_entry(pnc_context_t *pnc_ctx)
/* Apply the Secure EL1 system register context and switch to it */ /* Apply the Secure EL1 system register context and switch to it */
assert(cm_get_context(SECURE) == &pnc_ctx->cpu_ctx); assert(cm_get_context(SECURE) == &pnc_ctx->cpu_ctx);
cm_el1_sysregs_context_restore(SECURE); cm_el1_sysregs_context_restore(SECURE);
#if CTX_INCLUDE_FPREGS #if CTX_INCLUDE_FPREGS
fpregs_context_restore(get_fpregs_ctx(cm_get_context(SECURE))); simd_ctx_restore(SECURE);
#endif #endif
cm_set_next_eret_context(SECURE); cm_set_next_eret_context(SECURE);
@ -90,8 +91,9 @@ void pncd_synchronous_sp_exit(pnc_context_t *pnc_ctx, uint64_t ret)
/* Save the Secure EL1 system register context */ /* Save the Secure EL1 system register context */
assert(cm_get_context(SECURE) == &pnc_ctx->cpu_ctx); assert(cm_get_context(SECURE) == &pnc_ctx->cpu_ctx);
cm_el1_sysregs_context_save(SECURE); cm_el1_sysregs_context_save(SECURE);
#if CTX_INCLUDE_FPREGS #if CTX_INCLUDE_FPREGS
fpregs_context_save(get_fpregs_ctx(cm_get_context(SECURE))); simd_ctx_save(SECURE, false);
#endif #endif
assert(pnc_ctx->c_rt_ctx != 0); assert(pnc_ctx->c_rt_ctx != 0);

View file

@ -55,8 +55,9 @@ static void context_save(unsigned long security_state)
assert(sec_state_is_valid(security_state)); assert(sec_state_is_valid(security_state));
cm_el1_sysregs_context_save((uint32_t) security_state); cm_el1_sysregs_context_save((uint32_t) security_state);
#if CTX_INCLUDE_FPREGS #if CTX_INCLUDE_FPREGS
fpregs_context_save(get_fpregs_ctx(cm_get_context(security_state))); simd_ctx_save((uint32_t)security_state, false);
#endif #endif
} }
@ -72,8 +73,9 @@ static void *context_restore(unsigned long security_state)
/* Restore state */ /* Restore state */
cm_el1_sysregs_context_restore((uint32_t) security_state); cm_el1_sysregs_context_restore((uint32_t) security_state);
#if CTX_INCLUDE_FPREGS #if CTX_INCLUDE_FPREGS
fpregs_context_restore(get_fpregs_ctx(cm_get_context(security_state))); simd_ctx_restore((uint32_t)security_state);
#endif #endif
cm_set_next_eret_context((uint32_t) security_state); cm_set_next_eret_context((uint32_t) security_state);