blob: d911f0c31d816680c3c4a48c6c37b41238a7a9f1 [file] [log] [blame]
Ashutosh Singhf4d88672017-11-29 13:35:43 +00001/*
2 * Copyright (c) 2017, Arm Limited. All rights reserved.
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
12extern "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 */
23enum tfm_status_e
24{
25 TFM_SUCCESS = 0,
26 TFM_SERVICE_PENDED,
27 TFM_SERVICE_BUSY,
28 TFM_ERROR_SERVICE_ALREADY_PENDED,
29 TFM_ERROR_SECURE_DOMAIN_LOCKED,
30 TFM_ERROR_INVALID_PARAMETER,
31 TFM_ERROR_SERVICE_NON_REENTRANT,
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,
37 TFM_SERVICE_SPECIFIC_ERROR_MIN,
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__ */