#include <linux/errno.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/tee_core.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/uaccess.h>
#include <linux/firmware.h>
#include "amdtee_private.h"
#include <linux/psp-tee.h>
static struct amdtee_driver_data *drv_data;
static DEFINE_MUTEX(session_list_mutex);
static void amdtee_get_version(struct tee_device *teedev,
struct tee_ioctl_version_data *vers)
{ … }
static int amdtee_open(struct tee_context *ctx)
{ … }
static void release_session(struct amdtee_session *sess)
{ … }
static void amdtee_release(struct tee_context *ctx)
{ … }
static struct amdtee_session *alloc_session(struct amdtee_context_data *ctxdata,
u32 session)
{ … }
static struct amdtee_session *find_session(struct amdtee_context_data *ctxdata,
u32 session)
{ … }
u32 get_buffer_id(struct tee_shm *shm)
{ … }
static DEFINE_MUTEX(drv_mutex);
static int copy_ta_binary(struct tee_context *ctx, void *ptr, void **ta,
size_t *ta_size)
{ … }
static void destroy_session(struct kref *ref)
{ … }
int amdtee_open_session(struct tee_context *ctx,
struct tee_ioctl_open_session_arg *arg,
struct tee_param *param)
{ … }
int amdtee_close_session(struct tee_context *ctx, u32 session)
{ … }
int amdtee_map_shmem(struct tee_shm *shm)
{ … }
void amdtee_unmap_shmem(struct tee_shm *shm)
{ … }
int amdtee_invoke_func(struct tee_context *ctx,
struct tee_ioctl_invoke_arg *arg,
struct tee_param *param)
{ … }
int amdtee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
{ … }
static const struct tee_driver_ops amdtee_ops = …;
static const struct tee_desc amdtee_desc = …;
static int __init amdtee_driver_init(void)
{ … }
module_init(…) …;
static void __exit amdtee_driver_exit(void)
{ … }
module_exit(amdtee_driver_exit);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…) …;
MODULE_LICENSE(…) …;