meson_sm_call_read(9)
πΈ 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 roombufferhas.cmd_indexβ index of the SMC32 function ID π’ which secure-monitor function you're calling.arg0β SMC32 Argument 0arg1β SMC32 Argument 1arg2β SMC32 Argument 2arg3β SMC32 Argument 3arg4β 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, andbsizebytes are copied inbuffer. so don't go assuming 0 means "nothing happened", because it does not π
π SEE ALSO π
- Kernel file
./drivers/firmware/meson/meson_sm.c meson_sm_call(9)meson_sm_call_write(9)meson_sm_get(9)meson_sm_get_thermal_calib(9)
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
- 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