Interface: Move tfm_ns_interface_dispatch() to TF-M repo

This patch moves implementation of tfm_ns_interface_dispatch to TF-M
repo. This is needed to simplify TF-M integration with NS application.
For more details refer to
"Default implementation of tfm_ns_interface_dispatch()" mailing thread:
https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.org/message/ZCBRUODVTBK26JGAZKKIJEQ62D3XIMSO/
and TF-M tech forum presentation
"Default implemeation of tsm_ns_interface_dispatch":
https://www.trustedfirmware.org/meetings/tf-m-technical-forum/

Following things are done:
 * tfm_ns_interface.c was moved from test repo to TF-M repo
   tfm_ns_interface_rtos.c file
 * required NS OS wrapper header files are moved from test to TFM repo
 * updated Cmake files and include paths to be aligned with new committed
   structure

Signed-off-by: Bohdan Hunko <Bohdan.Hunko@infineon.com>
Signed-off-by: Chris Brand <chris.brand@cypress.com>
Change-Id: I95e82bfe3ff8b485b4017c519e998620f7bcbeb2
diff --git a/ns_interface/os_wrapper/common.h b/ns_interface/os_wrapper/common.h
deleted file mode 100644
index 6494723..0000000
--- a/ns_interface/os_wrapper/common.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __OS_WRAPPER_COMMON_H__
-#define __OS_WRAPPER_COMMON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#define OS_WRAPPER_SUCCESS            (0x0)
-#define OS_WRAPPER_ERROR              (0xFFFFFFFFU)
-#define OS_WRAPPER_WAIT_FOREVER       (0xFFFFFFFFU)
-#define OS_WRAPPER_DEFAULT_STACK_SIZE (-1)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OS_WRAPPER_COMMON_H__ */
diff --git a/ns_interface/os_wrapper/delay.h b/ns_interface/os_wrapper/delay.h
index 4242b81..7e73459 100644
--- a/ns_interface/os_wrapper/delay.h
+++ b/ns_interface/os_wrapper/delay.h
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2022, 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
  *
@@ -12,7 +14,7 @@
 extern "C" {
 #endif
 
-#include "common.h"
+#include "os_wrapper/common.h"
 
 /**
  * \brief Waits for a time period specified in kernel ticks.
diff --git a/ns_interface/os_wrapper/msg_queue.h b/ns_interface/os_wrapper/msg_queue.h
index ac69773..4c9e362 100644
--- a/ns_interface/os_wrapper/msg_queue.h
+++ b/ns_interface/os_wrapper/msg_queue.h
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2020-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
  *
@@ -14,7 +16,7 @@
 
 #include <stddef.h>
 
-#include "common.h"
+#include "os_wrapper/common.h"
 
 /**
  * \brief Create and initialize a message queue
diff --git a/ns_interface/os_wrapper/mutex.h b/ns_interface/os_wrapper/mutex.h
deleted file mode 100644
index e55ef70..0000000
--- a/ns_interface/os_wrapper/mutex.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __OS_WRAPPER_MUTEX_H__
-#define __OS_WRAPPER_MUTEX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "common.h"
-
-/**
- * \brief Creates a mutex for mutual exclusion of resources
- *
- * \return The handle of the created mutex on success or NULL on error
- */
-void *os_wrapper_mutex_create(void);
-
-/**
- * \brief Acquires a mutex that is created by \ref os_wrapper_mutex_create()
- *
- * \param[in] handle   The handle of the mutex to acquire. Should be one of the
- *                     handles returned by \ref os_wrapper_mutex_create()
- * \param[in] timeout  The maximum amount of time(in tick periods) for the
- *                     thread to wait for the mutex to be available.
- *                     If timeout is zero, the function will return immediately.
- *                     Setting timeout to \ref OS_WRAPPER_WAIT_FOREVER will
- *                     cause the thread to wait indefinitely
- *
- * \return \ref OS_WRAPPER_SUCCESS on success or \ref OS_WRAPPER_ERROR on error
- */
-uint32_t os_wrapper_mutex_acquire(void *handle, uint32_t timeout);
-
-/**
- * \brief Releases the mutex acquired previously
- *
-
- * \param[in] handle The handle of the mutex that has been acquired
- *
- * \return \ref OS_WRAPPER_SUCCESS on success or \ref OS_WRAPPER_ERROR on error
- */
-uint32_t os_wrapper_mutex_release(void *handle);
-
-/**
- * \brief Deletes a mutex that is created by \ref os_wrapper_mutex_create()
- *
- * \param[in] handle The handle of the mutex to be deleted
- *
- * \return \ref OS_WRAPPER_SUCCESS on success or \ref OS_WRAPPER_ERROR on error
- */
-uint32_t os_wrapper_mutex_delete(void *handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OS_WRAPPER_MUTEX_H__ */
diff --git a/ns_interface/os_wrapper/semaphore.h b/ns_interface/os_wrapper/semaphore.h
index 83d88ca..ce5aa04 100644
--- a/ns_interface/os_wrapper/semaphore.h
+++ b/ns_interface/os_wrapper/semaphore.h
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2017-2020, 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
  *
@@ -12,7 +14,7 @@
 extern "C" {
 #endif
 
-#include "common.h"
+#include "os_wrapper/common.h"
 
 /**
  * \brief Creates a new semaphore
diff --git a/ns_interface/os_wrapper/thread.h b/ns_interface/os_wrapper/thread.h
index a493593..83633a6 100644
--- a/ns_interface/os_wrapper/thread.h
+++ b/ns_interface/os_wrapper/thread.h
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2017-2020, 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
  *
@@ -12,7 +14,7 @@
 extern "C" {
 #endif
 
-#include "common.h"
+#include "os_wrapper/common.h"
 
 /* prototype for the thread entry function */
 typedef void (*os_wrapper_thread_func) (void *argument);
diff --git a/ns_interface/os_wrapper/tick.h b/ns_interface/os_wrapper/tick.h
index b377b0e..de7d2f5 100644
--- a/ns_interface/os_wrapper/tick.h
+++ b/ns_interface/os_wrapper/tick.h
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2020, 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
  *
@@ -12,7 +14,7 @@
 extern "C" {
 #endif
 
-#include "common.h"
+#include "os_wrapper/common.h"
 
 /**
  * \brief Return RTOS current tick count