1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2018-2019, Linaro Limited 4 * Copyright (c) 2020, Arm Limited 5 */ 6 7 #include <kernel/handle.h> 8 #include <kernel/ts_store.h> 9 #include <kernel/user_mode_ctx_struct.h> 10 #include <tee_api_defines.h> 11 #include <tee_api_types.h> 12 #include <types_ext.h> 13 14 #ifndef KERNEL_LDELF_SYSCALLS_H 15 #define KERNEL_LDELF_SYSCALLS_H 16 17 struct system_ctx { 18 struct handle_db db; 19 const struct ts_store_ops *store_op; 20 }; 21 22 void ta_bin_close(void *ptr); 23 TEE_Result ldelf_open_ta_binary(struct system_ctx *ctx, uint32_t param_types, 24 TEE_Param params[TEE_NUM_PARAMS]); 25 TEE_Result ldelf_close_ta_binary(struct system_ctx *ctx, uint32_t param_types, 26 TEE_Param params[TEE_NUM_PARAMS]); 27 TEE_Result ldelf_map_ta_binary(struct system_ctx *ctx, 28 struct user_mode_ctx *uctx, 29 uint32_t param_types, 30 TEE_Param params[TEE_NUM_PARAMS]); 31 TEE_Result ldelf_copy_from_ta_binary(struct system_ctx *ctx, 32 uint32_t param_types, 33 TEE_Param params[TEE_NUM_PARAMS]); 34 TEE_Result ldelf_set_prot(struct user_mode_ctx *uctx, uint32_t param_types, 35 TEE_Param params[TEE_NUM_PARAMS]); 36 TEE_Result ldelf_remap(struct user_mode_ctx *uctx, uint32_t param_types, 37 TEE_Param params[TEE_NUM_PARAMS]); 38 39 #endif /* KERNEL_LDELF_SYSCALLS_H */ 40