diff options
author | Sumit Garg <sumit.garg@linaro.org> | 2019-01-29 11:19:37 +0530 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2019-02-01 15:12:46 +0100 |
commit | c3fa24af92445c419c19df5981ab4e41a3ae3361 (patch) | |
tree | d868485cdd06f68fffdc9d33450dd6a19878ed0e /drivers/tee/optee/optee_private.h | |
parent | 0fc1db9d105915021260eb241661b8e96f5c0f1a (diff) | |
download | linux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.tar.gz linux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.tar.bz2 linux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.zip |
tee: optee: add TEE bus device enumeration support
OP-TEE provides a pseudo TA to enumerate TAs which can act as devices/
services for TEE bus. So implement device enumeration using invoke
function: PTA_CMD_GET_DEVICES provided by pseudo TA to fetch array of
device UUIDs. Also register these enumerated devices with TEE bus as
"optee-clntX" device.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
[jw: fix optee_enumerate_devices() with no devices found]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee/optee/optee_private.h')
-rw-r--r-- | drivers/tee/optee/optee_private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h index 35e79386c556..a5e84afd5013 100644 --- a/drivers/tee/optee/optee_private.h +++ b/drivers/tee/optee/optee_private.h @@ -28,6 +28,7 @@ #define TEEC_ERROR_BAD_PARAMETERS 0xFFFF0006 #define TEEC_ERROR_COMMUNICATION 0xFFFF000E #define TEEC_ERROR_OUT_OF_MEMORY 0xFFFF000C +#define TEEC_ERROR_SHORT_BUFFER 0xFFFF0010 #define TEEC_ORIGIN_COMMS 0x00000002 @@ -181,6 +182,8 @@ void optee_free_pages_list(void *array, size_t num_entries); void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages, size_t page_offset); +int optee_enumerate_devices(void); + /* * Small helpers */ |