blob: d9acd00528662b8d722cc3efff4a3503ef3d9bc5 [file] [log] [blame]
Ashutosh Singhf4d88672017-11-29 13:35:43 +00001/*
Hugues de Valon32547602019-02-19 14:46:56 +00002 * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
Ashutosh Singhf4d88672017-11-29 13:35:43 +00003 *
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
11extern "C" {
12#endif
13
14#include <stdint.h>
Oren Cohen08596fb2019-04-28 14:25:15 +030015#include "tfm_api.h"
Mate Toth-Pal1379e152018-07-30 17:38:29 +020016
17typedef int32_t (*veneer_fn) (uint32_t arg0, uint32_t arg1,
18 uint32_t arg2, uint32_t arg3);
Ashutosh Singhf4d88672017-11-29 13:35:43 +000019
20/**
21 * \brief NS world, NS lock based dispatcher
22 *
Mate Toth-Pal1379e152018-07-30 17:38:29 +020023 * \details To be called from the wrapper API interface
Ashutosh Singhf4d88672017-11-29 13:35:43 +000024 */
Mate Toth-Pal1379e152018-07-30 17:38:29 +020025
26uint32_t tfm_ns_lock_dispatch(veneer_fn fn,
27 uint32_t arg0, uint32_t arg1,
28 uint32_t arg2, uint32_t arg3);
Ashutosh Singhf4d88672017-11-29 13:35:43 +000029
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 Valon32547602019-02-19 14:46:56 +000036enum tfm_status_e tfm_ns_lock_init();
Ashutosh Singhf4d88672017-11-29 13:35:43 +000037
38#ifdef __cplusplus
39}
40#endif
41
42#endif /* __TFM_NS_LOCK_H__ */