TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_platform_func_api.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #include <stdbool.h>
9 #include "tfm_platform_api.h"
10 #include "tfm_ns_interface.h"
11 #include "tfm_veneers.h"
12 
14 {
16  (veneer_fn)tfm_platform_sp_system_reset_veneer,
17  0,
18  0,
19  0,
20  0);
21 }
22 
25  psa_invec *input, psa_outvec *output)
26 {
27  tfm_platform_ioctl_req_t req = request;
28  struct psa_invec in_vec[2];
29  size_t inlen, outlen;
30 
31  in_vec[0].base = &req;
32  in_vec[0].len = sizeof(req);
33  if (input != NULL) {
34  in_vec[1].base = input->base;
35  in_vec[1].len = input->len;
36  inlen = 2;
37  } else {
38  inlen = 1;
39  }
40 
41  if (output != NULL) {
42  outlen = 1;
43  } else {
44  outlen = 0;
45  }
46 
48  (veneer_fn)tfm_platform_sp_ioctl_veneer,
49  (uint32_t)in_vec, (uint32_t)inlen,
50  (uint32_t)output, (uint32_t)outlen);
51 }
52 
int32_t tfm_platform_ioctl_req_t
size_t len
Definition: client.h:68
int32_t(* veneer_fn)(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3)
int32_t tfm_ns_interface_dispatch(veneer_fn fn, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3)
NS interface, veneer function dispatcher.
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.
const void * base
Definition: client.h:67