hc
2023-11-20 3c9370f7b6bffd697c9907a7139e9df5b0d4b9df
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
/*
 * Copyright (c) 2014, STMicroelectronics International N.V.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 */
#ifndef __TEE_SHM_H__
#define __TEE_SHM_H__
 
#include <linux/tee_client_api.h>
struct tee_context;
struct tee_shm;
struct tee_shm_io;
struct tee;
 
int tee_shm_alloc_io(struct tee_context *ctx, struct tee_shm_io *shm_io);
void tee_shm_free_io(struct tee_shm *shm);
 
int tee_shm_fd_for_rpc(struct tee_context *ctx, struct tee_shm_io *shm_io);
 
struct tee_shm *rk_tee_shm_alloc(struct tee *tee, size_t size, uint32_t flags);
void rk_tee_shm_free(struct tee_shm *shm);
 
struct tee_shm *tee_shm_get(struct tee_context *ctx, TEEC_SharedMemory *c_shm,
       size_t size, int offset);
void rk_tee_shm_put(struct tee_context *ctx, struct tee_shm *shm);
 
#endif /* __TEE_SHM_H__ */