Mistake on this page?
Report an issue in GitHub or email us
inc/psa/tfm_platform_api.h
1 /*
2  * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_PLATFORM_API__
9 #define __TFM_PLATFORM_API__
10 
11 #include <limits.h>
12 #include <stdint.h>
13 #include "psa/client.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /**
20  * \brief TFM secure partition platform API version
21  */
22 #define TFM_PLATFORM_API_VERSION_MAJOR (0)
23 #define TFM_PLATFORM_API_VERSION_MINOR (3)
24 
25 /*!
26  * \enum tfm_platform_err_t
27  *
28  * \brief Platform service error types
29  *
30  */
31 enum tfm_platform_err_t {
32  TFM_PLATFORM_ERR_SUCCESS = 0,
33  TFM_PLATFORM_ERR_SYSTEM_ERROR,
34  TFM_PLATFORM_ERR_INVALID_PARAM,
35  TFM_PLATFORM_ERR_NOT_SUPPORTED,
36 
37  /* Following entry is only to ensure the error code of int size */
38  TFM_PLATFORM_ERR_FORCE_INT_SIZE = INT_MAX
39 };
40 
41 typedef int32_t tfm_platform_ioctl_req_t;
42 
43 /*!
44  * \brief Performs a platform-specific service
45  *
46  * \param[in] request Request identifier (valid values vary
47  * based on the platform)
48  * \param[in] input Input buffer to the requested service (or NULL)
49  * \param[in,out] output Output buffer to the requested service (or NULL)
50  *
51  * \return Returns values as specified by the \ref tfm_platform_err_t
52  */
53 enum tfm_platform_err_t tfm_platform_ioctl(tfm_platform_ioctl_req_t request,
54  psa_invec *input,
55  psa_outvec *output);
56 
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* __TFM_PLATFORM_API__ */
A writable output memory region provided to an RoT Service.
A read-only input memory region provided to an RoT Service.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.