STRUCT OPTEE_OPS(9)
π NAME π
struct optee_ops β the OP-TEE driver's own little internal operations squad, bestie
So this is a kernel API manual page for struct optee_ops(9), and like⦠it's a struct full of function pointers. Iconic behavior honestly.
β¨ SYNOPSIS β¨
struct optee_ops {
int (*do_call_with_arg)(struct tee_context *ctx, struct tee_shm *shm_arg, u_int offs, bool system_thread);
int (*to_msg_param)(struct optee *optee, struct optee_msg_param *msg_params, size_t num_params, const struct tee_param *params);
int (*from_msg_param)(struct optee *optee, struct tee_param *params, size_t num_params, const struct optee_msg_param *msg_params);
int (*lend_protmem)(struct optee *optee, struct tee_shm *protmem, u32 *mem_attr, unsigned int ma_count, u32 use_case);
int (*reclaim_protmem)(struct optee *optee, struct tee_shm *protmem);
};
π Members π
do_call_with_argβ this one literally enters OP-TEE in secure world. main character energy fr, it's the whole point of the struct π«Άto_msg_paramβ converts fromstruct tee_paramto OPTEE_MSG parameters. a lil translator bestie β¨from_msg_paramβ converts from OPTEE_MSG parameters tostruct tee_param. the reverse trip, we love a round trip πΈlend_protmemβ lends physically contiguous memory as restricted memory, meaning it's inaccessible by the kernel. like handing someone your diary and then genuinely not being able to read it anymore πreclaim_protmemβ reclaims that restricted memory previously lent withlend_protmemand makes it accessible by the kernel again. your diary is BACK π
π¦ Description π¦
Okay so listen π β these OPs are only supposed to be used internally in the OP-TEE driver. Not for you, not for your friend, not for that one out-of-tree module you're cooking up. Internally only, periodt.
The whole vibe is that they abstract the different methods of entering OP-TEE in secure world. Different ways in, one tidy interface to rule them all π
ngl, "internal only" is doing a LOT of heavy lifting in that sentence, so pls respect it π
π SEE ALSO π
- Kernel file
./drivers/tee/optee/optee_private.h struct optee_call_waiter(9)struct optee_call_queue(9)struct optee_supp(9)struct optee_pcpu(9)struct optee_smc(9)struct optee_ffa(9)struct optee_revision(9)struct optee(9)
okay that's the whole page, you ate that bestie π
β¨ this one lives in ./drivers/tee/optee, dated October 2026, and it's filed under struct optee_ops(9) β go be fabulous with your function pointers ππ«Ά
π¦ 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