Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About TEEC_InitializeContext 64bit issue in Tee_kernel_api.c #49

Open
cloudnew opened this issue May 10, 2016 · 3 comments
Open

About TEEC_InitializeContext 64bit issue in Tee_kernel_api.c #49

cloudnew opened this issue May 10, 2016 · 3 comments

Comments

@cloudnew
Copy link

Dear Pascal :
TEEC_Result TEEC_InitializeContext(const char name, TEEC_Context *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
Copy link
Contributor

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
Copy link
Author

cloudnew commented May 10, 2016

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants