STRUCT OPTEE_MSG_PARAM_TMEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct optee_msg_param_tmem β€” the temporary memory reference parameter, bestie

Okay so this is a page from the Kernel API Manual, and it's literally just here to introduce you to one little struct: struct optee_msg_param_tmem. She's the temporary memory ref param and she's iconic ✨


🌸 NAME 🌸

struct optee_msg_param_tmem β€” temporary memory reference parameter πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

struct optee_msg_param_tmem {
    u64 buf_ptr;
    u64 size;
    u64 shm_ref;
 };

That's the whole glow-up. Three u64s and a dream πŸ¦‹


✨ Members ✨

  • buf_ptr β€” the address of the buffer. Like, where the actual buffer lives πŸ“
  • size β€” the size of the buffer. The how-much, basically πŸ“
  • shm_ref β€” temporary shared memory reference, and it's a pointer to a struct tee_shm. Yep, pointer-inception, we love to see it πŸ”—

πŸ’… Description πŸ’…

So here's the tea, bestie: the secure world and the normal world pass pointers around as physical addresses, not virtual addresses. Why? Because these two worlds have completely independent memory mapping β€” like two separate group chats that don't share a single message. No cap 😭

And it gets more real β€” the normal world can even have a hypervisor sitting in the middle. The hypervisor needs to translate the guest physical address (AKA IPA in ARM documentation, iykyk) into a real physical address before it passes the structure over to the secure world. So yeah, there's a whole translation era going on before anything reaches the other side πŸ”₯

It's giving "addresses are physical on purpose" and honestly the way this design just works? Obsessed 🫢

🌈 SEE ALSO 🌈

Kernel file ./drivers/tee/optee/optee_msg.h struct optee_msg_param_rmem(9), struct optee_msg_param_fmem(9), struct optee_msg_param_value(9), struct optee_msg_param(9), struct optee_msg_arg(9), OPTEE_MSG_GET_ARG_SIZE(9) β€” go read the whole friend group, they all slay together ⭐


And that's the page! πŸŽ‰ Sourced from ./drivers/tee/optee, dated October 2026, and titled struct optee_msg_param_tmem(9) β€” mwah, go forth and reference your temporary memory correctly, bestie πŸ’œπŸ§š

πŸ“¦ where this page comes from