Mistake on this page?
Report an issue in GitHub or email us
spm_messages.h
1 /* Copyright (c) 2017-2018 ARM Limited
2  *
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef SPM_MESSAGES_H
19 #define SPM_MESSAGES_H
20 
21 #include "cmsis_compiler.h"
22 #include "cmsis_os2.h"
23 #include "psa_defs.h"
24 
25 // All spm_pending_*_msg structs below are packed since in a dual processor
26 // solution they are used in both processors
27 
28 /*
29  * Structure containing data sent from NSPE for ROT_SRV call.
30  */
31 typedef __PACKED_STRUCT spm_pending_call_msg {
32  const psa_invec *in_vec; /* Invecs sent.*/
33  uint32_t in_vec_size; /* Number of Invecs sent.*/
34  const psa_outvec *out_vec; /* Outvecs for response.*/
35  uint32_t out_vec_size; /* Number of Outvecs for response.*/
36  psa_status_t rc; /* Return code to be filled by the Root of Trust Service.*/
37  osSemaphoreId_t completion_sem_id; /* Semaphore to be released at the end of execution */
38 } __ALIGNED(4) spm_pending_call_msg_t;
39 
40 /*
41  * Structure containing data sent from NSPE for connection.
42  */
43 typedef __PACKED_STRUCT spm_pending_connect_msg {
44  uint32_t min_version; /* Minor version of the Root of Trust Service interface.*/
45  psa_status_t rc; /* Return code to be filled by the Root of Trust Service.*/
46  osSemaphoreId_t completion_sem_id; /* Semaphore to be released at the end of execution */
47 } __ALIGNED(4) spm_pending_connect_msg_t;
48 
49 
50 /*
51  * Structure containing data sent from NSPE for RoT-Service version query.
52  */
53 typedef __PACKED_STRUCT spm_pending_version_msg {
54  uint32_t rc; /* Return code to be filled by the Root of Trust Service.*/
55  osSemaphoreId_t completion_sem_id; /* Semaphore to be released at the end of execution */
56 } __ALIGNED(4) spm_pending_version_msg_t;
57 
58 /*
59  * Structure containing data sent from NSPE for closing a connection.
60  */
61 typedef __PACKED_STRUCT spm_pending_close_msg {
62  psa_handle_t handle; /* Handle of channel to be closed */
63  osSemaphoreId_t completion_sem_id; /* Semaphore to be released at the end of execution */
64 } __ALIGNED(4) spm_pending_close_msg_t;
65 
66 #endif // SPM_MESSAGES_H
Structure which describes a scatter-gather output buffer.
Definition: client.h:54
Structure that describes a scatter-gather input buffer.
Definition: client.h:48
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.