TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_spe_mailbox.h
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 #ifndef __TFM_SPE_MAILBOX_H__
9 #define __TFM_SPE_MAILBOX_H__
10 
11 #include "tfm_mailbox.h"
12 
13 /* A single slot structure in SPE mailbox queue */
16 
17  uint8_t ns_slot_idx;
19 };
20 
22  mailbox_queue_status_t empty_slots; /* bitmask of empty slots */
23 
26  uint8_t cur_proc_slot_idx; /*
27  * The index of mailbox
28  * queue slot currently
29  * under processing.
30  */
31 };
32 
39 int32_t tfm_mailbox_handle_msg(void);
40 
51 int32_t tfm_mailbox_reply_msg(mailbox_msg_handle_t handle, int32_t reply);
52 
59 int32_t tfm_mailbox_init(void);
60 
69 int32_t tfm_mailbox_hal_init(struct secure_mailbox_queue_t *s_queue);
70 
78 int32_t tfm_mailbox_hal_notify_peer(void);
79 
84 
89 
90 #endif /* __TFM_SPE_MAILBOX_H__ */
struct ns_mailbox_queue_t * ns_queue
int32_t tfm_mailbox_init(void)
SPE mailbox initialization.
int32_t tfm_mailbox_reply_msg(mailbox_msg_handle_t handle, int32_t reply)
Return PSA client call return result to NSPE.
int32_t tfm_mailbox_hal_init(struct secure_mailbox_queue_t *s_queue)
Platform specific initialization of SPE mailbox.
mailbox_queue_status_t empty_slots
mailbox_msg_handle_t msg_handle
int32_t tfm_mailbox_hal_notify_peer(void)
Notify NSPE that a PSA client call return result is replied. Implemented by platform specific inter-p...
#define NUM_MAILBOX_QUEUE_SLOT
Definition: tfm_mailbox.h:57
uint32_t mailbox_queue_status_t
Definition: tfm_mailbox.h:147
int32_t mailbox_msg_handle_t
Definition: tfm_mailbox.h:122
void tfm_mailbox_hal_enter_critical(void)
Enter critical section of NSPE mailbox.
struct mailbox_msg_t msg
void tfm_mailbox_hal_exit_critical(void)
Exit critical section of NSPE mailbox.
struct secure_mailbox_slot_t queue[NUM_MAILBOX_QUEUE_SLOT]
int32_t tfm_mailbox_handle_msg(void)
Handle mailbox message(s) from NSPE.