Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 1 | /* |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 2 | * Copyright (c) 2014-2023, ARM Limited and Contributors. All rights reserved. |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 5 | */ |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 6 | #ifndef TEESMC_OPTEED_MACROS_H |
| 7 | #define TEESMC_OPTEED_MACROS_H |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 8 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | #include <common/runtime_svc.h> |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 10 | |
| 11 | #define TEESMC_OPTEED_RV(func_num) \ |
| 12 | ((SMC_TYPE_FAST << FUNCID_TYPE_SHIFT) | \ |
| 13 | ((SMC_32) << FUNCID_CC_SHIFT) | \ |
| 14 | (62 << FUNCID_OEN_SHIFT) | \ |
| 15 | ((func_num) & FUNCID_NUM_MASK)) |
| 16 | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 17 | #define NSSMC_OPTEED_CALL(func_num) \ |
| 18 | ((SMC_TYPE_FAST << FUNCID_TYPE_SHIFT) | \ |
| 19 | ((SMC_32) << FUNCID_CC_SHIFT) | \ |
Jeffrey Kardatzke | 85f05c0 | 2023-03-02 12:02:51 -0800 | [diff] [blame] | 20 | (63 << FUNCID_OEN_SHIFT) | \ |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 21 | ((func_num) & FUNCID_NUM_MASK)) |
| 22 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 23 | #endif /* TEESMC_OPTEED_MACROS_H */ |