STRUCT OPTEE_MSG_ARG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct optee_msg_arg β€” call argument ✨

okay so bestie, welcome to the struct optee_msg_arg(9) page from the Kernel API Manual β€” yes we're in kernel land today and honestly? it's giving main character energy 🫢 this one's short and sweet, so let's go πŸ’…


🌸 NAME 🌸

struct optee_msg_arg β€” literally the call argument. that's it. that's the vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct optee_msg_arg {
    u32 cmd;
    u32 func;
    u32 session;
    u32 cancel_id;
    u32 pad;
    u32 ret;
    u32 ret_origin;
    u32 num_params;
    struct optee_msg_param params[];
};

look at her. flawless. no notes. πŸ”₯


πŸ’– Members πŸ’–

  • cmd β€” the command, bestie. it's one of OPTEE_MSG_CMD_* or OPTEE_MSG_RPC_CMD_* ✨
  • func β€” the Trusted Application function, and it's specific to the Trusted Application, iykyk. only used when cmd == OPTEE_MSG_CMD_INVOKE_COMMAND πŸ‘‘
  • session β€” lowkey the plot twist of this struct: it's an in parameter for all OPTEE_MSG_CMD_*… except for OPTEE_MSG_CMD_OPEN_SESSION, where it's an output parameter instead πŸ™ˆ
  • cancel_id β€” the cancellation id, a unique value that identifies this request 🎯
  • pad β€” padding for alignment. she's just here for the vibes, keeping things lined up πŸ’…
  • ret β€” return value πŸ“
  • ret_origin β€” the origin of the return value πŸ‘€
  • num_params β€” number of parameters supplied to the OS Command ⭐
  • params β€” the actual parameters supplied to the OS Command, a whole array of them 🌈

πŸ’€ Description πŸ’€

okay so real talk: all normal calls to Trusted OS use this struct, fr fr. periodt. 🧚

if cmd needs more info than what these fields can hold, you can pass it as a parameter tagged as meta β€” that's you setting the OPTEE_MSG_ATTR_META bit in the corresponding attrs field πŸ”₯

⚠️ but heads up bestie: all parameters tagged as meta have to come first. no cap. that's the rule and we respect her πŸ’–

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./drivers/tee/optee/optee_msg.h struct
  • optee_msg_param_tmem(9)
  • struct optee_msg_param_rmem(9)
  • struct optee_msg_param_fmem(9)
  • struct optee_msg_param_value(9)
  • struct optee_msg_param(9)
  • OPTEE_MSG_GET_ARG_SIZE(9)

and that's the page, gorgeous πŸ’… huge shoutout to ./drivers/tee/optee for hosting this icon, October 2026 for the date stamp, all under the Kernel API Manual banner 🌸 now go forth and slay your TEE calls, bestie β€” you got this 🫢✨

πŸ“¦ where this page comes from