meson_sm_call_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 meson_sm_call_read(9) 🌸

okay so bestie, welcome to the glow-up of the Kernel API Manual's page on meson_sm_call_read β€” yes that's a section 9 function, kernel-internal vibes only, iykyk ✨


πŸ’– NAME πŸ’–

meson_sm_call_read β€” literally just retrieve data from secure-monitor. that's it, that's the whole job πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int meson_sm_call_read (struct meson_sm_firmware *fw , void *buffer ,
unsigned int bsize , unsigned int cmd_index , u32 arg0 , u32 arg1 , u32
arg2 , u32 arg3 , u32 arg4 );

like, yes, it returns an int and yes it takes a lot of args. we love a main character with a long signature πŸŽ€


🌈 ARGUMENTS 🌈

okay so here's the whole cast, no skips, no "etc." β€” every single one:

  • fw β€” pointer to secure-monitor firmware πŸ’« the actual firmware object you're talking to.
  • buffer β€” buffer to store the retrieved data πŸ“₯ your lil drop-off spot for the goods.
  • bsize β€” size of the buffer πŸ“ how much room buffer has.
  • cmd_index β€” index of the SMC32 function ID πŸ”’ which secure-monitor function you're calling.
  • arg0 β€” SMC32 Argument 0
  • arg1 β€” SMC32 Argument 1
  • arg2 β€” SMC32 Argument 2
  • arg3 β€” SMC32 Argument 3
  • arg4 β€” SMC32 Argument 4

(yeah the five args are just arg0 through arg4, the SMC32 argument squad, no notes 🫢)


⭐ RETURN ⭐

on success you get the size of read data, and on error you get a negative value. iconic, straightforward, we stan 🌟

but bestie listen β€” when 0 is returned there is no guarantee about the amount of data read, and bsize bytes are copied in buffer. so don't go assuming 0 means "nothing happened", because it does not πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the friend group, they come as a set πŸ§šπŸ’œ


so yeah β€” that's the tea β˜• this page lives under ./drivers/firmware/meson, and it's dated October 2026 πŸ—“οΈβœ¨ ty for coming to my ted talk, mwah πŸ’‹

πŸ“¦ where this page comes from