summaryrefslogtreecommitdiff
path: root/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper
diff options
context:
space:
mode:
authorMichal Hanus <mikehanus@protonmail.com>2025-04-19 22:50:44 +0200
committerMichal Hanus <mikehanus@protonmail.com>2025-04-19 22:50:44 +0200
commit9078b7ec09b135f091cb951ed234bf013c9c838e (patch)
treeba953e144c2dd42d327a83720cdfc9fb5bb9fe34 /nrfdemo/build/tfm/api_ns/interface/src/os_wrapper
parent2e13c372f1419f08dab7797b244681f889dd9bcf (diff)
bme680 added
Diffstat (limited to 'nrfdemo/build/tfm/api_ns/interface/src/os_wrapper')
-rw-r--r--nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_bare_metal.c23
-rw-r--r--nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_rtos.c56
2 files changed, 0 insertions, 79 deletions
diff --git a/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_bare_metal.c b/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_bare_metal.c
deleted file mode 100644
index 01da8b8..0000000
--- a/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_bare_metal.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company)
- * or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-/* This file provides implementation of TF-M NS os wrapper functions for the
- * bare metal use case.
- *
- * \note This implementation does not provide multithread safety, so it
- * shouldn't be used in RTOS environment.
- */
-
-#include "tfm_ns_interface.h"
-
-int32_t tfm_ns_interface_dispatch(veneer_fn fn,
- uint32_t arg0, uint32_t arg1,
- uint32_t arg2, uint32_t arg3)
-{
- return fn(arg0, arg1, arg2, arg3);
-}
diff --git a/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_rtos.c b/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_rtos.c
deleted file mode 100644
index a1f7727..0000000
--- a/nrfdemo/build/tfm/api_ns/interface/src/os_wrapper/tfm_ns_interface_rtos.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
- * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company)
- * or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-/* This file provides implementation of TF-M NS os wrapper functions for the
- * RTOS use case. This implementation provides multithread safety, so it
- * can be used in RTOS environment.
- */
-
-#include <stdint.h>
-
-#include "os_wrapper/mutex.h"
-
-#include "tfm_ns_interface.h"
-
-/**
- * \brief the ns_lock ID
- */
-static void *ns_lock_handle = NULL;
-
-int32_t tfm_ns_interface_dispatch(veneer_fn fn,
- uint32_t arg0, uint32_t arg1,
- uint32_t arg2, uint32_t arg3)
-{
- int32_t result;
-
- /* TFM request protected by NS lock */
- while (os_wrapper_mutex_acquire(ns_lock_handle, OS_WRAPPER_WAIT_FOREVER)
- != OS_WRAPPER_SUCCESS) {
- }
-
- result = fn(arg0, arg1, arg2, arg3);
-
- while (os_wrapper_mutex_release(ns_lock_handle) != OS_WRAPPER_SUCCESS) {
- }
-
- return result;
-}
-
-uint32_t tfm_ns_interface_init(void)
-{
- void *handle;
-
- handle = os_wrapper_mutex_create();
- if (!handle) {
- return OS_WRAPPER_ERROR;
- }
-
- ns_lock_handle = handle;
- return OS_WRAPPER_SUCCESS;
-}