mirror of https://github.com/ARMmbed/mbed-os.git
Move current TFM to TFM_V1_1
Named TFM V1.1 as TFM_V1_1 instead of TFM_V1.1 as TFM_V1.1 is invalid as macro name Signed-off-by: Charley Chu <haoc@cypress.com>pull/13358/head
parent
8b663cfaa5
commit
badfa189d6
|
@ -54,7 +54,6 @@ int32_t tfm_ns_mailbox_hal_notify_peer(void)
|
|||
|
||||
static int32_t mailbox_sema_init(void)
|
||||
{
|
||||
#if defined(CY_IPC_DEFAULT_CFG_DISABLE)
|
||||
/* semaphore data */
|
||||
static uint32_t tfm_sema __attribute__((section("TFM_SHARED_DATA")));
|
||||
|
||||
|
@ -63,7 +62,6 @@ static int32_t mailbox_sema_init(void)
|
|||
&tfm_sema) != CY_IPC_SEMA_SUCCESS) {
|
||||
return PLATFORM_MAILBOX_INIT_ERROR;
|
||||
}
|
||||
#endif
|
||||
return PLATFORM_MAILBOX_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -120,7 +118,11 @@ int32_t tfm_ns_mailbox_hal_init(struct ns_mailbox_queue_t *queue)
|
|||
|
||||
const void *tfm_ns_mailbox_get_task_handle(void)
|
||||
{
|
||||
return osThreadGetId();;
|
||||
#ifdef TFM_MULTI_CORE_MULTI_CLIENT_CALL
|
||||
return osThreadGetId();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void tfm_ns_mailbox_hal_wait_reply(mailbox_msg_handle_t handle)
|
||||
|
@ -277,7 +279,7 @@ static bool mailbox_clear_intr(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
void cpuss_interrupts_ipc_8_IRQHandler(void)
|
||||
void cpuss_interrupts_ipc_5_IRQHandler(void)
|
||||
{
|
||||
uint32_t magic;
|
||||
mailbox_msg_handle_t handle;
|
||||
|
@ -297,6 +299,9 @@ void cpuss_interrupts_ipc_8_IRQHandler(void)
|
|||
|
||||
task_handle = (osThreadId_t)tfm_ns_mailbox_get_msg_owner(handle);
|
||||
if (task_handle) {
|
||||
/* According to the description of CMSIS-RTOS v2 Thread Flags,
|
||||
* osThreadFlagsSet() can be called inside Interrupt Service
|
||||
* Routine. */
|
||||
osThreadFlagsSet(task_handle, handle);
|
||||
}
|
||||
}
|
|
@ -9,22 +9,15 @@
|
|||
#include "tfm_mailbox.h"
|
||||
#include "tfm_multi_core_api.h"
|
||||
#include "cmsis_os2.h"
|
||||
#include "mbed_rtos_storage.h"
|
||||
|
||||
#define MAX_SEMAPHORE_COUNT NUM_MAILBOX_QUEUE_SLOT
|
||||
|
||||
static void *ns_lock_handle = NULL;
|
||||
static mbed_rtos_storage_semaphore_t tfm_ns_sema_obj;
|
||||
static osSemaphoreId_t ns_lock_handle = NULL;
|
||||
|
||||
__attribute__((weak))
|
||||
enum tfm_status_e tfm_ns_interface_init(void)
|
||||
{
|
||||
osSemaphoreAttr_t sema_attrib = {
|
||||
.name = "tfm_ns_lock",
|
||||
.attr_bits = 0,
|
||||
.cb_size = sizeof(tfm_ns_sema_obj),
|
||||
.cb_mem = &tfm_ns_sema_obj
|
||||
};
|
||||
osSemaphoreAttr_t sema_attrib = {0};
|
||||
|
||||
ns_lock_handle = osSemaphoreNew(MAX_SEMAPHORE_COUNT,
|
||||
MAX_SEMAPHORE_COUNT,
|
|
@ -19,10 +19,10 @@
|
|||
#define IPC_PSA_CLIENT_CALL_IPC_INTR cpuss_interrupts_ipc_6_IRQn
|
||||
|
||||
#define IPC_PSA_CLIENT_REPLY_CHAN (9)
|
||||
#define IPC_PSA_CLIENT_REPLY_INTR_STRUCT (8)
|
||||
#define IPC_PSA_CLIENT_REPLY_INTR_STRUCT (5)
|
||||
#define IPC_PSA_CLIENT_REPLY_INTR_MASK (1 << IPC_PSA_CLIENT_REPLY_CHAN)
|
||||
#define IPC_PSA_CLIENT_REPLY_NOTIFY_MASK (1 << IPC_PSA_CLIENT_REPLY_INTR_STRUCT)
|
||||
#define IPC_PSA_CLIENT_REPLY_IPC_INTR cpuss_interrupts_ipc_8_IRQn
|
||||
#define IPC_PSA_CLIENT_REPLY_IPC_INTR cpuss_interrupts_ipc_5_IRQn
|
||||
|
||||
#define IPC_RX_RELEASE_MASK (0)
|
||||
|
|
@ -84,7 +84,6 @@ bool tfm_ns_mailbox_is_msg_replied(mailbox_msg_handle_t handle);
|
|||
*/
|
||||
int32_t tfm_ns_mailbox_init(struct ns_mailbox_queue_t *queue);
|
||||
|
||||
#ifdef TFM_MULTI_CORE_MULTI_CLIENT_CALL
|
||||
/**
|
||||
* \brief Get the handle of the current non-secure task executing mailbox
|
||||
* functionalities
|
||||
|
@ -97,12 +96,6 @@ int32_t tfm_ns_mailbox_init(struct ns_mailbox_queue_t *queue);
|
|||
* \return Return the handle of task.
|
||||
*/
|
||||
const void *tfm_ns_mailbox_get_task_handle(void);
|
||||
#else
|
||||
static inline const void *tfm_ns_mailbox_get_task_handle(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Fetch the handle to the first replied mailbox message in the NSPE
|
|
@ -135,6 +135,7 @@
|
|||
],
|
||||
"extra_labels": [
|
||||
"TFM",
|
||||
"TFM_V1_1",
|
||||
"TFM_V8M"
|
||||
],
|
||||
"device_has": [
|
||||
|
|
Loading…
Reference in New Issue