Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 1 | /* |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame^] | 2 | * Copyright (c) 2017-2018, Arm Limited. All rights reserved. |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | #ifndef __TFM_NS_LOCK_H__ |
| 8 | #define __TFM_NS_LOCK_H__ |
| 9 | |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | #include <stdint.h> |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame^] | 15 | |
| 16 | typedef int32_t (*veneer_fn) (uint32_t arg0, uint32_t arg1, |
| 17 | uint32_t arg2, uint32_t arg3); |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 18 | |
| 19 | /** |
| 20 | * \brief NS world, NS lock based dispatcher |
| 21 | * |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame^] | 22 | * \details To be called from the wrapper API interface |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 23 | */ |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame^] | 24 | |
| 25 | uint32_t tfm_ns_lock_dispatch(veneer_fn fn, |
| 26 | uint32_t arg0, uint32_t arg1, |
| 27 | uint32_t arg2, uint32_t arg3); |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * \brief NS world, Init NS lock |
| 31 | * |
| 32 | * \details Needs to be called during non-secure app init |
| 33 | * to initialize the TFM NS lock object |
| 34 | */ |
| 35 | uint32_t tfm_ns_lock_init(); |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } |
| 39 | #endif |
| 40 | |
| 41 | #endif /* __TFM_NS_LOCK_H__ */ |