https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
45 lines
1.6 KiB
C
45 lines
1.6 KiB
C
/** @file
|
|
*
|
|
* Copyright (c) 2012-2017, ARM Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
*
|
|
**/
|
|
|
|
#ifndef __ARM_MM_SVC_H__
|
|
#define __ARM_MM_SVC_H__
|
|
|
|
/*
|
|
* SVC IDs to allow the MM secure partition to initialise itself, handle
|
|
* delegated events and request the Secure partition manager to perform
|
|
* privileged operations on its behalf.
|
|
*/
|
|
#define ARM_SVC_ID_SPM_VERSION_AARCH32 0x84000060
|
|
#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64 0xC4000061
|
|
#define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64 0xC4000064
|
|
#define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64 0xC4000065
|
|
|
|
#define SET_MEM_ATTR_DATA_PERM_MASK 0x3
|
|
#define SET_MEM_ATTR_DATA_PERM_SHIFT 0
|
|
#define SET_MEM_ATTR_DATA_PERM_NO_ACCESS 0
|
|
#define SET_MEM_ATTR_DATA_PERM_RW 1
|
|
#define SET_MEM_ATTR_DATA_PERM_RO 3
|
|
|
|
#define SET_MEM_ATTR_CODE_PERM_MASK 0x1
|
|
#define SET_MEM_ATTR_CODE_PERM_SHIFT 2
|
|
#define SET_MEM_ATTR_CODE_PERM_X 0
|
|
#define SET_MEM_ATTR_CODE_PERM_XN 1
|
|
|
|
#define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm, c_perm) \
|
|
((((c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) << SET_MEM_ATTR_CODE_PERM_SHIFT) | \
|
|
(( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) << SET_MEM_ATTR_DATA_PERM_SHIFT))
|
|
|
|
/* MM SVC Return error codes */
|
|
#define ARM_SVC_SPM_RET_SUCCESS 0
|
|
#define ARM_SVC_SPM_RET_NOT_SUPPORTED -1
|
|
#define ARM_SVC_SPM_RET_INVALID_PARAMS -2
|
|
#define ARM_SVC_SPM_RET_DENIED -3
|
|
#define ARM_SVC_SPM_RET_NO_MEMORY -5
|
|
|
|
#endif
|