smc_key(9)
β¨ NAME β¨
typedef smc_key β it's literally an alias for u32, and you use it for SMC keys, bestie π
. This is the smc_key(9) page from the Kernel API Manual, and yes, it's short and iconic.
π Description π
Okay so SMC keys are 32bit integers that contain packed ASCII characters in natural integer order β like 0xAABBCCDD, which represent the FourCC ABCD β¨. The SMC driver is designed around this assumption and makes sure the right endianness is used when these keys are stored to memory and when they're sent to or received from the actual SMC firmware. That firmware conversation can happen either in shared memory or as a 64bit mailbox message on Apple Silicon π.
Internally, SMC stores these keys in a table sorted lexicographically and lets you resolve an index into this table to the corresponding SMC key. That's why storing keys as u32 is so convenient: it allows you to, for example, use normal comparison operators, and those operators directly map to the natural order used by SMC firmware π¦.
This simple type alias was introduced to make SMC key variables and arguments easy to recognize at a glance. It's giving "tiny alias, huge main character energy" π.
π SEE ALSO π
- Kernel file
./include/linux/mfd/macsmc.h SMC_KEY(9)struct apple_smc_key_info(9)enum apple_smc_boot_stage(9)struct apple_smc(9)apple_smc_read(9)apple_smc_write(9)apple_smc_enter_atomic(9)apple_smc_write_atomic(9)apple_smc_rw(9)apple_smc_get_key_by_index(9)apple_smc_get_key_info(9)apple_smc_key_exists(9)
okay that's the whole vibe for smc_key(9) β source/version ./include/linux/mfd, dated October 2026. Stay slay, bestie π
β¨
π¦ 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