STRUCT OPTEE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 from struct tee_param to OPTEE_MSG parameters. a lil translator bestie ✨
  • from_msg_param β€” converts from OPTEE_MSG parameters to struct 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 with lend_protmem and 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