-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How do I call a static TA from my secure TA component? #967
Comments
The dynamic TA can communicate with the static TA using Internal Client APIs. Refer to Section 4.9 of GP's TEE Interal Core API Spec v1.1. |
Yes, got it. Thank you so much. |
@vchong , I am facing another issue now. I am trying to call this https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/sta/sta_self_tests.c static TA from my normal user level(normal world client) TA. When I call this function:
Error code I am getting is this one.
I searched for this file "d96a5b40-c3e5-21e3-87941002a5d5c61b.ta" in out directory, but I could find that file. Thanks in advance, |
So I ran the testcase Error I see at secure side is as following:
But at normal world it prints like following:
|
Try adding
|
@vchong , Apparently, it didn't work either. I am starting to wonder whether this is a bug. So I am working on OPTEE + AOSP. I added Then I ran xtest 1001. And I see following error. Can someone please try this in their Hikey+Android build too?
|
Is |
@vchong it's a "static" TA so it's not in the fileystem ;) Sorry no AOSP test for me, I'm using my own simplified initramfs build (https://github.com/jforissier/hikey_optee) which is very similar to the "repo" setup described in the OP-TEE documentation. And, I can confirm the static TA runs as expected on HiKey when enabled:
|
@jforissier Oops.. right, sorry, forgot about that. |
Yes, sta_self_tests.c is built. To test that I added few mistakes to this file and recompiled. Is there anything else I am missing. This time I added a new static TA (gpio_sta) too. That is all what is required, right? Each time I am recompiling everything from scratch and it is taking hours to compile this AOSP code. Is there anyway I can compile only optee_os in AOSP code base? Sorry, for spamming. I am bit stuck with this. Thanks a lot. |
If you just rerun $ adb remount
$ adb sync it should sync over just the files that changed, instead of having to reflash the entire system partition. |
@d3zd3z , I been flashing all the time after rebuilding the image. So I guess I just have to set the evn variable
But how about the jumpers? Should I link jumpers 1-2 and 3-4 when I do this "adb sync" ? |
No, 1-2 and 3-4 will put you in recovery mode, and you'll never boot to Android. Don't link 3-4. |
I rebuilt everything from scratch with following command:
I see sta_self_tests.c and my new static TA is getting compiled. However, I am stuck with the same error:
Any suggestions to fix this? For adding new static TA all I have to do is the following, right?
Is there anything else I have to do? Is there any other configuration file I have to take care of? I have no clue why is it not working for me. How do I debug this? :( |
Remember that the OS isn't built as part of the Android build system, so you have to build (and modify) that outside of the Android build, and ultimately bring it in by copying the So, adding a static TA will need to be done to the optee_os directory in the standalone build, and the use of it will need to be done within the android tree. You'll then want to do something like:
|
@d3zd3z , I am bit confused now. I see an optee_os folder inside the AOSP repo and I thought when I do But if I understand you correctly, I have to
My confusion is this, |
|
aah, that makes lot of sense now :) Let me test this now. |
I am now trying to check out the hikey build again. However, stuck with the following error:
I tried to check out this Hikey repo couple of times nows. Looks like "http://git.savannah.gnu.org/" is down. |
Yeah it's down for me, too :( |
yeah, it worked. Thank you :) |
Hi,
I am want to call the function "test_trace" which is defined in static TA https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/sta/sta_self_tests.c from my secure TA. I am confused how to do that? Any pointers? Thank you so much.
I tried to the following, but it didn't work. It threw me the error, "fatal error: tee_client_api.h: No such file or directory". I am not sure whether this is the way to invoke the static TA from secure TA.
Is there a different set of internal APIs to call a static TA from secure TA?
The text was updated successfully, but these errors were encountered: