public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Add support for using FF-A calls
@ 2020-12-14 14:42 Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header Sughosh Ganu
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel; +Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra


The following patch series adds support for using the Firmware
Framework(FF-A) as a transport mechanism for requesting services from
the Secure Partition Manager(SPM). This is done through a Pcd which
can be used to enable the FF-A mechanism or to use the earlier used
SVC calls.


Changes since V1:
Handled review comments from Sami Mujawar


Achin Gupta (7):
  ArmPkg/IndustryStandard: Add barebones FF-A header
  ArmPkg/ArmSvcLib: Return x4-x7 in output parameters
  StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry
    point
  StandaloneMmPkg: Add option to use FF-A calls for communication with
    SPM
  StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library
  StandaloneMmMmuLib: Add option to use FF-A calls to get memory
    region's permissions
  StandaloneMmMmuLib: Add option to use FF-A calls to set memory
    region's permissions

Ilias Apalodimas (2):
  MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase
    to Pcd
  StandaloneMmPkg: Allow sending FFA Direct Request message to
    StandaloneMm

Sughosh Ganu (4):
  ArmPkg: Introduce support for PcdFfaEnable
  StandaloneMmPkg: Add macros for SPM version
  StandaloneMmPkg: Add the SPM version for FF-A
  StandaloneMmPkg: Add option to use FF-A calls for getting SPM version

 ArmPkg/ArmPkg.dec                             |   6 +
 .../ArmMmuStandaloneMmLib.inf                 |   3 +
 .../RuntimeDxe/VariableStandaloneMm.inf       |   6 +-
 .../StandaloneMmCoreEntryPoint.inf            |   3 +
 ArmPkg/Include/IndustryStandard/ArmFfaSvc.h   |  44 ++++++
 ArmPkg/Include/IndustryStandard/ArmMmSvc.h    |   3 +
 ArmPkg/Include/Library/ArmSvcLib.h            |  10 +-
 .../AArch64/ArmMmuStandaloneMmLib.c           | 145 +++++++++++++-----
 .../StandaloneMmCpu/AArch64/EventHandle.c     |   4 +-
 .../AArch64/StandaloneMmCoreEntryPoint.c      | 130 ++++++++++++----
 ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S     |   4 +-
 11 files changed, 291 insertions(+), 67 deletions(-)
 create mode 100644 ArmPkg/Include/IndustryStandard/ArmFfaSvc.h

-- 
2.17.1



^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 12:12   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Sughosh Ganu
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

This patch adds a rudimentary header file with defines for FF-A ABIs
that will be used as the transport between S-EL0 and the SPM

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
---
 ArmPkg/Include/IndustryStandard/ArmFfaSvc.h | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
new file mode 100644
index 0000000000..1eadf48ab5
--- /dev/null
+++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
@@ -0,0 +1,23 @@
+/** @file
+  Header file for FF-A ABI's that will be used for
+  communication between S-EL0 and the Secure Partition
+  Manager(SPM)
+
+  Copyright (c) 2020, ARM Limited. All rights reserved.
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Revision Reference:
+    - FF-A Version 1.0
+
+
+**/
+
+#ifndef ARM_FFA_SVC_H_
+#define ARM_FFA_SVC_H_
+
+#define ARM_SVC_ID_FFA_VERSION_AARCH32                  0x84000063
+#define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64      0xC400006F
+#define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64     0xC4000070
+
+#endif // ARM_FFA_SVC_H_
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 12:16   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point Sughosh Ganu
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

The Arm SMC calling convention standard v1.2 allows 8 input and output
parameter registers. The FF-A specification relies on this
communication. This patch extends the number of output registers
returned by ArmCallSvc() to match this convention.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
---
 ArmPkg/Include/Library/ArmSvcLib.h        | 10 ++++++++--
 ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S |  4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ArmPkg/Include/Library/ArmSvcLib.h b/ArmPkg/Include/Library/ArmSvcLib.h
