TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_multi_core.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 #include "psa/client.h"
8 #include "tfm_assert.h"
9 #include "tfm_nspm.h"
10 #include "tfm_spe_mailbox.h"
11 #include "tfm_spm_hal.h"
12 #include "tfm_spm_log.h"
13 #include "utilities.h"
14 
15 #define DEFAULT_NS_CLIENT_ID (-1)
16 
18 {
19  return DEFAULT_NS_CLIENT_ID;
20 }
21 
23 {
24 #ifdef TFM_CORE_DEBUG
25  /* Boot up non-secure core */
26  SPMLOG_DBGMSG("Enabling non-secure core...");
27 #endif
28 
29  tfm_spm_hal_boot_ns_cpu(tfm_spm_hal_get_ns_VTOR());
30  tfm_spm_hal_wait_for_ns_cpu_ready();
31 
33 
34  /*
35  * TODO
36  * The infinite-loop can be replaced with low-power sleep and resume
37  * operation. It may require privileged access to platform specific
38  * hardware.
39  */
40  while (1) {
41  }
42 
43 
44  /* NOTREACHED */
45  TFM_ASSERT(false);
46 }
47 
48 void tfm_psa_ipc_request_handler(const uint32_t svc_args[])
49 {
50  (void)svc_args;
51 
52  /* Should not receive any request from ns-callable in multi-core topology */
54 }
int32_t tfm_nspm_get_current_client_id(void)
Get the client ID of the current NS client.
#define SPMLOG_DBGMSG(msg)
Definition: tfm_spm_log.h:42
#define TFM_ASSERT(cond)
Definition: tfm_assert.h:15
int32_t tfm_mailbox_init(void)
SPE mailbox initialization.
void tfm_core_panic(void)
Definition: utilities.c:11
#define DEFAULT_NS_CLIENT_ID
void tfm_psa_ipc_request_handler(const uint32_t svc_args[])
void tfm_nspm_thread_entry(void)