diff --git a/modules/trusted-firmware-m/interface/interface.c b/modules/trusted-firmware-m/interface/interface.c index abff7efdc72..027985b9e9b 100644 --- a/modules/trusted-firmware-m/interface/interface.c +++ b/modules/trusted-firmware-m/interface/interface.c @@ -53,13 +53,17 @@ int32_t tfm_ns_interface_dispatch(veneer_fn fn, #endif } +#if defined(CONFIG_FPU_SHARING) struct fpu_ctx_full context_buffer; z_arm_save_fp_context(&context_buffer); +#endif result = fn(arg0, arg1, arg2, arg3); +#if defined(CONFIG_FPU_SHARING) z_arm_restore_fp_context(&context_buffer); +#endif if (!isr_mode) { #if !defined(CONFIG_ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS)