]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Include/IndustryStandard/ArmMmSvc.h
ArmPkg/Include: Add MM interface SVC return codes.
[mirror_edk2.git] / ArmPkg / Include / IndustryStandard / ArmMmSvc.h
CommitLineData
bbf79aa2
SV
1/** @file\r
2*\r
3* Copyright (c) 2012-2017, ARM Limited. All rights reserved.\r
4*\r
5* This program and the accompanying materials\r
6* are licensed and made available under the terms and conditions of the BSD License\r
7* which accompanies this distribution. The full text of the license may be found at\r
8* http://opensource.org/licenses/bsd-license.php\r
9*\r
10* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12*\r
13**/\r
14\r
15#ifndef __ARM_MM_SVC_H__\r
16#define __ARM_MM_SVC_H__\r
17\r
18/*\r
19 * SVC IDs to allow the MM secure partition to initialise itself, handle\r
20 * delegated events and request the Secure partition manager to perform\r
21 * privileged operations on its behalf.\r
22 */\r
9d584308 23#define ARM_SVC_ID_SPM_VERSION_AARCH32 0x84000060\r
bbf79aa2
SV
24#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64 0xC4000061\r
25#define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64 0xC4000064\r
26#define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64 0xC4000065\r
27\r
28#define SET_MEM_ATTR_DATA_PERM_MASK 0x3\r
29#define SET_MEM_ATTR_DATA_PERM_SHIFT 0\r
30#define SET_MEM_ATTR_DATA_PERM_NO_ACCESS 0\r
31#define SET_MEM_ATTR_DATA_PERM_RW 1\r
32#define SET_MEM_ATTR_DATA_PERM_RO 3\r
33\r
34#define SET_MEM_ATTR_CODE_PERM_MASK 0x1\r
35#define SET_MEM_ATTR_CODE_PERM_SHIFT 2\r
36#define SET_MEM_ATTR_CODE_PERM_X 0\r
37#define SET_MEM_ATTR_CODE_PERM_XN 1\r
38\r
39#define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm, c_perm) \\r
40 ((((c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) << SET_MEM_ATTR_CODE_PERM_SHIFT) | \\r
41 (( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) << SET_MEM_ATTR_DATA_PERM_SHIFT))\r
42\r
37b2516b
AG
43/* MM SVC Return error codes */\r
44#define ARM_SVC_SPM_RET_SUCCESS 0\r
45#define ARM_SVC_SPM_RET_NOT_SUPPORTED -1\r
46#define ARM_SVC_SPM_RET_INVALID_PARAMS -2\r
47#define ARM_SVC_SPM_RET_DENIED -3\r
48#define ARM_SVC_SPM_RET_NO_MEMORY -5\r
49\r
bbf79aa2 50#endif\r