TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_ps_test_service.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifdef TFM_PSA_API
9 #include "psa/service.h"
11 #else
12 #include "psa/client.h"
13 #endif
14 
15 #include "ps_object_system.h"
16 
18  psa_outvec *out_vec, size_t out_len)
19 {
20  (void)in_vec;
21  (void)in_len;
22  (void)out_vec;
23  (void)out_len;
24 
25  return ps_system_prepare();
26 }
27 
29 {
30 #ifdef TFM_PSA_API
31  psa_msg_t msg;
32 
33  while (1) {
36  switch (msg.type) {
37  case PSA_IPC_CONNECT:
38  case PSA_IPC_DISCONNECT:
40  break;
41  case PSA_IPC_CALL:
43  break;
44  }
45  }
46 #else
47  return PSA_SUCCESS;
48 #endif
49 }
#define PSA_BLOCK
Definition: service.h:31
int32_t type
Definition: service.h:56
#define PSA_SUCCESS
Definition: crypto_values.h:35
psa_status_t tfm_ps_test_init(void)
#define TFM_PS_TEST_PREPARE_SIGNAL
psa_handle_t handle
Definition: service.h:61
#define PSA_IPC_DISCONNECT
Definition: service.h:47
psa_status_t tfm_ps_test_prepare(psa_invec *in_vec, size_t in_len, psa_outvec *out_vec, size_t out_len)
void psa_reply(psa_handle_t msg_handle, psa_status_t status)
Complete handling of a specific message and unblock the client.
Definition: psa_service.c:67
psa_signal_t psa_wait(psa_signal_t signal_mask, uint32_t timeout)
Return the Secure Partition interrupt signals that have been asserted from a subset of signals provid...
Definition: psa_service.c:15
#define PSA_IPC_CONNECT
Definition: service.h:45
#define PSA_IPC_CALL
Definition: client.h:59
psa_status_t psa_get(psa_signal_t signal, psa_msg_t *msg)
Retrieve the message which corresponds to a given RoT Service signal and remove the message from the ...
Definition: psa_service.c:24
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43
psa_status_t ps_system_prepare(void)
Prepares the protected storage system for usage, populating internal structures. It identifies and va...