Antonio Nino Diaz | 35b37f0 | 2018-01-08 17:33:34 +0000 | [diff] [blame] | 1 | /* |
Antonio Nino Diaz | cbccdbf | 2019-01-21 11:53:29 +0000 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. |
Antonio Nino Diaz | 35b37f0 | 2018-01-08 17:33:34 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef MM_SVC_H |
| 8 | #define MM_SVC_H |
Antonio Nino Diaz | 35b37f0 | 2018-01-08 17:33:34 +0000 | [diff] [blame] | 9 | |
Antonio Nino Diaz | cbccdbf | 2019-01-21 11:53:29 +0000 | [diff] [blame] | 10 | #if SPM_MM |
Antonio Nino Diaz | 5c673e8 | 2018-10-30 12:50:41 +0000 | [diff] [blame] | 11 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 12 | #include <lib/utils_def.h> |
Antonio Nino Diaz | 35b37f0 | 2018-01-08 17:33:34 +0000 | [diff] [blame] | 13 | |
| 14 | #define MM_VERSION_MAJOR U(1) |
| 15 | #define MM_VERSION_MAJOR_SHIFT 16 |
| 16 | #define MM_VERSION_MAJOR_MASK U(0x7FFF) |
| 17 | #define MM_VERSION_MINOR U(0) |
| 18 | #define MM_VERSION_MINOR_SHIFT 0 |
| 19 | #define MM_VERSION_MINOR_MASK U(0xFFFF) |
| 20 | #define MM_VERSION_FORM(major, minor) ((major << MM_VERSION_MAJOR_SHIFT) | (minor)) |
| 21 | #define MM_VERSION_COMPILED MM_VERSION_FORM(MM_VERSION_MAJOR, MM_VERSION_MINOR) |
| 22 | |
| 23 | /* |
| 24 | * SMC IDs defined in [1] for accessing MM services from the Non-secure world. |
| 25 | * These FIDs occupy the range 0x40 - 0x5f. |
| 26 | * [1] DEN0060A_ARM_MM_Interface_Specification.pdf |
| 27 | */ |
| 28 | #define MM_VERSION_AARCH32 U(0x84000040) |
| 29 | |
| 30 | #define MM_COMMUNICATE_AARCH64 U(0xC4000041) |
| 31 | #define MM_COMMUNICATE_AARCH32 U(0x84000041) |
| 32 | |
Antonio Nino Diaz | cbccdbf | 2019-01-21 11:53:29 +0000 | [diff] [blame] | 33 | #endif /* SPM_MM */ |
Antonio Nino Diaz | 5c673e8 | 2018-10-30 12:50:41 +0000 | [diff] [blame] | 34 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 35 | #endif /* MM_SVC_H */ |