blob: 79275185848991dfcc211fe859c461c22c09f61b [file] [log] [blame]
Imre Kisbef43b02021-10-26 13:57:01 +02001/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
4 */
5
6#ifndef MM_SMC_H_
7#define MM_SMC_H_
8
9/**
10 * The file contains the constant definitions of ARM Magangement Mode Interface
11 * specification (DEN0060A) which are used in MM SMC calls.
12 */
13
14#include "util.h"
15
16/* MM SMV IDs */
17#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH32 UINT32_C(0x84000061)
18#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64 UINT32_C(0xC4000061)
19
20#ifdef ARM64
21#define ARM_SVC_ID_SP_EVENT_COMPLETE ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64
22#else /* ARM64 */
23#define ARM_SVC_ID_SP_EVENT_COMPLETE ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH32
24#endif /* ARM64 */
25
26/* Return codes */
27#define MM_RETURN_CODE_SUCCESS 0
28#define MM_RETURN_CODE_NOT_SUPPORTED -1
29#define MM_RETURN_CODE_INVALID_PARAMETER -2
30#define MM_RETURN_CODE_DENIED -3
31/* -4 is skipped according to the spec */
32#define MM_RETURN_CODE_NO_MEMORY -5
33
34#endif /* MM_SMC_H_ */