index a94ead1965..a4414270f3 100644
--- a/ArmPkg/Include/Library/ArmSvcLib.h
+++ b/ArmPkg/Include/Library/ArmSvcLib.h
@@ -27,10 +27,16 @@ typedef struct {
 /**
   Trigger an SVC call
 
-  SVC calls can take up to 7 arguments and return up to 4 return values.
-  Therefore, the 4 first fields in the ARM_SVC_ARGS structure are used
+  SVC calls can take up to 8 arguments and return up to 8 return values.
+  Therefore, the 8 first fields in the ARM_SVC_ARGS structure are used
   for both input and output values.
 
+  @param[in, out]    Args Arguments to be passed as part of the SVC call
+                     The return values of the SVC call are also placed
+                     in the same structure
+
+  @retval None
+
 **/
 VOID
 ArmCallSvc (
diff --git a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S b/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S
index ee265f94b9..1a7c10cb79 100644
--- a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S
+++ b/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S
@@ -33,9 +33,11 @@ ASM_PFX(ArmCallSvc):
   ldr   x9, [sp, #16]
 
   // Store the SVC returned values into the ARM_SVC_ARGS structure.
-  // A SVC call can return up to 4 values - we do not need to store back x4-x7.
+  // A SVC call can return up to 8 values
   stp   x0, x1, [x9, #0]
   stp   x2, x3, [x9, #16]
+  stp   x4, x5, [x9, #32]
+  stp   x6, x7, [x9, #48]
 
   mov   x0, x9
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 12:19   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable Sughosh Ganu
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

Add the Firmware Framework(FF-A) header in the StandaloneMm entry
point driver. Support for invoking the functions through FF-A will be
added in a subsequent patch.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
---
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 9cecfa667b..c4132b0d78 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 #include <IndustryStandard/ArmStdSmc.h>
 #include <IndustryStandard/ArmMmSvc.h>
+#include <IndustryStandard/ArmFfaSvc.h>
 
 #define SPM_MAJOR_VER_MASK        0xFFFF0000
 #define SPM_MINOR_VER_MASK        0x0000FFFF
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (2 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 13:53   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version Sughosh Ganu
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Sughosh Ganu

The Secure Partition(SP) can request services from the Secure
Partition Manager Core(SPMC) either through FF-A calls or through the
existing SVC calls. Add a feature flag Pcd for enabling the FF-A
method -- when this is set to FALSE, the SP uses the existing SVC
calls for making the requests.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 ArmPkg/ArmPkg.dec | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index eaf1072d9e..507e16844c 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -78,6 +78,12 @@
   # Define if the GICv3 controller should use the GICv2 legacy
   gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|FALSE|BOOLEAN|0x00000042
 
+  ## Used to select method for requesting services from S-EL1.<BR><BR
+  #   TRUE  - Selects FF-A calls for communication between S-EL0 and SPMC.<BR>
+  #   FALSE - Selects SVC calls for communication between S-EL0 and SPMC.<BR>
+  # @Prompt Enable FF-A support.
+  gArmTokenSpaceGuid.PcdFfaEnable|FALSE|BOOLEAN|0x0000005B
+
 [PcdsFeatureFlag.ARM]
   # Whether to map normal memory as non-shareable. FALSE is the safe choice, but
   # TRUE may be appropriate to fix performance problems if you don't care about
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (3 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-04 17:01   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A Sughosh Ganu
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Sughosh Ganu

Declare module wide variables for SPM major and minor versions to be
used in checking the SPM version compatibility. Declare the the values
of SPM major and minor versions as macros.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 ArmPkg/Include/IndustryStandard/ArmMmSvc.h                                              |  3 +++
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ArmPkg/Include/IndustryStandard/ArmMmSvc.h b/ArmPkg/Include/IndustryStandard/ArmMmSvc.h
index ee29c2fecc..71a5398558 100644
--- a/ArmPkg/Include/IndustryStandard/ArmMmSvc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmMmSvc.h
@@ -41,4 +41,7 @@
 #define ARM_SVC_SPM_RET_DENIED               -3
 #define ARM_SVC_SPM_RET_NO_MEMORY            -5
 
+#define SPM_MAJOR_VERSION                     0
+#define SPM_MINOR_VERSION                     1
+
 #endif
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index c4132b0d78..f2a8feacec 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -32,8 +32,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SPM_MINOR_VER_MASK        0x0000FFFF
 #define SPM_MAJOR_VER_SHIFT       16
 
-CONST UINT32 SPM_MAJOR_VER = 0;
-CONST UINT32 SPM_MINOR_VER = 1;
+CONST UINT32 mSpmMajorVer = SPM_MAJOR_VERSION;
+CONST UINT32 mSpmMinorVer = SPM_MINOR_VERSION;
 
 CONST UINT8 BOOT_PAYLOAD_VERSION = 1;
 
@@ -183,8 +183,8 @@ GetSpmVersion (VOID)
   // revision A must work in a compatible way with revision B.
   // However, it is possible for revision B to have a higher
   // function count than revision A.
-  if ((SpmMajorVersion == SPM_MAJOR_VER) &&
-      (SpmMinorVersion >= SPM_MINOR_VER))
+  if ((SpmMajorVersion == mSpmMajorVer) &&
+      (SpmMinorVersion >= mSpmMinorVer))
   {
     DEBUG ((DEBUG_INFO, "SPM Version: Major=0x%x, Minor=0x%x\n",
            SpmMajorVersion, SpmMinorVersion));
@@ -193,7 +193,7 @@ GetSpmVersion (VOID)
   else
   {
     DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Current Version: Major=0x%x, Minor=0x%x.\n Expected: Major=0x%x, Minor>=0x%x.\n",
-            SpmMajorVersion, SpmMinorVersion, SPM_MAJOR_VER, SPM_MINOR_VER));
+            SpmMajorVersion, SpmMinorVersion, mSpmMajorVer, mSpmMinorVer));
     Status = EFI_UNSUPPORTED;
   }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (4 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 13:58   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version Sughosh Ganu
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Sughosh Ganu

The Firmware Framework(FF-A) requires implementation of SPM version
v1.0. Add new macros for the version that will be used for FF-A.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 ArmPkg/Include/IndustryStandard/ArmFfaSvc.h                                             | 3 +++
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
index 1eadf48ab5..bdf6ce4676 100644
--- a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
@@ -20,4 +20,7 @@
 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64      0xC400006F
 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64     0xC4000070
 
+#define SPM_MAJOR_VERSION_FFA                           1
+#define SPM_MINOR_VERSION_FFA                           0
+
 #endif // ARM_FFA_SVC_H_
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index f2a8feacec..093a4a4285 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -35,6 +35,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 CONST UINT32 mSpmMajorVer = SPM_MAJOR_VERSION;
 CONST UINT32 mSpmMinorVer = SPM_MINOR_VERSION;
 
+CONST UINT32 mSpmMajorVerFfa = SPM_MAJOR_VERSION_FFA;
+CONST UINT32 mSpmMinorVerFfa = SPM_MINOR_VERSION_FFA;
+
 CONST UINT8 BOOT_PAYLOAD_VERSION = 1;
 
 PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT      CpuDriverEntryPoint = NULL;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (5 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 14:18   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM Sughosh Ganu
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Sughosh Ganu

With the introduction of Firmware Framework(FF-A), a Secure Partition
can get the SPM version either using FF-A calls or through the
existing svc calls. Use a runtime check to use either of the two
methods based on the Pcd feature flag value.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Co-developed-by: Achin Gupta <achin.gupta@arm.com>
---
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf       |  3 ++
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 37 ++++++++++++++------
 2 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
index 7d6ee4e08e..f8184f501b 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
@@ -49,5 +49,8 @@
   gEfiStandaloneMmNonSecureBufferGuid
   gEfiArmTfCpuDriverEpDescriptorGuid
 
+[Pcd]
+  gArmTokenSpaceGuid.PcdFfaEnable
+
 [BuildOptions]
   GCC:*_*_*_CC_FLAGS = -fpie
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 093a4a4285..b390ea8371 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -23,6 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/SerialPortLib.h>
+#include <Library/PcdLib.h>
 
 #include <IndustryStandard/ArmStdSmc.h>
 #include <IndustryStandard/ArmMmSvc.h>
@@ -31,6 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SPM_MAJOR_VER_MASK        0xFFFF0000
 #define SPM_MINOR_VER_MASK        0x0000FFFF
 #define SPM_MAJOR_VER_SHIFT       16
+#define FFA_NOT_SUPPORTED         -1
 
 CONST UINT32 mSpmMajorVer = SPM_MAJOR_VERSION;
 CONST UINT32 mSpmMinorVer = SPM_MINOR_VERSION;
@@ -165,19 +167,34 @@ EFI_STATUS
 GetSpmVersion (VOID)
 {
   EFI_STATUS   Status;
-  UINT16       SpmMajorVersion;
-  UINT16       SpmMinorVersion;
+  UINT16       CalleeSpmMajorVer;
+  UINT16       CallerSpmMajorVer;
+  UINT16       CalleeSpmMinorVer;
+  UINT16       CallerSpmMinorVer;
   UINT32       SpmVersion;
   ARM_SVC_ARGS SpmVersionArgs;
 
-  SpmVersionArgs.Arg0 = ARM_SVC_ID_SPM_VERSION_AARCH32;
+  if (FeaturePcdGet (PcdFfaEnable)) {
+    SpmVersionArgs.Arg0 = ARM_SVC_ID_FFA_VERSION_AARCH32;
+    SpmVersionArgs.Arg1 = mSpmMajorVerFfa << SPM_MAJOR_VER_SHIFT;
+    SpmVersionArgs.Arg1 |= mSpmMinorVerFfa;
+    CallerSpmMajorVer = mSpmMajorVerFfa;
+    CallerSpmMinorVer = mSpmMinorVerFfa;
+  } else {
+    SpmVersionArgs.Arg0 = ARM_SVC_ID_SPM_VERSION_AARCH32;
+    CallerSpmMajorVer = mSpmMajorVer;
+    CallerSpmMinorVer = mSpmMinorVer;
+  }
 
   ArmCallSvc (&SpmVersionArgs);
 
   SpmVersion = SpmVersionArgs.Arg0;
+  if (SpmVersion == FFA_NOT_SUPPORTED) {
+    return EFI_UNSUPPORTED;
+  }
 
-  SpmMajorVersion = ((SpmVersion & SPM_MAJOR_VER_MASK) >> SPM_MAJOR_VER_SHIFT);
-  SpmMinorVersion = ((SpmVersion & SPM_MINOR_VER_MASK) >> 0);
+  CalleeSpmMajorVer = ((SpmVersion & SPM_MAJOR_VER_MASK) >> SPM_MAJOR_VER_SHIFT);
+  CalleeSpmMinorVer = ((SpmVersion & SPM_MINOR_VER_MASK) >> 0);
 
   // Different major revision values indicate possibly incompatible functions.
   // For two revisions, A and B, for which the major revision values are
@@ -186,17 +203,17 @@ GetSpmVersion (VOID)
   // revision A must work in a compatible way with revision B.
   // However, it is possible for revision B to have a higher
   // function count than revision A.
-  if ((SpmMajorVersion == mSpmMajorVer) &&
-      (SpmMinorVersion >= mSpmMinorVer))
+  if ((CalleeSpmMajorVer == CallerSpmMajorVer) &&
+      (CalleeSpmMinorVer >= CallerSpmMinorVer))
   {
     DEBUG ((DEBUG_INFO, "SPM Version: Major=0x%x, Minor=0x%x\n",
-           SpmMajorVersion, SpmMinorVersion));
+           CalleeSpmMajorVer, CalleeSpmMinorVer));
     Status = EFI_SUCCESS;
   }
   else
   {
-    DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Current Version: Major=0x%x, Minor=0x%x.\n Expected: Major=0x%x, Minor>=0x%x.\n",
-            SpmMajorVersion, SpmMinorVersion, mSpmMajorVer, mSpmMinorVer));
+    DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Callee Version: Major=0x%x, Minor=0x%x.\n Caller: Major=0x%x, Minor>=0x%x.\n",
+            CalleeSpmMajorVer, CalleeSpmMinorVer, CallerSpmMajorVer, CallerSpmMinorVer));
     Status = EFI_UNSUPPORTED;
   }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (6 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-04 17:34   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library Sughosh Ganu
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

Add support for reporting completion of a MM request using either the
Firmware Framework(FF-A) ABI transport or through the earlier used SVC
calls.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Co-developed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 85 ++++++++++++++++----
 1 file changed, 71 insertions(+), 14 deletions(-)

diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index b390ea8371..4f93a7d886 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -113,6 +113,7 @@ DelegatedEventLoop (
   IN ARM_SVC_ARGS *EventCompleteSvcArgs
   )
 {
+  BOOLEAN FfaEnabled;
   EFI_STATUS Status;
   UINTN SvcStatus;
 
@@ -124,16 +125,32 @@ DelegatedEventLoop (
     DEBUG ((DEBUG_INFO, "X1 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg1));
     DEBUG ((DEBUG_INFO, "X2 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg2));
     DEBUG ((DEBUG_INFO, "X3 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg3));
-
-    Status = CpuDriverEntryPoint (
-               EventCompleteSvcArgs->Arg0,
-               EventCompleteSvcArgs->Arg3,
-               EventCompleteSvcArgs->Arg1
-               );
-
-    if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n",
-              EventCompleteSvcArgs->Arg0, Status));
+    DEBUG ((DEBUG_INFO, "X4 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg4));
+    DEBUG ((DEBUG_INFO, "X5 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg5));
+    DEBUG ((DEBUG_INFO, "X6 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg6));
+    DEBUG ((DEBUG_INFO, "X7 :  0x%x\n", (UINT32) EventCompleteSvcArgs->Arg7));
+
+    FfaEnabled = FeaturePcdGet (PcdFfaEnable);
+    if (FfaEnabled) {
+      Status = CpuDriverEntryPoint (
+                 EventCompleteSvcArgs->Arg0,
+                 EventCompleteSvcArgs->Arg6,
+                 EventCompleteSvcArgs->Arg3
+                 );
+      if (EFI_ERROR (Status)) {
+        DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n",
+          EventCompleteSvcArgs->Arg3, Status));
+      }
+    } else {
+      Status = CpuDriverEntryPoint (
+                 EventCompleteSvcArgs->Arg0,
+                 EventCompleteSvcArgs->Arg3,
+                 EventCompleteSvcArgs->Arg1
+                 );
+      if (EFI_ERROR (Status)) {
+        DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n",
+          EventCompleteSvcArgs->Arg0, Status));
+      }
     }
 
     switch (Status) {
@@ -157,8 +174,16 @@ DelegatedEventLoop (
       break;
     }
 
-    EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
-    EventCompleteSvcArgs->Arg1 = SvcStatus;
+    if (FfaEnabled) {
+      EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64;
+      EventCompleteSvcArgs->Arg1 = 0;
+      EventCompleteSvcArgs->Arg2 = 0;
+      EventCompleteSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
+      EventCompleteSvcArgs->Arg4 = SvcStatus;
+    } else {
+      EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
+      EventCompleteSvcArgs->Arg1 = SvcStatus;
+    }
   }
 }
 
@@ -220,6 +245,32 @@ GetSpmVersion (VOID)
   return Status;
 }
 
+/**
+  Initialize parameters to be sent via SVC call
+
+  @param[out]     InitMmFoundationSvcArgs  Args structure
+  @param[out]     Ret                      Return Code
+
+**/
+STATIC
+VOID
+InitArmSvcArgs (
+  OUT ARM_SVC_ARGS *InitMmFoundationSvcArgs,
+  OUT INT32 *Ret
+  )
+{
+  if (FeaturePcdGet (PcdFfaEnable)) {
+    InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64;
+    InitMmFoundationSvcArgs->Arg1 = 0;
+    InitMmFoundationSvcArgs->Arg2 = 0;
+    InitMmFoundationSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
+    InitMmFoundationSvcArgs->Arg4 = *Ret;
+  } else {
+    InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
+    InitMmFoundationSvcArgs->Arg1 = *Ret;
+  }
+}
+
 /**
   The entry point of Standalone MM Foundation.
 
@@ -241,6 +292,7 @@ _ModuleEntryPoint (
   EFI_SECURE_PARTITION_BOOT_INFO          *PayloadBootInfo;
   ARM_SVC_ARGS                            InitMmFoundationSvcArgs;
   EFI_STATUS                              Status;
+  INT32                                   Ret; 
   UINT32                                  SectionHeaderOffset;
   UINT16                                  NumberOfSections;
   VOID                                    *HobStart;
@@ -332,8 +384,13 @@ _ModuleEntryPoint (
   DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP 0x%lx\n", (UINT64) CpuDriverEntryPoint));
 
 finish:
+  if (Status == RETURN_UNSUPPORTED)
+    Ret = -1;
+  else if (Status == RETURN_INVALID_PARAMETER)
+    Ret = -2;
+  else
+    Ret = 0;
   ZeroMem (&InitMmFoundationSvcArgs, sizeof(InitMmFoundationSvcArgs));
-  InitMmFoundationSvcArgs.Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
-  InitMmFoundationSvcArgs.Arg1 = Status;
+  InitArmSvcArgs (&InitMmFoundationSvcArgs, &Ret);
   DelegatedEventLoop (&InitMmFoundationSvcArgs);
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (7 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 14:23   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 10/13] StandaloneMmMmuLib: Add option to use FF-A calls to get memory region's permissions Sughosh Ganu
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

Add the FF-A header for invoking the mmu functions using FF-A calls as
the transport mechanism. Support for invoking the functions through
FF-A will be added in a subsequent patch.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
---
 ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 3806490f70..362b1a0f8a 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -9,6 +9,7 @@
 
 #include <Uefi.h>
 #include <IndustryStandard/ArmMmSvc.h>
+#include <IndustryStandard/ArmFfaSvc.h>
 
 #include <Library/ArmLib.h>
 #include <Library/ArmMmuLib.h>
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 10/13] StandaloneMmMmuLib: Add option to use FF-A calls to get memory region's permissions
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (8 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 11/13] StandaloneMmMmuLib: Add option to use FF-A calls to set " Sughosh Ganu
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

Allow getting memory region's permissions using either of the Firmware
Framework(FF-A) ABI transport or through the earlier used SVC calls.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Co-developed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf       |  3 +
 ArmPkg/Include/IndustryStandard/ArmFfaSvc.h                       | 18 ++++++
 ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 66 +++++++++++++++++---
 3 files changed, 78 insertions(+), 9 deletions(-)

diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
index 85973687f5..a29dd800b5 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
@@ -23,6 +23,9 @@
   ArmPkg/ArmPkg.dec
   MdePkg/MdePkg.dec
 
+[Pcd]
+  gArmTokenSpaceGuid.PcdFfaEnable
+
 [LibraryClasses]
   ArmLib
   CacheMaintenanceLib
diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
index bdf6ce4676..65b8343ade 100644
--- a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
@@ -23,4 +23,22 @@
 #define SPM_MAJOR_VERSION_FFA                           1
 #define SPM_MINOR_VERSION_FFA                           0
 
+#define ARM_FFA_SPM_RET_SUCCESS                          0
+#define ARM_FFA_SPM_RET_NOT_SUPPORTED                   -1
+#define ARM_FFA_SPM_RET_INVALID_PARAMETERS              -2
+#define ARM_FFA_SPM_RET_NO_MEMORY                       -3
+#define ARM_FFA_SPM_RET_BUSY                            -4
+#define ARM_FFA_SPM_RET_INTERRUPTED                     -5
+#define ARM_FFA_SPM_RET_DENIED                          -6
+#define ARM_FFA_SPM_RET_RETRY                           -7
+#define ARM_FFA_SPM_RET_ABORTED                         -8
+
+// For now, the destination id to be used in the FF-A calls
+// is being hard-coded. Subsequently, support will be added
+// to get the endpoint id's dynamically
+// This is the endpoint id used by the optee os's implementation
+// of the spmc.
+// https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L66
+#define ARM_FFA_DESTINATION_ENDPOINT_ID                  3
+
 #endif // ARM_FFA_SVC_H_
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 362b1a0f8a..893e291907 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -16,6 +16,7 @@
 #include <Library/ArmSvcLib.h>
 #include <Library/BaseLib.h>
 #include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
 
 STATIC
 EFI_STATUS
@@ -24,20 +25,67 @@ GetMemoryPermissions (
   OUT UINT32                    *MemoryAttributes
   )
 {
+  INT32         Ret;
   ARM_SVC_ARGS  GetMemoryPermissionsSvcArgs = {0};
-
-  GetMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
-  GetMemoryPermissionsSvcArgs.Arg1 = BaseAddress;
-  GetMemoryPermissionsSvcArgs.Arg2 = 0;
-  GetMemoryPermissionsSvcArgs.Arg3 = 0;
+  BOOLEAN       FfaEnabled;
+
+  FfaEnabled = FeaturePcdGet (PcdFfaEnable);
+  if (FfaEnabled) {
+    GetMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
+    GetMemoryPermissionsSvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID;
+    GetMemoryPermissionsSvcArgs.Arg2 = 0;
+    GetMemoryPermissionsSvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
+    GetMemoryPermissionsSvcArgs.Arg4 = BaseAddress;
+  } else {
+    GetMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
+    GetMemoryPermissionsSvcArgs.Arg1 = BaseAddress;
+    GetMemoryPermissionsSvcArgs.Arg2 = 0;
+    GetMemoryPermissionsSvcArgs.Arg3 = 0;
+  }
 
   ArmCallSvc (&GetMemoryPermissionsSvcArgs);
-  if (GetMemoryPermissionsSvcArgs.Arg0 == ARM_SVC_SPM_RET_INVALID_PARAMS) {
-    *MemoryAttributes = 0;
-    return EFI_INVALID_PARAMETER;
+  if (FfaEnabled) {
+    Ret = GetMemoryPermissionsSvcArgs.Arg3;
+
+    switch (Ret) {
+    case ARM_FFA_SPM_RET_INVALID_PARAMETERS:
+      *MemoryAttributes = 0;
+      return EFI_INVALID_PARAMETER;
+
+    case ARM_FFA_SPM_RET_DENIED:
+      *MemoryAttributes = 0;
+      return EFI_NOT_READY;
+
+    case ARM_FFA_SPM_RET_NOT_SUPPORTED:
+      *MemoryAttributes = 0;
+      return EFI_UNSUPPORTED;
+
+    case ARM_FFA_SPM_RET_BUSY:
+      *MemoryAttributes = 0;
+      return EFI_NOT_READY;
+
+    case ARM_FFA_SPM_RET_ABORTED:
+      *MemoryAttributes = 0;
+      return EFI_ABORTED;
+    }
+
+    *MemoryAttributes = GetMemoryPermissionsSvcArgs.Arg3;
+  } else {
+    Ret = GetMemoryPermissionsSvcArgs.Arg0;
+
+    switch (Ret) {
+    case ARM_SVC_SPM_RET_INVALID_PARAMS:
+      *MemoryAttributes = 0;
+      return EFI_INVALID_PARAMETER;
+
+    case ARM_SVC_SPM_RET_NOT_SUPPORTED:
+      *MemoryAttributes = 0;
+      return EFI_UNSUPPORTED;
+    }
+
+    *MemoryAttributes = GetMemoryPermissionsSvcArgs.Arg0;
   }
 
-  *MemoryAttributes = GetMemoryPermissionsSvcArgs.Arg0;
   return EFI_SUCCESS;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 11/13] StandaloneMmMmuLib: Add option to use FF-A calls to set memory region's permissions
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (9 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 10/13] StandaloneMmMmuLib: Add option to use FF-A calls to get memory region's permissions Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Sughosh Ganu
  2020-12-14 14:42 ` [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm Sughosh Ganu
  12 siblings, 0 replies; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Achin Gupta

From: Achin Gupta <achin.gupta@arm.com>

Allow setting memory region's permissions using either of the Firmware
Framework(FF-A) ABI transport or through the earlier used SVC calls.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Co-developed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 78 +++++++++++++-------
 1 file changed, 52 insertions(+), 26 deletions(-)

diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 893e291907..be63994920 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -97,45 +97,71 @@ RequestMemoryPermissionChange (
   IN  UINTN                     Permissions
   )
 {
+  BOOLEAN       FfaEnabled;
   EFI_STATUS    Status;
   ARM_SVC_ARGS  ChangeMemoryPermissionsSvcArgs = {0};
 
-  ChangeMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
-  ChangeMemoryPermissionsSvcArgs.Arg1 = BaseAddress;
-  ChangeMemoryPermissionsSvcArgs.Arg2 = EFI_SIZE_TO_PAGES(Length);
-  ChangeMemoryPermissionsSvcArgs.Arg3 = Permissions;
+  FfaEnabled = FeaturePcdGet (PcdFfaEnable);
+
+  if (FfaEnabled) {
+    ChangeMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
+    ChangeMemoryPermissionsSvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID;
+    ChangeMemoryPermissionsSvcArgs.Arg2 = 0;
+    ChangeMemoryPermissionsSvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
+    ChangeMemoryPermissionsSvcArgs.Arg4 = BaseAddress;
+    ChangeMemoryPermissionsSvcArgs.Arg5 = EFI_SIZE_TO_PAGES (Length);
+    ChangeMemoryPermissionsSvcArgs.Arg6 = Permissions;
+  } else {
+    ChangeMemoryPermissionsSvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
+    ChangeMemoryPermissionsSvcArgs.Arg1 = BaseAddress;
+    ChangeMemoryPermissionsSvcArgs.Arg2 = EFI_SIZE_TO_PAGES (Length);
+    ChangeMemoryPermissionsSvcArgs.Arg3 = Permissions;
+  }
 
   ArmCallSvc (&ChangeMemoryPermissionsSvcArgs);
 
-  Status = ChangeMemoryPermissionsSvcArgs.Arg0;
+  if (FfaEnabled) {
+    Status = ChangeMemoryPermissionsSvcArgs.Arg3;
+
+    switch (Status) {
+    case ARM_FFA_SPM_RET_INVALID_PARAMETERS:
+      return EFI_INVALID_PARAMETER;
+
+    case ARM_FFA_SPM_RET_DENIED:
+      return EFI_NOT_READY;
+
+    case ARM_FFA_SPM_RET_NOT_SUPPORTED:
+      return EFI_UNSUPPORTED;
+
+    case ARM_FFA_SPM_RET_BUSY:
+      return EFI_NOT_READY;
 
-  switch (Status) {
-  case ARM_SVC_SPM_RET_SUCCESS:
-    Status = EFI_SUCCESS;
-    break;
+    case ARM_FFA_SPM_RET_ABORTED:
+      return EFI_ABORTED;
 
-  case ARM_SVC_SPM_RET_NOT_SUPPORTED:
-    Status = EFI_UNSUPPORTED;
-    break;
+    default:
+      return EFI_SUCCESS;
+    }
+  } else {
+    Status = ChangeMemoryPermissionsSvcArgs.Arg0;
+    switch (Status) {
 
-  case ARM_SVC_SPM_RET_INVALID_PARAMS:
-    Status = EFI_INVALID_PARAMETER;
-    break;
+    case ARM_SVC_SPM_RET_NOT_SUPPORTED:
+      return EFI_UNSUPPORTED;
 
-  case ARM_SVC_SPM_RET_DENIED:
-    Status = EFI_ACCESS_DENIED;
-    break;
+    case ARM_SVC_SPM_RET_INVALID_PARAMS:
+      return EFI_INVALID_PARAMETER;
 
-  case ARM_SVC_SPM_RET_NO_MEMORY:
-    Status = EFI_BAD_BUFFER_SIZE;
-    break;
+    case ARM_SVC_SPM_RET_DENIED:
+      return EFI_ACCESS_DENIED;
 
-  default:
-    Status = EFI_ACCESS_DENIED;
-    ASSERT (0);
-  }
+    case ARM_SVC_SPM_RET_NO_MEMORY:
+      return EFI_BAD_BUFFER_SIZE;
 
-  return Status;
+    default:
+      return EFI_SUCCESS;
+    }
+  }
 }
 
 EFI_STATUS
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (10 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 11/13] StandaloneMmMmuLib: Add option to use FF-A calls to set " Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 12:04   ` [edk2-devel] " Sami Mujawar
  2020-12-14 14:42 ` [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm Sughosh Ganu
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Ilias Apalodimas

From: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Instead of running StMM in SPM, OP-TEE creates a new secure partition,
which emulates SPM and isolates StMM from the rest of the Trusted
Applications (TAs). We can then compile StMM as an FD image and run it
in OP-TEE. With the addition of a new RPMB driver, we can leverage OP-TEE
and store variables to an RPMB device.

Since EDK2 upper layers expect byte addressable code, for the RPMB to
work, we need to allocate memory and sync it with the hardware on
read/writes. Since DynamicPCDs are not supported in that context we
can only use PatchablePCDs. So let's switch them to Pcd instead of
FixedPcd and accomodate the new driver.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
index fada0bf3c5..2a25fbdada 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
@@ -119,10 +119,12 @@
   ## SOMETIMES_PRODUCES   ## Variable:L"VarErrorFlag"
   gEdkiiVarErrorFlagGuid
 
-[FixedPcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize       ## CONSUMES
+[Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase       ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64     ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize       ## CONSUMES
+
+[FixedPcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize                  ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize              ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize          ## CONSUMES
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm
  2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
                   ` (11 preceding siblings ...)
  2020-12-14 14:42 ` [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Sughosh Ganu
@ 2020-12-14 14:42 ` Sughosh Ganu
  2021-01-05 12:09   ` [edk2-devel] " Sami Mujawar
  12 siblings, 1 reply; 25+ messages in thread
From: Sughosh Ganu @ 2020-12-14 14:42 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, Ard Biesheuvel, Leif Lindholm, Sahil Malhotra,
	Ilias Apalodimas, Sughosh Ganu

From: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Allow passing of a request to StandaloneMm Core through the Firmware
Framework(FF-A) using FFA_MSG_SEND_DIRECT_REQ method. This method is
used as a mechanism for requesting some service from StandaloneMm.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
 StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
index 6a25c4c548..f7b4451cd1 100644
--- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
+++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
@@ -22,6 +22,7 @@
 #include <Guid/ZeroGuid.h>
 #include <Guid/MmramMemoryReserve.h>
 
+#include <IndustryStandard/ArmFfaSvc.h>
 #include <IndustryStandard/ArmStdSmc.h>
 
 #include "StandaloneMmCpu.h"
@@ -78,7 +79,8 @@ PiMmStandaloneArmTfCpuDriverEntry (
   // receipt of a synchronous MM request. Use the Event ID to distinguish
   // between synchronous and asynchronous events.
   //
-  if (ARM_SMC_ID_MM_COMMUNICATE_AARCH64 != EventId) {
+  if ((ARM_SMC_ID_MM_COMMUNICATE_AARCH64 != EventId) &&
+      (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 != EventId)) {
     DEBUG ((DEBUG_INFO, "UnRecognized Event - 0x%x\n", EventId));
     return EFI_INVALID_PARAMETER;
   }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version
  2020-12-14 14:42 ` [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version Sughosh Ganu
@ 2021-01-04 17:01   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-04 17:01 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote:

> 
> +CONST UINT32 mSpmMajorVer = SPM_MAJOR_VERSION;
> +CONST UINT32 mSpmMinorVer = SPM_MINOR_VERSION;

The STATIC storage class specifier can be used for the above variables.

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 305 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM
  2020-12-14 14:42 ` [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM Sughosh Ganu
@ 2021-01-04 17:34   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-04 17:34 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote:

> 
> + INT32 Ret;

Remove trailing space.

On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote:

> 
> + if (Status == RETURN_UNSUPPORTED)
> + Ret = -1;
> + else if (Status == RETURN_INVALID_PARAMETER)
> + Ret = -2;
> + else
> + Ret = 0;

'{' and '}' are required for if statements, see https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/57_c_programming#5-7-3-4-1-the-if-statement-shall-be-followed-by-a-space-and-then-the-open-parenthesis

Also, LocateStandaloneMmCorePeCoffData() can return EFI_NOT_FOUND. Similarly, other error codes could also be returned and would need to be mapped.
Would it be better to have a function that does the conversion/mapping?

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 1193 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd
  2020-12-14 14:42 ` [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Sughosh Ganu
@ 2021-01-05 12:04   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 12:04 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 123 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm
  2020-12-14 14:42 ` [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm Sughosh Ganu
@ 2021-01-05 12:09   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 12:09 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header
  2020-12-14 14:42 ` [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header Sughosh Ganu
@ 2021-01-05 12:12   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 12:12 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters
  2020-12-14 14:42 ` [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Sughosh Ganu
@ 2021-01-05 12:16   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 12:16 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point
  2020-12-14 14:42 ` [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point Sughosh Ganu
@ 2021-01-05 12:19   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 12:19 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable
  2020-12-14 14:42 ` [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable Sughosh Ganu
@ 2021-01-05 13:53   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 13:53 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A
  2020-12-14 14:42 ` [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A Sughosh Ganu
@ 2021-01-05 13:58   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 13:58 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote:

> 
> +CONST UINT32 mSpmMajorVerFfa = SPM_MAJOR_VERSION_FFA;
> +CONST UINT32 mSpmMinorVerFfa = SPM_MINOR_VERSION_FFA;

The STATIC storage class specifier can be used for the above variables.

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 342 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version
  2020-12-14 14:42 ` [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version Sughosh Ganu
@ 2021-01-05 14:18   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 14:18 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [edk2-devel] [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library
  2020-12-14 14:42 ` [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library Sughosh Ganu
@ 2021-01-05 14:23   ` Sami Mujawar
  0 siblings, 0 replies; 25+ messages in thread
From: Sami Mujawar @ 2021-01-05 14:23 UTC (permalink / raw)
  To: Sughosh Ganu, devel

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

[-- Attachment #2: Type: text/html, Size: 100 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-01-05 14:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14 14:42 [PATCH v2 00/13] Add support for using FF-A calls Sughosh Ganu
2020-12-14 14:42 ` [PATCH v2 01/13] ArmPkg/IndustryStandard: Add barebones FF-A header Sughosh Ganu
2021-01-05 12:12   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Sughosh Ganu
2021-01-05 12:16   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 03/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point Sughosh Ganu
2021-01-05 12:19   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 04/13] ArmPkg: Introduce support for PcdFfaEnable Sughosh Ganu
2021-01-05 13:53   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 05/13] StandaloneMmPkg: Add macros for SPM version Sughosh Ganu
2021-01-04 17:01   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 06/13] StandaloneMmPkg: Add the SPM version for FF-A Sughosh Ganu
2021-01-05 13:58   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 07/13] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version Sughosh Ganu
2021-01-05 14:18   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM Sughosh Ganu
2021-01-04 17:34   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 09/13] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library Sughosh Ganu
2021-01-05 14:23   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 10/13] StandaloneMmMmuLib: Add option to use FF-A calls to get memory region's permissions Sughosh Ganu
2020-12-14 14:42 ` [PATCH v2 11/13] StandaloneMmMmuLib: Add option to use FF-A calls to set " Sughosh Ganu
2020-12-14 14:42 ` [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Sughosh Ganu
2021-01-05 12:04   ` [edk2-devel] " Sami Mujawar
2020-12-14 14:42 ` [PATCH v2 13/13] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm Sughosh Ganu
2021-01-05 12:09   ` [edk2-devel] " Sami Mujawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox