rmmd: Add MEC allocate and release calls
------------------------------------------------
Disclaimer: This branch contains prototype code
which is for demonstrative purposes only and to
serve as proof of concept. It is designed to
allow prototyping of new features and any
productization paths if taken forward would be
delivered through the master branch.
------------------------------------------------
Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Change-Id: I2a969310b47e8c6da1817a79be0cd56158c6efc3
diff --git a/include/services/rmmd_svc.h b/include/services/rmmd_svc.h
index 0cc8628..3f6ecec 100644
--- a/include/services/rmmd_svc.h
+++ b/include/services/rmmd_svc.h
@@ -161,6 +161,9 @@
#define RMM_EL3_TOKEN_SIGN_PULL_RESP_OP U(2)
#define RMM_EL3_TOKEN_SIGN_GET_RAK_PUB_OP U(3)
+#define RMM_ALLOCATE_MEC_KEY SMC64_RMMD_EL3_FID(U(6))
+#define RMM_RELEASE_MEC_KEY SMC64_RMMD_EL3_FID(U(7))
+
/* ECC Curve types for attest key generation */
#define ATTEST_KEY_CURVE_ECC_SECP384R1 U(0)
diff --git a/services/std_svc/rmmd/rmmd_main.c b/services/std_svc/rmmd/rmmd_main.c
index 13ea5db..5214358 100644
--- a/services/std_svc/rmmd/rmmd_main.c
+++ b/services/std_svc/rmmd/rmmd_main.c
@@ -521,6 +521,10 @@
VERBOSE("RMMD: running rmmd_rmm_sync_exit\n");
rmmd_rmm_sync_exit(x1);
+ case RMM_ALLOCATE_MEC_KEY:
+ SMC_RET0(handle);
+ case RMM_RELEASE_MEC_KEY:
+ SMC_RET0(handle);
default:
WARN("RMMD: Unsupported RMM-EL3 call 0x%08x\n", smc_fid);
SMC_RET1(handle, SMC_UNK);