forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modules: trusted-firmware-m: initialize the TF-M NS interface
The TF-M NS interface needs to be initialized before it is used. We add an initialization function that calls tfm_ns_interface_init(), at boot time, so then we can use TF-M interface calls (veneers). Signed-off-by: Ioannis Glaropoulos <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <device.h> | ||
#include <init.h> | ||
#include <kernel.h> | ||
|
||
#include <tfm_ns_interface.h> | ||
|
||
#if defined(TFM_PSA_API) | ||
#include "psa_manifest/sid.h" | ||
#endif /* TFM_PSA_API */ | ||
|
||
static int ns_interface_init(const struct device *arg) | ||
{ | ||
ARG_UNUSED(arg); | ||
|
||
(void)tfm_ns_interface_init(); | ||
|
||
return 0; | ||
} | ||
|
||
/* Initialize the TFM NS interface */ | ||
SYS_INIT(ns_interface_init, POST_KERNEL, | ||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); |