OP-TEE / optee_linuxdriver

Normal world linux driver **deprecated**
GNU General Public License v2.0
66 stars 73 forks source link

About TEEC_InitializeContext 64bit issue in Tee_kernel_api.c #49

Open cloudnew opened 8 years ago

cloudnew commented 8 years ago

Dear Pascal : TEEC_Result TEEC_InitializeContext(const char _name, TEECContext *context) { / TODO fixme will not work on 64-bit platform */ context->fd = (int)(uintptr_t)ctx; } May i ask about this problem , because when I use this function in 64 bit platform, kernel panic will happen , but i have no idea how to fix it . Can you give me more information about this ?

jenswi-linaro commented 8 years ago

With the 2.0 release of OP-TEE we've changed the Linux driver and the user space interface. Please upgrade and this issue will be gone.

cloudnew commented 8 years ago

Dear Jenswi : Thanks for your reply You mean just update tee-os 2.0 on Apr 4(Tag) , it will fix this problem ? because I use kernel tee driver ,TEEC_InitializeContext() which in kernel space (\linux-kernel\drivers\optee_linuxdriver) not in tee os file ,

/* TODO fixme will not work on 64-bit platform */
//context->fd = (int)(uintptr_t)ctx;
BUG_ON(ctx != (struct tee_context *)(uintptr_t)context->fd);

it still will BUG ON happen .

jenswi-linaro commented 8 years ago

We've deprecated the optee_linuxdriver git, instead we're using an in kernel tree driver which we're trying to upstream. This is our development branch https://github.com/linaro-swg/linux/tree/optee.

We have some branches for older kernels as well: https://git.linaro.org/kernel/linux-linaro-stable.git/shortlog/refs/heads/v3.18/topic/optee https://git.linaro.org/kernel/linux-linaro-stable.git/shortlog/refs/heads/v4.4/topic/optee

If you're pulling the patches into a kernel prior to v4.5 you'll need the arm-smccc patches you can see in the branches above.