scm_legacy_call(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scm_legacy_call(9) β€” the Kernel API Manual, but make it make sense 🫢

okay so this is a page from the Kernel API Manual and it's all about scm_legacy_call, which is genuinely iconic in a "talks to the secure world for you" kinda way πŸ‘‘


🌸 NAME 🌸

scm_legacy_call β€” sends a command to the SCM and then waits for that command to finish processing. yes bestie, it blocks, she's a patient queen πŸ’…


✨ SYNOPSIS ✨

int scm_legacy_call (struct device *dev , const struct qcom_scm_desc
*desc , struct qcom_scm_res *res );

that's the whole vibe: you hand her a device, a descriptor, and somewhere to put the results ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device. that's it, that's the whole description, she's literally just the device 🫢
  • desc β€” the descriptor structure, and she's the main character here because she carries both the arguments going in and the return values coming out πŸ“₯πŸ“€
  • res β€” the results from the SMC call. this is where the tea gets reported back to you πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so there's a very important note on cache maintenance, and ngl you cannot skip this part, it's giving "final boss of the fine print" πŸ’€

Any buffers that are expected to be accessed by the secure world must be flushed before invoking qcom_scm_call and invalidated in the cache immediately after qcom_scm_call returns. Cache maintenance on the command and response buffers is taken care of by qcom_scm_call β€” however, callers are responsible for any other cached buffers passed over to the secure world.

so like, qcom_scm_call has your back for the command buffer and the response buffer (she's an angel πŸ˜‡), but every other cached buffer you yeet over to the secure world? that's on you, bestie. flush before, invalidate after, no cap 🧚✨


πŸ‘‘ SEE ALSO πŸ‘‘


kisses from ./drivers/firmware/qcom, dated October 2026 β€” that's the version and the date, and honestly? she ate. periodt. πŸŒˆπŸ’–

πŸ“¦ where this page comes from