mirror of
https://github.com/Dasharo/edk2-upstream.git
synced 2026-06-13 19:16:19 -07:00
MdeModulePkg: ArmFfaLib: Add FFA_YIELD handling
If a secure partition on AArch64 platforms would consume extended time to operate with peripherals, it might elect to yield the control back to normal world and expect the normal world to callback after hinted period of time. This change adds the FFA_YIELD handling from ArmFfaLib to support long operations from secure partitions. Timeout arguments are ignored because systems in this context cannot benefit from the timeout period. Treating FFA_YIELD like FFA_INTERRUPT and expecting the caller to invoke FFA_RUN is the least disruptive approach while achieving the intended behavior. This was tested on proprietary hardware platforms and booted to Windows. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
@@ -143,7 +143,7 @@ FfaArgsToEfiStatus (
|
||||
* FfaStatusToEfiStatus (FfaARgs.Arg2) returns proper EFI_STATUS.
|
||||
*/
|
||||
FfaStatus = ARM_FFA_RET_NOT_SUPPORTED;
|
||||
} else if (FfaArgs->Arg0 == ARM_FID_FFA_INTERRUPT) {
|
||||
} else if ((FfaArgs->Arg0 == ARM_FID_FFA_INTERRUPT) || (FfaArgs->Arg0 == ARM_FID_FFA_YIELD)) {
|
||||
FfaStatus = ARM_FFA_RET_INTERRUPTED;
|
||||
} else {
|
||||
FfaStatus = ARM_FFA_RET_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user