tee_shm_alloc_dma_mem(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tee_shm_alloc_dma_mem πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for tee_shm_alloc_dma_mem(9) β€” yes that (9) means it's a kernel-internals thing, iykyk ✨


🌸 NAME 🌸

tee_shm_alloc_dma_mem β€” Allocate DMA memory as shared memory object πŸŽ€


✨ SYNOPSIS ✨

struct tee_shm * tee_shm_alloc_dma_mem (struct tee_context *ctx , size_t
page_count );

like, it hands you back a struct tee_shm *, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the Context that allocates the shared memory, bestie. it's the one doing the allocating πŸ’…
  • page_count β€” the Number of pages. literally just how many pages we're talking about πŸ“

🌈 DESCRIPTION 🌈

so here's the vibe: the memory you allocate here is expected to be lent β€” like, made inaccessible to the kernel β€” to the TEE while it's being used, and then returned (accessible to the kernel again) before it's freed. the way that order matters 😭 don't skip the giving-it-back step, fr fr.

also important: this function should normally only be used internally in the TEE drivers. it's giving backstage-pass energy, not front-of-house πŸ™ˆ

and yeah β€” it returns a pointer to 'struct tee_shm' πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/tee/tee_shm.c β€” and the whole friend group πŸ’–


mwah πŸ’‹ this page lives under ./drivers/tee and it's dated October 2026 β€” go read the source, bestie, it slays β­πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from