-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello,
I spent my day reverse-engineering AppleSMC.kext driver on Mac OS X (10.4.8), and here are my conclusions: - Only a few keys are written on startup. I'm almost sure these keys are kept as-is after a reboot, none of them seem to have a huge impact on the power consumption. - OS X does NOT take control over the fans. List of keys written by OS X, during boot-up (no keys are written once the system has booted, except the key corresponding to the keyboard backlight): NTOK (0x4e544f4b) - [1-ui8 ] ==> Wrote 0x01 MOLD (0x4d4f4c44) - [1-ui8 ] ==> Wrote 0x14 MOHD (0x4d4f4844) - [1-ui8 ] ==> Wrote 0x14 MOLT (0x4d4f4c54) - [2-sp78] ==> Wrote 0x00 0x60 MOHT (0x4d4f4854) - [2-sp78] ==> Wrote 0x01 0xc0 MOCN (0x4d4f434e) - [2-ui16] ==> Wrote 0x00 0xf8 MOCN (0x4d4f434e) - [2-ui16] ==> Wrote 0x80 0xf8 102: MOCN (0x4d4f434e) - [2-ui16] ==> Wrote 0xe0 0xf8 CLKT (0x434c4b54) - [4-ui32] ==> Wrote 0x00 0x00 0xf4 0xd0 (varies) CLKL ??? ==> Wrote 0x00 0x00 0x70 0x80 MOCN (0x4d4f434e) - [2-ui16] ==> Wrote 0xe0 0xf8 MSDW (0x4d534457) - [1-flag] ==> Wrote 0x01 (cold boots only) I also found a way to list all the keys supported by the SMC controller (with some comments): 0: #KEY (0x234b4559) - [4-ui32] (smcGetKeyCount) 1: +LKS (0x2b4c4b53) - [1-flag] 2: ACID (0x41434944) - [8-ch8*] 3: AL! (0x414c2120) - [1-ui8 ] 4: ALA0 (0x414c4130) - [6-{ala] 5: ALA1 (0x414c4131) - [6-{ala] 6: ALA2 (0x414c4132) - [6-{ala] 7: ALA3 (0x414c4133) - [6-{ala] 8: ALA4 (0x414c4134) - [6-{ala] 9: ALA5 (0x414c4135) - [6-{ala] 10: ALAT (0x414c4154) - [4-{alt] 11: ALI0 (0x414c4930) - [3-{ali] 12: ALI1 (0x414c4931) - [3-{ali] 13: ALSC (0x414c5343) - [16-{alc] 14: ALSF (0x414c5346) - [2-fp1f] 15: ALSL (0x414c534c) - [2-ui16] 16: ALST (0x414c5354) - [2-ui16] 17: ALT0 (0x414c5430) - [4-{alr] 18: ALT1 (0x414c5431) - [4-{alr] 19: ALT2 (0x414c5432) - [4-{alr] 20: ALT3 (0x414c5433) - [4-{alr] 21: ALV0 (0x414c5630) - [6-{alv] 22: ALV1 (0x414c5631) - [6-{alv] 23: B0AC (0x42304143) - [2-si16] 24: B0AV (0x42304156) - [2-ui16] 25: B0BI (0x42304249) - [1-ui8 ] 26: B0LI (0x42304c49) - [2-ui16] 27: B0RI (0x42305249) - [2-ui16] 28: B0St (0x42305374) - [2-ui16] 29: BATP (0x42415450) - [1-flag] 30: BNum (0x424e756d) - [1-ui8 ] 31: BRSC (0x42525343) - [2-ui16] 32: BSDC (0x42534443) - [1-ui8 ] 33: BSIn (0x4253496e) - [1-ui8 ] 34: CLKT (0x434c4b54) - [4-ui32] smcSetTimeCallback ???? 35: Dlpc (0x446c7063) - [1-flag] 36: EPCF (0x45504346) - [1-flag] 37: EPCI (0x45504349) - [4-ui32] 38: EPCV (0x45504356) - [2-ui16] 39: EPMA (0x45504d41) - [4-ch8*] 40: EPMI (0x45504d49) - [1-ui8 ] 41: EPUF (0x45505546) - [1-flag] 42: EPUI (0x45505549) - [4-ui32] 43: EPUV (0x45505556) - [2-ui16] 44: EVCT (0x45564354) - [2-ui16] 45: EVMD (0x45564d44) - [4-ui32] 46: EVRD (0x45565244) - [32-ch8*] 47: F0Ac (0x46304163) - [2-fpe2] 48: F0ID (0x46304944) - [16-{fds] 49: F0Mn (0x46304d6e) - [2-fpe2] 50: F0Mx (0x46304d78) - [2-fpe2] 51: F0Sf (0x46305366) - [2-fpe2] 52: F0Tg (0x46305467) - [2-fpe2] 53: F1Ac (0x46314163) - [2-fpe2] 54: F1ID (0x46314944) - [16-{fds] 55: F1Mn (0x46314d6e) - [2-fpe2] 56: F1Mx (0x46314d78) - [2-fpe2] 57: F1Sf (0x46315366) - [2-fpe2] 58: F1Tg (0x46315467) - [2-fpe2] 59: FNum (0x464e756d) - [1-ui8 ] 60: FS! (0x46532120) - [2-ui16] 61: HDBS (0x48444253) - [1-ui8] 62: HDST (0x48445354) - [4-ui16] 63: HDSW (0x48445357) - [4-ui32] 64: IC0C (0x49433043) - [2-fp6a] 65: IC0c (0x49433063) - [2-ui16] 66: ID0R (0x49443052) - [2-fp3d] 67: ID0r (0x49443072) - [2-ui16] 68: IF0R (0x49463052) - [2-fp4c] 69: IF0r (0x49463072) - [2-ui16] 70: IG0C (0x49473043) - [2-fp6a] 71: IG0c (0x49473063) - [2-ui16] 72: IM0R (0x494d3052) - [2-fp6a] 73: IM0r (0x494d3072) - [2-ui16] 74: IN0R (0x494e3052) - [2-fp6a] 75: IN0r (0x494e3072) - [2-ui16] 76: IP0R (0x49503052) - [2-fp4c] 77: IP0r (0x49503072) - [2-ui16] 78: LAcN (0x4c41634e) - [1-ui8 ] 79: LAtN (0x4c41744e) - [2-ui16] variableCommand ??? 80: LDSB (0x4c445342) - [2-fp1f] 81: LKSB (0x4c4b5342) - [2-{lkb] 82: LS! (0x4c532120) - [1-ui8 ] 83: LSCF (0x4c534346) - [10-{lsc] 84: LSDD (0x4c534444) - [8-{lsd] 85: LSDU (0x4c534455) - [8-{lsd] 86: LSFD (0x4c534644) - [6-{lsf] 87: LSFU (0x4c534655) - [6-{lsf] 88: LSLB (0x4c534c42) - [2-{pwm] 89: LSLF (0x4c534c46) - [2-{pwm] 90: LSLN (0x4c534c4e) - [2-{pwm] 91: LSOF (0x4c534f46) - [1-flag] smcHandlePEHaltRestart 92: LSOO (0x4c534f4f) - [1-flag] 93: LSPV (0x4c535056) - [2-{pwm] 94: LSRB (0x4c535242) - [1-flag] 95: LSSB (0x4c535342) - [2-{lso] smcHandlePEHaltRestart 96: LSSS (0x4c535353) - [2-{lso] AppleSMC13setPowerState 97: LSUP (0x4c535550) - [1-ui8 ] 98: MACA (0x4d414341) - [4-ui32] 99: MACM (0x4d41434d) - [1-flag] 100: MACR (0x4d414352) - [32-ch8*] 101: MOCF (0x4d4f4346) - [2-ui16] NOPE 102: MOCN (0x4d4f434e) - [2-ui16] - 80 00 to enable readings - Interrupts(?) by anding 60 00 103: MOHD (0x4d4f4844) - [1-ui8 ] - 14 is put there 104: MOHT (0x4d4f4854) - [2-sp78] - 01 c0 there 105: MOLD (0x4d4f4c44) - [1-ui8 ] - 14 there 106: MOLT (0x4d4f4c54) - [2-sp78] - 00 60 there 107: MOST (0x4d4f5354) - [2-ui16] - Read 108: MO_X (0x4d4f5f58) - [2-sp78] 109: MO_Y (0x4d4f5f59) - [2-sp78] 110: MO_Z (0x4d4f5f5a) - [2-sp78] 111: MSAL (0x4d53414c) - [1-si8 ] 112: MSBC (0x4d534243) - [2-ui16] 113: MSBP (0x4d534250) - [2-ui16] 114: MSBc (0x4d534263) - [2-ui16] 115: MSBp (0x4d534270) - [2-ui16] 116: MSC0 (0x4d534330) - [2-ui16] 117: MSC1 (0x4d534331) - [2-ui16] 118: MSC2 (0x4d534332) - [2-ui16] 119: MSC3 (0x4d534333) - [2-ui16] 120: MSCP (0x4d534350) - [2-ui16] 121: MSCR (0x4d534352) - [1-ui18] 122: MSCS (0x4d534353) - [1-ui8 ] 123: MSCT (0x4d534354) - [1-ui8 ] 124: MSCa (0x4d534361) - [2-ui16] 125: MSCb (0x4d534362) - [2-ui16] 126: MSCc (0x4d534363) - [2-ui16] 127: MSCd (0x4d534364) - [2-ui16] 128: MSCl (0x4d53436c) - [2-ui16] 129: MSCm (0x4d53436d) - [2-ui16] 130: MSCn (0x4d53436e) - [2-ui16] 131: MSCo (0x4d53436f) - [2-ui16] 132: MSDW (0x4d534457) - [1-flag] AppleSMC13setPowerState AppleSMC27smcPowerStateChangeCallback 133: MSLD (0x4d534c44) - [1-ui8 ] 134: MSPA (0x4d535041) - [1-ui8 ] 135: MSPB (0x4d535042) - [1-ui8 ] 136: MSPH (0x4d535048) - [2-ui8 ] 137: MSPS (0x4d535053) - [1-{msp] 138: MSSD (0x4d535344) - [1-si8 ] AppleSMC23smcPublishShutdownCause 139: MSSS (0x4d535353) - [1-{mss] 140: MSTM (0x4d53544d) - [1-ui8 ] 141: MSTc (0x4d535463) - [1-ui8 ] 142: MSTg (0x4d535467) - [1-ui8 ] 143: MSTm (0x4d53546d) - [1-ui8 ] 144: MSWR (0x4d535752) - [1-ui8 ] 145: NTOK (0x4e544f4b) - [1-ui8 ] AppleSMC5startEP9IOService AppleSMC13setPowerState 146: ONMI (0x4f4e4d49) - [1-ui8 ] 147: OSK0 (0x4f534b30) - [32-ch8*] 148: OSK1 (0x4f534b31) - [32-ch8*] 149: PC0C (0x50433043) - [2-fp88] 150: PD0R (0x50443052) - [2-fp88] 151: PF0R (0x50463052) - [2-fp88] 152: PG0C (0x50473043) - [2-fp88] 153: PM0R (0x504d3052) - [2-fp88] 154: PN0R (0x504e3052) - [2-fp88] 155: PP0R (0x50503052) - [2-fp88] 156: RBr (0x52427220) - [8-ch8*] 157: REV (0x52455620) - [6-{rev] AppleSMC10smcGetVersEP10SMCVersion 158: RMde (0x524d6465) - [1-byte] 159: RPlt (0x52506c74) - [8-ch8*] 160: RSvn (0x5253766e) - [4-ui32] 161: RVBF (0x52564246) - [6-{rev] 162: RVUF (0x52565546) - [6-{rev] 163: SAS! (0x53415321) - [4-ui32] 164: SDRd (0x53445264) - [2-ui16] 165: SIS! (0x53495321) - [2-ui16] 166: SM0x (0x534d3078) - [2-ui16] 167: SM0y (0x534d3079) - [2-ui16] 168: SM0z (0x534d307a) - [2-ui16] 169: SPHT (0x53504854) - [1-ui8 ] 170: SPS! (0x53505321) - [2-ui16] 171: TA0P (0x54413050) - [2-sp78] 172: TB0T (0x54423054) - [2-sp78] 173: TC0D (0x54433044) - [2-sp78] 174: TC0P (0x54433050) - [2-sp78] 175: TG0H (0x54473048) - [2-sp78] 176: TG0P (0x54473050) - [2-sp78] 177: TG0T (0x54473054) - [2-sp78] 178: Th0H (0x54683048) - [2-sp78] 179: Th1H (0x54683148) - [2-sp78] 180: Tm0P (0x546d3050) - [2-sp78] 181: Ts0P (0x54733050) - [2-sp78] 182: Ts1P (0x54733150) - [2-sp78] 183: VC0C (0x56433043) - [2-fp2e] 184: VC0c (0x56433063) - [2-ui16] 185: VG0C (0x56473043) - [2-fp2e] 186: VG0c (0x56473063) - [2-ui16] 187: VP0R (0x56503052) - [2-fp4c] 188: VP0r (0x56503072) - [2-ui16] 189: iC0C (0x69433043) - [2-ui16] 190: iC0c (0x69433063) - [2-ui16] 191: iD0R (0x69443052) - [2-ui16] 192: iD0r (0x69443072) - [2-ui16] 193: iF0R (0x69463052) - [2-ui16] 194: iF0r (0x69463072) - [2-ui16] 195: iG0C (0x69473043) - [2-ui16] 196: iG0c (0x69473063) - [2-ui16] 197: iM0R (0x694d3052) - [2-ui16] 198: iM0r (0x694d3072) - [2-ui16] 199: iN0R (0x694e3052) - [2-ui16] 200: iN0r (0x694e3072) - [2-ui16] 201: iP0R (0x69503052) - [2-ui16] 202: iP0r (0x69503072) - [2-ui16] 203: pC0C (0x70433043) - [2-{sds] 204: pD0R (0x70443052) - [2-{sds] 205: pF0R (0x70463052) - [2-{sds] 206: pG0C (0x70473043) - [2-{sds] 207: pM0R (0x704d3052) - [2-{sds] 208: pN0R (0x704e3052) - [2-{sds] 209: pP0R (0x70503052) - [2-{sds] 210: tA0P (0x74413050) - [2-{sds] 211: tB0T (0x74423054) - [2-{sds] 212: tC0D (0x74433044) - [2-{sds] 213: tC0P (0x74433050) - [2-{sds] 214: tG0H (0x74473048) - [2-{sds] 215: tG0P (0x74473050) - [2-{sds] 216: tG0T (0x74473054) - [2-{sds] 217: th0H (0x74683048) - [2-{sds] 218: th1H (0x74683148) - [2-{sds] 219: tm0P (0x746d3050) - [2-{sds] 220: ts0P (0x74733050) - [2-{sds] 221: ts1P (0x74733150) - [2-{sds] 222: vC0C (0x76433043) - [2-{sds] 223: vC0c (0x76433063) - [2-{sds] 224: vG0C (0x76473043) - [2-{sds] 225: vG0c (0x76473063) - [2-{sds] 226: vP0R (0x76503052) - [2-{sds] 227: vP0r (0x76503072) - [2-{sds] 228: {ala (0x7b616c61) - [3-] 229: {alc (0x7b616c63) - [3-] 230: {ali (0x7b616c69) - [3-] 231: {alr (0x7b616c72) - [3-] 232: {alt (0x7b616c74) - [3-] 233: {alv (0x7b616c76) - [3-] 234: {fds (0x7b666473) - [3-] 235: {lkb (0x7b6c6b62) - [3-] 236: {lsc (0x7b6c7363) - [3-] 237: {lsd (0x7b6c7364) - [3-] 238: {lsf (0x7b6c7366) - [3-] 239: {lsm (0x7b6c736d) - [3-] 240: {lso (0x7b6c736f) - [3-] 241: {lss (0x7b6c7373) - [3-] 242: {msp (0x7b6d7370) - [3-] 243: {mss (0x7b6d7373) - [3-] 244: {pwm (0x7b70776d) - [3-] 245: {rev (0x7b726576) - [3-] 246: {sds (0x7b736473) - [3-] I still have to find out how to catch motion sensor interrupts, but, as long as it concerns heat problems, the solution has to be found somewhere else... Best regards, Nicolas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGFiNh01ajQnpJXgERAoipAJsFM2dN9nnKBStoxdQXCzdziHuECgCeMi/L EQ3oPK01yRFLJTHnaN3QtYM= =2Dor -----END PGP SIGNATURE----- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mactel-linux-devel mailing list Mactel-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel