user_ta_enter()
- Call
thread_enter_user_mode()
to switch to U-mode.utc->utcx.entry_func
(user TA’s entry function address, filled byldelf
) will be called after switching to U-mode. - E.g. For
optee_example_hello_world
, i.e.8aaaf200-2450-11e4-abe2-0002a5d5c51b.elf
, theentry_func
is0x400405f8
=>__ta_entry().
__ta_entry()
is the first user TA API called from TEE core (defined inta/user_ta_header.c
).- It’s assigned in TA’s Makefile:
__ta_entry()
will call__utee_entry()
(defined inlib/libutee/user_ta_entry.c
) to invoke the function (e.g.TA_OpenSessionEntryPoint()
,TA_InvokeCommandEntryPoint()
… etc) defined by user TA based on function ID.- User TA is linked with
libutee
. - And the end,
__ta_entry()
will call__utee_return()
(defined inlib/libutee/user_ta_entry.c
), to return from user TA. __utee_return()
is actually a syscall, syscall ID:TEE_SCN_RETURN
. Therefore,tee_ta_session->ts_sess.handle_scall
, e.g.scall_handle_user_ta()
, will eventually be called.
user_ta_enter()c
Loading...