blob: fa0cc31746cf29c6801e8891faa846684da2b8c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* Copyright (c) 2017-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef __TFM_NS_INTERFACE_H__
#define __TFM_NS_INTERFACE_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "tfm_api.h"
typedef int32_t (*veneer_fn) (uint32_t arg0, uint32_t arg1,
uint32_t arg2, uint32_t arg3);
/**
* \brief NS interface, veneer function dispatcher
*
* \details This function implements the dispatching mechanism for the
* desired veneer function, to be called with the parameters
* described from arg0 to arg3.
*
* \note NSPE shall implement this dispatcher according to NS specific
* implementation and actual usage scenario.
*
* \param[in] fn Function pointer to the veneer function desired
* \param[in] arg0 Argument 0 of fn
* \param[in] arg1 Argument 1 of fn
* \param[in] arg2 Argument 2 of fn
* \param[in] arg3 Argument 3 of fn
*
* \return Returns the same return value of the requested veneer function
*
* \note This API must ensure the return value is from the veneer function.
* Other unrecoverable errors must be considered as fatal error and should
* not return.
*/
int32_t tfm_ns_interface_dispatch(veneer_fn fn,
uint32_t arg0, uint32_t arg1,
uint32_t arg2, uint32_t arg3);
#ifdef __cplusplus
}
#endif
#endif /* __TFM_NS_INTERFACE_H__ */
|