Closed ChoKyuWon closed 3 years ago
Hi, generally speaking, the SDK should be compatible with (at least) some external crates, and our serde example is using the external crate serde
. Please refer to the example to double-check you are using the extra crate correctly.
Also, by taking a quick look at your log, your TA is getting the error 0xffff0008
, which is the item not found
error. Though I'm not 100% sure, it looks like the TA is not compiled correctly, so probably you can go over your logs again to see what's happening when building the TA.
First, I look around serde
example code, but some linker script make confusing me.
There's some extra work other than add packagename=VERSION
on Cargo.toml
?
Second, I think item not found
is just for lookup walking. When I try to run normal TA, It also poped up, so it;s not main cause of error.
Here is message when I run optee_example_hello_world: There's also 0xffff0008
exist.
D/TC:? 0 tee_ta_init_pseudo_ta_session:299 Lookup pseudo TA 8aaaf200-2450-11e4-abe2-0002a5d5c51b
D/TC:? 0 ldelf_load_ldelf:91 ldelf load address 0x104000
D/LD: ldelf:134 Loading TA 8aaaf200-2450-11e4-abe2-0002a5d5c51b
D/TC:? 0 ldelf_syscall_open_bin:140 Lookup user TA ELF 8aaaf200-2450-11e4-abe2-0002a5d5c51b (Secure Storage TA)
D/TC:? 0 ldelf_syscall_open_bin:144 res=0xffff0008
D/TC:? 0 ldelf_syscall_open_bin:140 Lookup user TA ELF 8aaaf200-2450-11e4-abe2-0002a5d5c51b (REE)
D/TC:? 0 ldelf_syscall_open_bin:144 res=0
D/LD: ldelf:168 ELF (8aaaf200-2450-11e4-abe2-0002a5d5c51b) at 0x11a000
D/TA: TA_CreateEntryPoint:39 has been called
D/TA: TA_OpenSessionEntryPoint:68 has been called
I/TA: Hello World!
D/TA: inc_value:105 has been called
I/TA: Got value: 42 from NW
I/TA: Increase value to: 43
D/TC:? 0 tee_ta_close_session:514 csess 0xb90916b0 id 1
D/TC:? 0 tee_ta_close_session:533 Destroy session
I/TA: Goodbye!
D/TA: TA_DestroyEntryPoint:50 has been called
D/TC:? 0 destroy_context:310 Destroy TA ctx (0xb9091670)
Thanks for your help.
Hi @ChoKyuWon
It seems that ldelf panic
occurs.ldelf
is a user mode ELF loader in OPTEE OS(reference here).
ldelf
panic when running on newer OPTEE OS(such as OPTEE 3.11.0).Maybe you could try the latest sdk version.ldelf
using GDB may help(reference here and here).Best Regards, Yuan
@DemesneGH Thanks! upgrade SDK is the perfect solution for me.
Hi! I make a little project with this rust-optee-trustzone-sdk. But when I try to use extern crate like
crypto
orrand
in TA, I can build the host and TA but it panic with generic errno, 0xffff0000.How can I use extern crate in this sdk? I know dynamic link is not allowed in TA, so I can't use other crate than optee_utee?
Error message in normal world is like this:
Error: Non-specific cause. (error code 0xffff0000)
and message in secure world is like this: