scm_legacy_call(9)
π 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 invokingqcom_scm_calland invalidated in the cache immediately afterqcom_scm_callreturns. Cache maintenance on the command and response buffers is taken care of byqcom_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 π
- Kernel file
./drivers/firmware/qcom/qcom_scm-legacy.cβ go read the source, iykyk π - struct
arm_smccc_args(9) - struct
scm_legacy_command(9) - struct
scm_legacy_response(9) scm_legacy_command_to_response(9)scm_legacy_get_command_buffer(9)scm_legacy_get_response_buffer(9)scm_legacy_call_atomic(9)β the atomic sibling, she does not wait around, different energy entirely β‘
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
- 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