STRUCT OPTEE(9)
π struct optee(9) β the main service struct, bestie
okay so this is struct optee, from the Kernel API Manual, and it's basically the main character of the OP-TEE driver. it's giving "central hub energy" β everything that talks to secure world kind of routes through here. let's get into it π«Ά
β¨ SYNOPSIS β¨
like, here's literally the whole struct, character for character, no cap:
struct optee {
struct tee_device *supp_teedev;
struct tee_device *teedev;
const struct optee_ops *ops;
struct tee_context *ctx;
union {
struct optee_smc smc;
struct optee_ffa ffa;
};
struct optee_shm_arg_cache shm_arg_cache;
struct optee_call_queue call_queue;
struct optee_notif notif;
struct optee_supp supp;
struct tee_shm_pool *pool;
struct mutex rpmb_dev_mutex;
struct rpmb_dev *rpmb_dev;
struct notifier_block rpmb_intf;
unsigned int rpc_param_count;
bool scan_bus_done;
bool rpmb_scan_bus_done;
bool in_kernel_rpmb_routing;
struct work_struct scan_bus_work;
struct work_struct rpmb_scan_bus_work;
struct optee_revision revision;
};
π Members π
okay, member-by-member tour, let's go:
supp_teedevβ the supplicant device. it's the one that handles requests coming from secure world, iykyk πteedevβ the client device. this is the one the outside world talks to.opsβ internal callbacks, aka the different ways to reach secure world. like, different routes, same destination β¨ctxβ the driver's internal TEE context.{unnamed_union}β an anonymous union, living its anonymous little life. we don't name it, we just respect it π«Άsmcβ specific to SMC ABI. that's its whole personality.ffaβ specific to FF-A ABI. also just vibing in the union.shm_arg_cacheβ shared memory cache argument. caching queen πcall_queueβ the queue of threads waiting to callinvoke_fn. yes there's a line, please respect it πΈnotifβ notification synchronization struct.suppβ supplicant synchronization struct for RPC to supplicant. say that five times fast πpoolβ shared memory pool.rpmb_dev_mutexβ a mutex protectingrpmb_dev. bodyguard behavior, honestly π‘οΈrpmb_devβ the current RPMB device, orNULL. very much "sometimes here, sometimes not" πrpmb_intfβ the RPMB notifier block.rpc_param_countβ if it's> 0, the number of RPC parameters to make room for. zero means don't bother, bestie.scan_bus_doneβ a flag for whether device registation was already done. (yes, "registation" β that's exactly how the original spells it, preserving it fr fr π)rpmb_scan_bus_doneβ flag for whether device registation of RPMB dependent devices was already done. same spelling situation, same energy.scan_bus_workβ the workq to scan the optee bus and register optee drivers. busy little bee πrpmb_scan_bus_workβ workq to for an RPMB device and to scan optee bus and register RPMB dependent optee drivers. (again, verbatim from the source β "workq to for" is iconic and we're not touching it π)revisionβ the OP-TEE OS revision. the lore. the backstory. β
π SEE ALSO π
go check these out, they're all connected, it's giving cinematic universe:
- 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_ops(9)
lowkey important: this page is from./drivers/tee/optee, dated October 2026, and it'sstruct optee(9)β so if you ever need to cite it or find it again, that's your receipt π§Ύβ¨
k byeee, go read the header file, mwah ππ¦
π¦ 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