12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef TEE_PRIVATE_H
- #define TEE_PRIVATE_H
- #include <linux/cdev.h>
- #include <linux/completion.h>
- #include <linux/device.h>
- #include <linux/kref.h>
- #include <linux/mutex.h>
- #include <linux/types.h>
- struct tee_shm_pool {
- struct tee_shm_pool_mgr *private_mgr;
- struct tee_shm_pool_mgr *dma_buf_mgr;
- };
- #define TEE_DEVICE_FLAG_REGISTERED 0x1
- #define TEE_MAX_DEV_NAME_LEN 32
- struct tee_device {
- char name[TEE_MAX_DEV_NAME_LEN];
- const struct tee_desc *desc;
- int id;
- unsigned int flags;
- struct device dev;
- struct cdev cdev;
- size_t num_users;
- struct completion c_no_users;
- struct mutex mutex;
- struct idr idr;
- struct tee_shm_pool *pool;
- };
- int tee_shm_init(void);
- int tee_shm_get_fd(struct tee_shm *shm);
- bool tee_device_get(struct tee_device *teedev);
- void tee_device_put(struct tee_device *teedev);
- void teedev_ctx_get(struct tee_context *ctx);
- void teedev_ctx_put(struct tee_context *ctx);
- #endif
|