Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 1 | /* |
Hugues de Valon | 3254760 | 2019-02-19 14:46:56 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2019, 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> |
Oren Cohen | 08596fb | 2019-04-28 14:25:15 +0300 | [diff] [blame^] | 15 | #include "tfm_api.h" |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame] | 16 | |
| 17 | typedef int32_t (*veneer_fn) (uint32_t arg0, uint32_t arg1, |
| 18 | uint32_t arg2, uint32_t arg3); |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 19 | |
| 20 | /** |
| 21 | * \brief NS world, NS lock based dispatcher |
| 22 | * |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame] | 23 | * \details To be called from the wrapper API interface |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 24 | */ |
Mate Toth-Pal | 1379e15 | 2018-07-30 17:38:29 +0200 | [diff] [blame] | 25 | |
| 26 | uint32_t tfm_ns_lock_dispatch(veneer_fn fn, |
| 27 | uint32_t arg0, uint32_t arg1, |
| 28 | uint32_t arg2, uint32_t arg3); |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * \brief NS world, Init NS lock |
| 32 | * |
| 33 | * \details Needs to be called during non-secure app init |
| 34 | * to initialize the TFM NS lock object |
| 35 | */ |
Hugues de Valon | 3254760 | 2019-02-19 14:46:56 +0000 | [diff] [blame] | 36 | enum tfm_status_e tfm_ns_lock_init(); |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 37 | |
| 38 | #ifdef __cplusplus |
| 39 | } |
| 40 | #endif |
| 41 | |
| 42 | #endif /* __TFM_NS_LOCK_H__ */ |