optee_smc_do_call_with_arg(9)
π optee_smc_do_call_with_arg β NAME energy β¨
Okay bestie, welcome to optee_smc_do_call_with_arg(9), straight out of the Kernel API Manual π
this one's the whole vibe: Do an SMC to OP-TEE in secure world. Like, it literally goes and knocks on secure world's door for you. Iconic behavior honestly π«Ά
β¨ SYNOPSIS β¨
int optee_smc_do_call_with_arg (struct tee_context *ctx , struct tee_shm
*shm , u_int offs , bool system_thread );
Yeah she takes four args. Don't panic, we're gonna go through every single one π
πΈ ARGUMENTS πΈ
ctxβ the calling context, aka who's calling, aka the main character of this call π«Άshmβ the shared memory holding the message you're passing to secure world. This is the little envelope πoffsβ the offset of the message inshm. Not the whole thing, just where it starts. Precision queen β¨system_threadβtrueif the caller requests TEE system thread support. So if you're like "yes bestie I want that", you set it totrueπ₯
π DESCRIPTION π
So what actually happens? This function does an SMC to OP-TEE in secure world, and it also handles any eventual resulting Remote Procedure Calls (RPC) coming back from OP-TEE. Like, it makes the call AND deals with the callback chaos that follows. Multitasking icon π
It returns the return code from secure world, and heads up: 0 is OK β
ngl that's the number you wanna see. Anything else? Vibe check failed, bestie π
π¦ SEE ALSO π¦
Kernel file ./drivers/tee/optee/smc_abi.c β go read her, she's the source of truth π and also these absolute legends:
optee_from_msg_param(9)optee_to_msg_param(9)optee_enable_shm_cache(9)__optee_disable_shm_cache(9)optee_disable_shm_cache(9)optee_disable_unmapped_shm_cache(9)optee_fill_pages_list(9)optee_shm_pool_alloc_pages(9)optee_handle_rpc(9)
That's the whole squad, no cap ππ
π tiny heads up: this page lives in ./drivers/tee/optee and it's dated October 2026 β yes, the future, we're ahead of schedule and thriving π§
Anyway, that's the page, bestie. Go forth and SMC responsibly. Slay π β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms