blob: 64a9447048fb5de8777e242edf16b79cb3d5a94b [file] [log] [blame]
Ashutosh Singhf4d88672017-11-29 13:35:43 +00001/*
Mate Toth-Pal7de74b52018-02-23 15:46:47 +01002 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
Ashutosh Singhf4d88672017-11-29 13:35:43 +00003 *
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,
Mate Toth-Pal7de74b52018-02-23 15:46:47 +010026 TFM_PARTITION_PENDED,
27 TFM_PARTITION_BUSY,
28 TFM_ERROR_PARTITION_ALREADY_PENDED,
Ashutosh Singhf4d88672017-11-29 13:35:43 +000029 TFM_ERROR_SECURE_DOMAIN_LOCKED,
30 TFM_ERROR_INVALID_PARAMETER,
Mate Toth-Pal7de74b52018-02-23 15:46:47 +010031 TFM_ERROR_PARTITION_NON_REENTRANT,
Ashutosh Singhf4d88672017-11-29 13:35:43 +000032 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-Pal7de74b52018-02-23 15:46:47 +010037 TFM_PARTITION_SPECIFIC_ERROR_MIN,
Ashutosh Singhf4d88672017-11-29 13:35:43 +000038};
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__ */