STRUCT APPLE_SMC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to struct apple_smc(9) from the Kernel API Manual β€” literally the main character struct of this whole page. bestie, the original NAME line is kinda shy and gives us no description at all (it's just the name and a dash), so all the actual tea is down in the synopsis and the members list. no cap. πŸ‘‘


✨ SYNOPSIS ✨

here's the whole vibe, copied exactly so you can trust me:

struct apple_smc {
    struct device *dev;
    u32 key_count;
    smc_key first_key;
    smc_key last_key;
    struct blocking_notifier_head event_handlers;
    struct apple_rtkit *rtk;
    struct completion init_done;
    enum apple_smc_boot_stage boot_stage;
    struct resource *sram;
    void __iomem *sram_base;
    struct apple_rtkit_shmem shmem;
    unsigned int msg_id;
    bool atomic_mode;
    bool atomic_pending;
    struct completion cmd_done;
    u64 cmd_ret;
    struct mutex mutex;
    spinlock_t lock;
};

like, look at her. she's structured. she's organized. she contains multitudes. 🫢


πŸŽ€ MEMBERS πŸŽ€

every single field, explained, no gatekeeping:

  • dev β€” the underlying struct device for the physical backend device. like, whose struct even is this? this one. 🏠
  • key_count β€” how many SMC keys are available. the headcount, basically. πŸ’…
  • first_key β€” the first valid SMC key. the beginning of the alphabet era. ✨
  • last_key β€” the last valid SMC key. the end of an era. 😭
  • event_handlers β€” the notifier call chain for events received from SMC. she's got a whole group chat for events. πŸ¦‹
  • rtk β€” pointer to the Apple RTKit instance. lowkey essential. πŸ”₯
  • init_done β€” a completion for initialization. she'll text you when she's ready, fr. πŸ’Œ
  • boot_stage β€” the current boot stage of SMC. where is she in her life rn. 🌱
  • sram β€” pointer to the SRAM resource. ✨
  • sram_base β€” the SRAM base address. the literal starting point, iykyk. πŸ“
  • shmem β€” the RTKit shared memory structure for SRAM. sharing is caring bestie. 🫢
  • msg_id β€” the current message id for commands β€” and heads up, it gets incremented for each command. number go up. πŸ”’
  • atomic_mode β€” flag set when atomic mode is entered. she's in her atomic era. πŸ’…
  • atomic_pending β€” flag indicating a pending atomic command. the "seen at 3:14" of flags. πŸ™ˆ
  • cmd_done β€” completion for command execution in non-atomic mode. πŸŽ€
  • cmd_ret β€” return value from SMC for the last command. the receipts. 🧾
  • mutex β€” mutex for non-atomic mode. one at a time, bestie. πŸ”’
  • lock β€” spinlock for atomic mode. spin spin spin, iconic. 🌈
notice how mutex is for non-atomic and lock is for atomic? don't mix them up, that's the whole point of having both. periodt. πŸ’€

🌸 SEE ALSO 🌸

go read these next, they're all linked up and everything:


okay that's the whole page, go be a kernel dev now πŸ’œ

sign-off moment: this icon lives in ./include/linux/mfd, dated October 2026, and she's filed under struct apple_smc(9). slay. πŸŽ€βœ¨

πŸ“¦ where this page comes from