MdePkg, MdeModulePkg: ArmFfaLib: Expose FFA_ARGS and ArmCallFfa

FFA is a framework that supports various protocols built on top. i.e.
memory protocol, which is nothing that can be done through existing
interfaces.

Instead of requiring protocol authors to check conduit PCD in every
implementation, exposing the ArmCallFfa is a unified way to allow other
protocols to leverage FFA interfaces.

Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
Kun Qin
2025-04-24 15:32:09 -07:00
committed by mergify[bot]
parent b534cabbda
commit 22142b4f4a
2 changed files with 37 additions and 35 deletions

View File

@@ -23,6 +23,30 @@
#include <Library/ArmSmcLib.h>
/**
* Arguments to call FF-A request via SMC/SVC.
*/
typedef struct ArmFfaArgs {
UINTN Arg0;
UINTN Arg1;
UINTN Arg2;
UINTN Arg3;
UINTN Arg4;
UINTN Arg5;
UINTN Arg6;
UINTN Arg7;
UINTN Arg8;
UINTN Arg9;
UINTN Arg10;
UINTN Arg11;
UINTN Arg12;
UINTN Arg13;
UINTN Arg14;
UINTN Arg15;
UINTN Arg16;
UINTN Arg17;
} ARM_FFA_ARGS;
#define FFA_RXTX_MAP_INPUT_PROPERTY_DEFAULT 0x00
/** Implementation define arguments used in
@@ -73,6 +97,18 @@ typedef struct DirectMsgArgs {
UINTN Arg13;
} DIRECT_MSG_ARGS;
/**
Trigger FF-A ABI call according to PcdFfaLibConduitSmc.
@param [in, out] FfaArgs Ffa arguments
**/
VOID
EFIAPI
ArmCallFfa (
IN OUT ARM_FFA_ARGS *FfaArgs
);
/**
Convert EFI_STATUS to FFA return code.