Add MM communication protocol definitions
Add MM comminication SMC call function IDs, return codes and a
structure the MM communicate message header.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ibccd60a131f897400a7aa955dc1502ed66be3025
diff --git a/protocols/common/mm/mm_smc.h b/protocols/common/mm/mm_smc.h
new file mode 100644
index 0000000..7927518
--- /dev/null
+++ b/protocols/common/mm/mm_smc.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ */
+
+#ifndef MM_SMC_H_
+#define MM_SMC_H_
+
+/**
+ * The file contains the constant definitions of ARM Magangement Mode Interface
+ * specification (DEN0060A) which are used in MM SMC calls.
+ */
+
+#include "util.h"
+
+/* MM SMV IDs */
+#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH32 UINT32_C(0x84000061)
+#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64 UINT32_C(0xC4000061)
+
+#ifdef ARM64
+#define ARM_SVC_ID_SP_EVENT_COMPLETE ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64
+#else /* ARM64 */
+#define ARM_SVC_ID_SP_EVENT_COMPLETE ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH32
+#endif /* ARM64 */
+
+/* Return codes */
+#define MM_RETURN_CODE_SUCCESS 0
+#define MM_RETURN_CODE_NOT_SUPPORTED -1
+#define MM_RETURN_CODE_INVALID_PARAMETER -2
+#define MM_RETURN_CODE_DENIED -3
+/* -4 is skipped according to the spec */
+#define MM_RETURN_CODE_NO_MEMORY -5
+
+#endif /* MM_SMC_H_ */