Fix interrupted FFA_MSG_SEND_DIRECT_REQ handling
If a secure partition invokes another endpoint via
FFA_MSG_SEND_DIRECT_REQ the SPMC might return FFA_INTERRUPT if the
request was preempted by an interrupt. In this case the caller SP must
resume the request using FFA_RUN. Until now this case was mistakenly
treated as a secure interrupt targeting the caller.
Fix ffa_msg_send_direct_req function in libsp to follow the described
desired behavior.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I848424a38698133006098f5ee4f89f610aa8c21c
diff --git a/components/messaging/ffa/libsp/ffa.c b/components/messaging/ffa/libsp/ffa.c
index 76f0eda..03431dd 100644
--- a/components/messaging/ffa/libsp/ffa.c
+++ b/components/messaging/ffa/libsp/ffa.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
- * Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2025, Arm Limited and Contributors. All rights reserved.
*/
#include <assert.h> // for assert
@@ -312,8 +312,9 @@
dest, FFA_PARAM_MBZ, a0, a1, a2, a3, a4, &result);
while (result.a0 == FFA_INTERRUPT) {
- ffa_interrupt_handler(result.a2);
- ffa_return_from_interrupt(&result);
+ ffa_svc(FFA_RUN, result.a1, FFA_PARAM_MBZ, FFA_PARAM_MBZ,
+ FFA_PARAM_MBZ, FFA_PARAM_MBZ, FFA_PARAM_MBZ, FFA_PARAM_MBZ,
+ &result);
}
if (result.a0 == FFA_ERROR) {