TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_platform_api.h
Go to the documentation of this file.
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 <stdbool.h>
13 #include <stdint.h>
14 #include "tfm_api.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
23 #define TFM_PLATFORM_API_VERSION_MAJOR (0)
24 #define TFM_PLATFORM_API_VERSION_MINOR (3)
25 
26 #define TFM_PLATFORM_API_ID_NV_READ (1010)
27 #define TFM_PLATFORM_API_ID_NV_INCREMENT (1011)
28 
40 
41  /* Following entry is only to ensure the error code of int size */
43 };
44 
45 typedef int32_t tfm_platform_ioctl_req_t;
46 
53 
64 enum tfm_platform_err_t tfm_platform_ioctl(tfm_platform_ioctl_req_t request,
65  psa_invec *input,
66  psa_outvec *output);
67 
77 tfm_platform_nv_counter_increment(uint32_t counter_id);
78 
91 tfm_platform_nv_counter_read(uint32_t counter_id,
92  uint32_t size, uint8_t *val);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* __TFM_PLATFORM_API__ */
enum tfm_platform_err_t tfm_platform_nv_counter_read(uint32_t counter_id, uint32_t size, uint8_t *val)
Reads the given non-volatile (NV) counter.
int32_t tfm_platform_ioctl_req_t
enum tfm_platform_err_t tfm_platform_nv_counter_increment(uint32_t counter_id)
Increments the given non-volatile (NV) counter by one.
enum tfm_platform_err_t tfm_platform_system_reset(void)
Resets the system.
enum tfm_platform_err_t tfm_platform_ioctl(tfm_platform_ioctl_req_t request, psa_invec *input, psa_outvec *output)
Performs a platform-specific service.
tfm_platform_err_t
Platform service error types.