Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 1 | /* |
Mate Toth-Pal | 7de74b5 | 2018-02-23 15:46:47 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2018, Arm Limited. All rights reserved. |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __TFM_API_H__ |
| 9 | #define __TFM_API_H__ |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | /* FixMe: sort out DEBUG compile option and limit return value options |
| 16 | * on external interfaces */ |
| 17 | /* Note: |
| 18 | * TFM will only return values recognized and parsed by TFM core. |
| 19 | * Service return codes are not automatically passed on to REE. |
| 20 | * Any non-zero return value is interpreted as an error that may trigger |
| 21 | * TEE error handling flow. |
| 22 | */ |
| 23 | enum tfm_status_e |
| 24 | { |
| 25 | TFM_SUCCESS = 0, |
Mate Toth-Pal | 7de74b5 | 2018-02-23 15:46:47 +0100 | [diff] [blame] | 26 | TFM_PARTITION_PENDED, |
| 27 | TFM_PARTITION_BUSY, |
| 28 | TFM_ERROR_PARTITION_ALREADY_PENDED, |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 29 | TFM_ERROR_SECURE_DOMAIN_LOCKED, |
| 30 | TFM_ERROR_INVALID_PARAMETER, |
Mate Toth-Pal | 7de74b5 | 2018-02-23 15:46:47 +0100 | [diff] [blame] | 31 | TFM_ERROR_PARTITION_NON_REENTRANT, |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 32 | TFM_ERROR_NS_THREAD_MODE_CALL, |
| 33 | TFM_ERROR_INVALID_EXC_MODE, |
| 34 | TFM_SECURE_LOCK_FAILED, |
| 35 | TFM_SECURE_UNLOCK_FAILED, |
| 36 | TFM_ERROR_GENERIC = 0x1F, |
Mate Toth-Pal | 7de74b5 | 2018-02-23 15:46:47 +0100 | [diff] [blame] | 37 | TFM_PARTITION_SPECIFIC_ERROR_MIN, |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | //==================== Secure function declarations ==========================// |
| 41 | |
| 42 | /* Placeholder for secure function declarations defined by TF-M in the future */ |
| 43 | |
| 44 | //================ End Secure function declarations ==========================// |
| 45 | |
| 46 | #ifdef __cplusplus |
| 47 | } |
| 48 | #endif |
| 49 | |
| 50 | #endif /* __TFM_API_H__ */ |