1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2007, 2008 Rui Paulo <rpaulo@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 * 28 * $FreeBSD$ 29 * 30 */ 31 32 #define ASMC_MAXFANS 6 33 34 struct asmc_softc { 35 device_t sc_dev; 36 struct mtx sc_mtx; 37 int sc_nfan; 38 int16_t sms_rest_x; 39 int16_t sms_rest_y; 40 int16_t sms_rest_z; 41 struct sysctl_oid *sc_fan_tree[ASMC_MAXFANS+1]; 42 struct sysctl_oid *sc_temp_tree; 43 struct sysctl_oid *sc_sms_tree; 44 struct sysctl_oid *sc_light_tree; 45 const struct asmc_model *sc_model; 46 int sc_rid_port; 47 int sc_rid_irq; 48 struct resource *sc_ioport; 49 struct resource *sc_irq; 50 void *sc_cookie; 51 int sc_sms_intrtype; 52 struct taskqueue *sc_sms_tq; 53 struct task sc_sms_task; 54 uint8_t sc_sms_intr_works; 55 }; 56 57 /* 58 * Data port. 59 */ 60 #define ASMC_DATAPORT_READ(sc) bus_read_1(sc->sc_ioport, 0x00) 61 #define ASMC_DATAPORT_WRITE(sc, val) \ 62 bus_write_1(sc->sc_ioport, 0x00, val) 63 #define ASMC_STATUS_MASK 0x0f 64 65 /* 66 * Command port. 67 */ 68 #define ASMC_CMDPORT_READ(sc) bus_read_1(sc->sc_ioport, 0x04) 69 #define ASMC_CMDPORT_WRITE(sc, val) \ 70 bus_write_1(sc->sc_ioport, 0x04, val) 71 #define ASMC_CMDREAD 0x10 72 #define ASMC_CMDWRITE 0x11 73 74 /* 75 * Interrupt port. 76 */ 77 #define ASMC_INTPORT_READ(sc) bus_read_1(sc->sc_ioport, 0x1f) 78 79 /* Number of keys */ 80 #define ASMC_NKEYS "#KEY" /* RO; 4 bytes */ 81 82 /* 83 * Fan control via SMC. 84 */ 85 #define ASMC_KEY_FANCOUNT "FNum" /* RO; 1 byte */ 86 #define ASMC_KEY_FANMANUAL "FS! " /* RW; 2 bytes */ 87 #define ASMC_KEY_FANID "F%dID" /* RO; 16 bytes */ 88 #define ASMC_KEY_FANSPEED "F%dAc" /* RO; 2 bytes */ 89 #define ASMC_KEY_FANMINSPEED "F%dMn" /* RO; 2 bytes */ 90 #define ASMC_KEY_FANMAXSPEED "F%dMx" /* RO; 2 bytes */ 91 #define ASMC_KEY_FANSAFESPEED "F%dSf" /* RO; 2 bytes */ 92 #define ASMC_KEY_FANTARGETSPEED "F%dTg" /* RW; 2 bytes */ 93 94 /* 95 * Sudden Motion Sensor (SMS). 96 */ 97 #define ASMC_SMS_INIT1 0xe0 98 #define ASMC_SMS_INIT2 0xf8 99 #define ASMC_KEY_SMS "MOCN" /* RW; 2 bytes */ 100 #define ASMC_KEY_SMS_X "MO_X" /* RO; 2 bytes */ 101 #define ASMC_KEY_SMS_Y "MO_Y" /* RO; 2 bytes */ 102 #define ASMC_KEY_SMS_Z "MO_Z" /* RO; 2 bytes */ 103 #define ASMC_KEY_SMS_LOW "MOLT" /* RW; 2 bytes */ 104 #define ASMC_KEY_SMS_HIGH "MOHT" /* RW; 2 bytes */ 105 #define ASMC_KEY_SMS_LOW_INT "MOLD" /* RW; 1 byte */ 106 #define ASMC_KEY_SMS_HIGH_INT "MOHD" /* RW; 1 byte */ 107 #define ASMC_KEY_SMS_FLAG "MSDW" /* RW; 1 byte */ 108 #define ASMC_SMS_INTFF 0x60 /* Free fall Interrupt */ 109 #define ASMC_SMS_INTHA 0x6f /* High Acceleration Interrupt */ 110 #define ASMC_SMS_INTSH 0x80 /* Shock Interrupt */ 111 112 /* 113 * Light Sensor. 114 */ 115 #define ASMC_ALSL_INT2A 0x2a /* Ambient Light related Interrupt */ 116 117 /* 118 * Keyboard backlight. 119 */ 120 #define ASMC_KEY_LIGHTLEFT "ALV0" /* RO; 6 bytes */ 121 #define ASMC_KEY_LIGHTRIGHT "ALV1" /* RO; 6 bytes */ 122 #define ASMC_KEY_LIGHTVALUE "LKSB" /* WO; 2 bytes */ 123 124 /* 125 * Clamshell. 126 */ 127 #define ASMC_KEY_CLAMSHELL "MSLD" /* RO; 1 byte */ 128 129 /* 130 * Interrupt keys. 131 */ 132 #define ASMC_KEY_INTOK "NTOK" /* WO; 1 byte */ 133 134 /* 135 * Temperatures. 136 * 137 * First for MacBook, second for MacBook Pro, third for Intel Mac Mini, 138 * fourth the Mac Pro 8-core and finally the MacBook Air. 139 * 140 */ 141 /* maximum array size for temperatures including the last NULL */ 142 #define ASMC_TEMP_MAX 80 143 #define ASMC_MB_TEMPS { "TB0T", "TN0P", "TN1P", "Th0H", "Th1H", \ 144 "TM0P", NULL } 145 #define ASMC_MB_TEMPNAMES { "enclosure", "northbridge1", \ 146 "northbridge2", "heatsink1", \ 147 "heatsink2", "memory", } 148 #define ASMC_MB_TEMPDESCS { "Enclosure Bottomside", \ 149 "Northbridge Point 1", \ 150 "Northbridge Point 2", "Heatsink 1", \ 151 "Heatsink 2", "Memory Bank A", } 152 153 #define ASMC_MB31_TEMPS { "TB0T", "TN0P", "Th0H", "Th1H", \ 154 "TM0P", NULL } 155 156 #define ASMC_MB31_TEMPNAMES { "enclosure", "northbridge1", \ 157 "heatsink1", "heatsink2", \ 158 "memory", } 159 160 #define ASMC_MB31_TEMPDESCS { "Enclosure Bottomside", \ 161 "Northbridge Point 1", \ 162 "Heatsink 1","Heatsink 2" \ 163 "Memory Bank A", } 164 165 #define ASMC_MB71_TEMPS { "TB0T", "TB1T", "TB2T", "TC0D", "TC0P", \ 166 "TH0P", "TN0D", "TN0P", "TN0S", "TN1D", \ 167 "TN1E", "TN1F", "TN1G", "TN1S", "Th1H", \ 168 "Ts0P", "Ts0S", NULL } 169 170 #define ASMC_MB71_TEMPNAMES { "enclosure_bottom0", "battery_1", "battery_2", "cpu_package", "cpu_proximity", \ 171 "hdd_bay", "northbridge0_diode", "northbridge0_proximity", "TN0S", "mpc_die2", \ 172 "TN1E", "TN1F", "TN1G", "TN1S", "heatsink1", \ 173 "palm_rest", "memory_proximity", } 174 175 #define ASMC_MB71_TEMPDESCS { "Enclosure Bottom 0", "Battery 1", "Battery 2", "CPU Package", "CPU Proximity", \ 176 "HDD Bay", "Northbridge Diode", "Northbridge Proximity", "TN0S", "MPC Die 2", \ 177 "TN1E", "TN1F", "TN1G", "TN1S", "Heatsink 1", \ 178 "Palm Rest", "Memory Proximity", } 179 180 #define ASMC_MBP_TEMPS { "TB0T", "Th0H", "Th1H", "Tm0P", \ 181 "TG0H", "TG0P", "TG0T", NULL } 182 183 #define ASMC_MBP_TEMPNAMES { "enclosure", "heatsink1", \ 184 "heatsink2", "memory", "graphics", \ 185 "graphicssink", "unknown", } 186 187 #define ASMC_MBP_TEMPDESCS { "Enclosure Bottomside", \ 188 "Heatsink 1", "Heatsink 2", \ 189 "Memory Controller", \ 190 "Graphics Chip", "Graphics Heatsink", \ 191 "Unknown", } 192 193 #define ASMC_MBP4_TEMPS { "TB0T", "Th0H", "Th1H", "Th2H", "Tm0P", \ 194 "TG0H", "TG0D", "TC0D", "TC0P", "Ts0P", \ 195 "TTF0", "TW0P", NULL } 196 197 #define ASMC_MBP4_TEMPNAMES { "enclosure", "heatsink1", "heatsink2", \ 198 "heatsink3", "memory", "graphicssink", \ 199 "graphics", "cpu", "cpu2", "unknown1", \ 200 "unknown2", "wireless", } 201 202 #define ASMC_MBP4_TEMPDESCS { "Enclosure Bottomside", \ 203 "Main Heatsink 1", "Main Heatsink 2", \ 204 "Main Heatsink 3", \ 205 "Memory Controller", \ 206 "Graphics Chip Heatsink", \ 207 "Graphics Chip Diode", \ 208 "CPU Temperature Diode", "CPU Point 2", \ 209 "Unknown", "Unknown", \ 210 "Wireless Module", } 211 212 #define ASMC_MBP5_TEMPS { "TB0T", "TB1T", "TB2T", "TB3T", "TC0D", \ 213 "TC0F", "TC0P", "TG0D", "TG0F", "TG0H", \ 214 "TG0P", "TG0T", "TG1H", "TN0D", "TN0P", \ 215 "TTF0", "Th2H", "Tm0P", "Ts0P", "Ts0S", \ 216 NULL } 217 218 #define ASMC_MBP5_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ 219 "enclosure_bottom_2", "enclosure_bottom_3", \ 220 "cpu_diode", "cpu", \ 221 "cpu_pin", "gpu_diode", \ 222 "gpu", "gpu_heatsink", \ 223 "gpu_pin", "gpu_transistor", \ 224 "gpu_2_heatsink", "northbridge_diode", \ 225 "northbridge_pin", "unknown", \ 226 "heatsink_2", "memory_controller", \ 227 "pci_express_slot_pin", "pci_express_slot_unk" } 228 229 #define ASMC_MBP5_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ 230 "Enclosure Bottom 2", "Enclosure Bottom 3", \ 231 "CPU Diode", "CPU ???", \ 232 "CPU Pin", "GPU Diode", \ 233 "GPU ???", "GPU Heatsink", \ 234 "GPU Pin", "GPU Transistor", \ 235 "GPU 2 Heatsink", "Northbridge Diode", \ 236 "Northbridge Pin", "Unknown", \ 237 "Heatsink 2", "Memory Controller", \ 238 "PCI Express Slot Pin", "PCI Express Slot (unk)" } 239 240 #define ASMC_MBP62_TEMPS { "TB0T", "TB1T", "TB2T", \ 241 "TC0C", "TC0D", "TC0P", \ 242 "TC1C", "TG0D", "TG0P", \ 243 "TG0T", "TMCD", "TP0P", \ 244 "TPCD", "Th1H", "Th2H", \ 245 "Tm0P", "Ts0P", "Ts0S" } 246 247 #define ASMC_MBP62_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ 248 "enclosure_bottom_2", "cpu0", \ 249 "cpu_diode", "cpu_proximity", \ 250 "cpu1", "gpu_diode", \ 251 "gpu_pin", "gpu_transistor", \ 252 "TMCD", "pch_controller_proximity", \ 253 "pch_die", "heatsink1", \ 254 "heatsink2", "memory-controller", \ 255 "palmrest", "memoryproximity" } 256 257 #define ASMC_MBP62_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ 258 "Enclosure Bottom 2", "CPU 0", \ 259 "CPU Diode", "CPU Proximity", \ 260 "CPU 1", "GPU Diode", \ 261 "GPU Pin", "GPU Transistor", \ 262 "TMCD", "PCH Controller Proximity", \ 263 "PCH Die", "Heat Sink 1", \ 264 "Heat Sink 2", "Memory Controller", \ 265 "Palm Rest", "Memory Proximity" } 266 267 #define ASMC_MBP81_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ 268 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 269 "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ 270 "TP0P", "TPCD", "TW0P", "Th1H", "Ts0P", \ 271 "Ts0S", NULL } 272 273 #define ASMC_MBP81_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ 274 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 275 "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ 276 "TP0P", "TPCD", "wireless", "Th1H", "Ts0P", \ 277 "Ts0S" } 278 279 #define ASMC_MBP81_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ 280 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 281 "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ 282 "TP0P", "TPCD", "TW0P", "Th1H", "Ts0P", \ 283 "Ts0S" } 284 285 #define ASMC_MBP82_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ 286 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 287 "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ 288 "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ 289 "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ 290 "Th2H", "Tm0P", "Ts0P", "Ts0S", NULL } 291 292 #define ASMC_MBP82_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ 293 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 294 "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ 295 "TCTD", "graphics", "TG0P", "THSP", "TM0S", \ 296 "TMBS", "TP0P", "TPCD", "wireless", "Th1H", \ 297 "Th2H", "memory", "Ts0P", "Ts0S" } 298 299 #define ASMC_MBP82_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ 300 "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ 301 "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ 302 "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ 303 "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ 304 "Th2H", "Tm0P", "Ts0P", "Ts0S" } 305 306 #define ASMC_MBP91_TEMPS { "TA0P", "TB0T", "TB1T", "TB2T", "TC0E", \ 307 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 308 "TC4C", "TCGC", "TCSA", "TCXC", "TG0D", \ 309 "TG0P", "TG1D", "TG1F", "TG1d", "TGTC", \ 310 "TGTD", "TM0P", "TM0S", "TP0P", "TPCD", \ 311 "Th1H", "Th2H", "Ts0P", "Ts0S", "Tsqf", NULL } 312 313 #define ASMC_MBP91_TEMPNAMES { "ambient", "enclosure_bottom_1", "enclosure_bottom_2", \ 314 "enclosure_bottom_3", "cpu_die_peci_0", "cpu_die_peci_1", \ 315 "cpu_proximity", "cpu_core_1", "cpu_core_2", "cpu_core_3", \ 316 "cpu_core_4", "intel_gpu", "cpu_sys_agent", \ 317 "cpu_core_peci", "gpu_analog", \ 318 "gpu_proximity", "geforce_gpu_digital", "tg1f", \ 319 "gpu_2_die", "tgtc", "tgtd", "memory_proximity", \ 320 "mem_bank_a1", "platform_ctrl_hub", "pch_digital", \ 321 "main_heatsink_r", "main_heatsink_l", "palm_rest", \ 322 "bottom_skin", "tsqf" } 323 324 #define ASMC_MBP91_TEMPDESCS { "Ambient", "Enclosure Bottom 1", "Enclosure Bottom 2", \ 325 "Enclosure Bottom 3", "CPU Die PECI 0", "CPU Die PECI 1", \ 326 "CPU Proximity", "CPU Core 1", "CPU Core 2", \ 327 "CPU Core 3", "CPU Core 4", "Intel GPU", \ 328 "CPU System Agent Core", "CPU Core - PECI", \ 329 "GPU Die - Analog", "GPU Proximity", \ 330 "GeForce GPU Die - Digital", "TG1F", "GPU 2 Die" \ 331 "TGTC", "TGTD", "Memory Proximity", \ 332 "Memory Bank A1", "Platform Controller Hub", "PCH Die - Digital", \ 333 "Main Heatsink Right", "Main Heatsink Left", "Palm Rest", \ 334 "Bottom Skin", "Tsqf" } 335 336 #define ASMC_MBP92_TEMPS { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ 337 "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ 338 "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ 339 "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ 340 "TPCD", NULL } 341 342 #define ASMC_MBP92_TEMPNAMES { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ 343 "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ 344 "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ 345 "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ 346 "TPCD" } 347 348 #define ASMC_MBP92_TEMPDESCS { "Palm Rest", "Memory Proximity", "Airflow 1", \ 349 "Battery 1", "Battery 2", "Battery TS_MAX", \ 350 "CPU Core 1", "CPU Core 2", "CPU1", "CPU1", \ 351 "TC0J", "CPU 1 Proximity", "TCFC", \ 352 "PECI GPU", "PECI SA", "TCTD", "PECI CPU", \ 353 "GPU Die", "Memory Bank A1", "Memory Module A1", \ 354 "PCH Die" } 355 356 #define ASMC_MBP112_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 357 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 358 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 359 "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ 360 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 361 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 362 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 363 "Ts1S", NULL } 364 365 #define ASMC_MBP112_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 366 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 367 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 368 "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ 369 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 370 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 371 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 372 "Ts1S" } 373 374 #define ASMC_MBP112_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 375 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 376 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 377 "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ 378 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 379 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 380 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 381 "Ts1S" } 382 383 #define ASMC_MBP113_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 384 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 385 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 386 "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ 387 "TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \ 388 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 389 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 390 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 391 "Ts1S", NULL } 392 393 #define ASMC_MBP113_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 394 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 395 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 396 "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ 397 "TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \ 398 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 399 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 400 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 401 "Ts1S" } 402 403 #define ASMC_MBP113_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ 404 "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ 405 "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ 406 "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ 407 "TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \ 408 "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ 409 "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ 410 "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ 411 "Ts1S" } 412 #define ASMC_MM_TEMPS { "TN0P", "TN1P", NULL } 413 #define ASMC_MM_TEMPNAMES { "northbridge1", "northbridge2" } 414 #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ 415 "Northbridge Point 2" } 416 417 #define ASMC_MM21_TEMPS { "TA0P", "TC0D", \ 418 "TC0H", "TC0P", \ 419 "TC1P", "TN0P", \ 420 "TN1P", NULL } 421 422 #define ASMC_MM21_TEMPNAMES { "ambient_air", "cpu_die", \ 423 "cpu_heatsink", "cpu_proximity1", \ 424 "cpu_proximity2", "northbridge_proximity1", \ 425 "northbridge_proximity2", } 426 427 #define ASMC_MM21_TEMPDESCS { "Ambient Air Temperature" \ 428 "CPU Die Core Temperature", \ 429 "CPU Heatsink Temperature", \ 430 "CPU Proximity 1 Temperature", \ 431 "CPU Proximity 2 Temperature", \ 432 "Northbridge Proximity 1 Temperature", \ 433 "Northbridge Proximity 2 Temperature", } 434 435 #define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ 436 "TC0P", "TH0P", \ 437 "TN0D", "TN0P", \ 438 "TW0P", NULL } 439 440 #define ASMC_MM31_TEMPNAMES { "cpu0_die", "cpu0_heatsink", \ 441 "cpu0_proximity", "hdd_bay", \ 442 "northbridge_die", \ 443 "northbridge_proximity", \ 444 "wireless_proximity", } 445 446 #define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ 447 "CPU0 Heatsink Temperature", \ 448 "CPU0 Proximity Temperature", \ 449 "HDD Bay Temperature", \ 450 "Northbridge Die Core Temperature", \ 451 "Northbridge Proximity Temperature", \ 452 "Wireless Module Proximity Temperature", } 453 454 #define ASMC_MM41_TEMPS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ 455 "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ 456 "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ 457 "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ 458 "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ 459 "TW0P", "Tm0P", "Tp0C", NULL } 460 461 #define ASMC_MM41_TEMPNAMES { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ 462 "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ 463 "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ 464 "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ 465 "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ 466 "TW0P", "Tm0P", "Tp0C", NULL } 467 468 #define ASMC_MM41_TEMPDESCS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ 469 "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ 470 "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ 471 "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ 472 "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ 473 "TW0P", "Tm0P", "Tp0C", NULL } 474 475 #define ASMC_MM52_TEMPS { "TA0P", "TA1P", \ 476 "TC0D", "TC0P", \ 477 "TG0D", "TG1D", \ 478 "TG0P", "TG0M", \ 479 "TI0P", \ 480 "TM0S", "TMBS", \ 481 "TM0P", "TP0P", \ 482 "TPCD", "Tp0C", \ 483 "TW0P", NULL } 484 485 #define ASMC_MM52_TEMPNAMES { "ambient_air_proximity", "ambient_cpu_pch_wireless_dimm", \ 486 "cpu_die", "cpu_proximity", \ 487 "gpu_diode1", "gpu_diode2", \ 488 "gpu_proximity", "gpu_integrated_switcher", \ 489 "thunderbolt_proximity", \ 490 "memory_slot1", "memory_slot2", \ 491 "memory_proximity", "pch_controller_proximity", \ 492 "pch_controller_die", "pwr_supply", \ 493 "wireless_proximity", } 494 495 #define ASMC_MM52_TEMPDESCS { "Ambient Air Proximity Temperature", \ 496 "Combo Ambient CPU PCH Wireless DIMM Temperature", \ 497 "CPU Die Temperature", "CPU Proximity Temperature", \ 498 "GPU Diode 1 Temperature" , "GPU Diode 2 Temperature", \ 499 "GPU Proximity Temperature", \ 500 "Integrated Graphics/GPU Switcher Temperature", \ 501 "Thunderbolt Proximity Temperature", \ 502 "Memory Slot 1 Temperature", \ 503 "Memory Slot 2 Temperature", \ 504 "Memory Slots Proximity Temperature", \ 505 "Platform Controller Hub Proximity Temperature", \ 506 "Platform Controller Hub Die Temperature", \ 507 "Power Supply Temperature", \ 508 "Wireless Module Proximity Temperature", } 509 510 #define ASMC_MM71_TEMPS { "TA0p", "TA1p", \ 511 "TA2p", "TC0c", \ 512 "TC0p", "TC1c", \ 513 "TCGc", "TCSc", \ 514 "TCXC", "TCXR", \ 515 "TM0p", "TPCd", \ 516 "TW0p", "Te0T", \ 517 "Tm0P", NULL } 518 519 #define ASMC_MM71_TEMPNAMES { "ambient_air1", "ambient_air2", \ 520 "ambient_air3", "cpu_core1_peci", \ 521 "cpu_proximity", "cpu_core2_peci", \ 522 "intel_gpu", "cpu_sa_core_peci", \ 523 "cpu_core", "cpu_peci_dts", \ 524 "memory_proximity", "pch_controller_die", \ 525 "wireless_proximity", "thunderbolt_diode", \ 526 "logic_board", } 527 528 #define ASMC_MM71_TEMPDESCS { "Ambient Air Temperature 1", \ 529 "Ambient Air Temperature 2", \ 530 "Ambient Air Temperature 3", \ 531 "CPU Core 1 PECI Temperature", "CPU Proximity Temperature", \ 532 "CPU Core 2 PECI Temperature", "Intel GPU Temperature", \ 533 "CPU System Agent Core PECI Temperature", \ 534 "CPU Core Temperature", "CPU PECI DTS Temperature", \ 535 "Memory Proximity Temperature", \ 536 "Platform Controller Hub Die Temperature", \ 537 "Wireless Module Proximity Temperature", \ 538 "Thunderbolt Diode Temperature", \ 539 "Logic Board temperature", } 540 541 #define ASMC_MP1_TEMPS { "TA0P", \ 542 "TCAH", "TCBH", \ 543 "TC0P", "TC0C", "TC1C", \ 544 "TC2C", "TC3C", "THTG", \ 545 "TH0P", "TH1P", \ 546 "TH2P", "TH3P", \ 547 "TM0P", "TM1P", "TM2P", \ 548 "TM8P", "TM9P", "TMAP", \ 549 "TM0S", "TM1S", "TM2P", "TM3S", \ 550 "TM8S", "TM9S", "TMAS", "TMBS", \ 551 "TN0H", "TS0C", \ 552 "Tp0C", "Tp1C", "Tv0S", "Tv1S", NULL } 553 554 #define ASMC_MP1_TEMPNAMES { "ambient", \ 555 "cpu_a_heatsink", "cpu_b_heatsink", \ 556 "cpu_a_proximity", "cpu_core0", "cpu_core1", \ 557 "cpu_core2", "cpu_core3", "THTG", \ 558 "hdd_bay0", "hdd_bay1", \ 559 "hdd_bay2", "hdd_bay3", \ 560 "memory_card_a_proximity0", \ 561 "memory_card_a_proximity1", \ 562 "memory_card_a_proximity2", \ 563 "memory_card_b_proximity0", \ 564 "memory_card_b_proximity1", \ 565 "memory_card_b_proximity2", \ 566 "memory_card_a_slot0", \ 567 "memory_card_a_slot1", \ 568 "memory_card_a_slot2", \ 569 "memory_card_a_slot3", \ 570 "memory_card_b_slot0", \ 571 "memory_card_b_slot1", \ 572 "memory_card_b_slot2", \ 573 "memory_card_b_slot3", \ 574 "mch_heatsink", "expansion_slots", \ 575 "power_supply_loc0", "power_supply_loc1", \ 576 "Tv0S", "Tv1S", } 577 578 #define ASMC_MP1_TEMPDESCS { "Ambient Air", \ 579 "CPU A Heatsink", "CPU B Heatsink", \ 580 "CPU A Proximity", \ 581 "CPU Core 1", "CPU Core 2", \ 582 "CPU Core 3", "CPU Core 4", "THTG", \ 583 "Hard Drive Bay 1", "Hard Drive Bay 2", \ 584 "Hard Drive Bay 3", "Hard Drive Bay 4", \ 585 "Memory Riser A, Proximity 1", \ 586 "Memory Riser A, Proximity 2", \ 587 "Memory Riser A, Proximity 3", \ 588 "Memory Riser B, Proximity 1", \ 589 "Memory Riser B, Proximity 2", \ 590 "Memory Riser B, Proximity 3", \ 591 "Memory Riser A, Slot 1", \ 592 "Memory Riser A, Slot 2", \ 593 "Memory Riser A, Slot 3", \ 594 "Memory Riser A, Slot 4", \ 595 "Memory Riser B, Slot 1", \ 596 "Memory Riser B, Slot 2", \ 597 "Memory Riser B, Slot 3", \ 598 "Memory Riser B, Slot 4", \ 599 "MCH Heatsink", "Expansion Slots", \ 600 "Power Supply, Location 1", \ 601 "Power Supply, Location 2", \ 602 "Tv0S", "Tv1S", } 603 604 #define ASMC_MP2_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ 605 "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ 606 "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ 607 "TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \ 608 "TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \ 609 "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \ 610 "TM8S", "TM9P", "TM9S", "TN0H", "TS0C", \ 611 NULL } 612 613 #define ASMC_MP2_TEMPNAMES { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ 614 "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ 615 "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ 616 "TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \ 617 "TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \ 618 "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \ 619 "TM8S", "TM9P", "TM9S", "TN0H", "TS0C", } 620 621 #define ASMC_MP2_TEMPDESCS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ 622 "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ 623 "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ 624 "TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \ 625 "TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \ 626 "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \ 627 "TM8S", "TM9P", "TM9S", "TN0H", "TS0C", } 628 629 #define ASMC_MP5_TEMPS { "TA0P", "TCAC", "TCAD", "TCAG", "TCAH", \ 630 "TCAS", "TCBC", "TCBD", "TCBG", "TCBH", \ 631 "TCBS", "TH1F", "TH1P", "TH1V", "TH2F", \ 632 "TH2P", "TH2V", "TH3F", "TH3P", "TH3V", \ 633 "TH4F", "TH4P", "TH4V", "THPS", "THTG", \ 634 "TM1P", "TM2P", "TM2V", "TM3P", "TM3V", \ 635 "TM4P", "TM5P", "TM6P", "TM6V", "TM7P", \ 636 "TM7V", "TM8P", "TM8V", "TM9V", "TMA1", \ 637 "TMA2", "TMA3", "TMA4", "TMB1", "TMB2", \ 638 "TMB3", "TMB4", "TMHS", "TMLS", "TMPS", \ 639 "TMPV", "TMTG", "TN0D", "TN0H", "TNTG", \ 640 "Te1F", "Te1P", "Te1S", "Te2F", "Te2S", \ 641 "Te3F", "Te3S", "Te4F", "Te4S", "Te5F", \ 642 "Te5S", "TeGG", "TeGP", "TeRG", "TeRP", \ 643 "TeRV", "Tp0C", "Tp1C", "TpPS", "TpTG", \ 644 NULL } 645 646 #define ASMC_MP5_TEMPNAMES { "ambient", "TCAC", "TCAD", "TCAG", "TCAH", \ 647 "TCAS", "TCBC", "TCBD", "TCBG", "TCBH", \ 648 "TCBS", "TH1F", "TH1P", "TH1V", "TH2F", \ 649 "TH2P", "TH2V", "TH3F", "TH3P", "TH3V", \ 650 "TH4F", "TH4P", "TH4V", "THPS", "THTG", \ 651 "TM1P", "TM2P", "TM2V", "TM3P", "TM3V", \ 652 "TM4P", "TM5P", "TM6P", "TM6V", "TM7P", \ 653 "TM7V", "TM8P", "TM8V", "TM9V", "ram_a1", \ 654 "ram_a2", "ram_a3", "ram_a4", "ram_b1", "ram_b2", \ 655 "ram_b3", "ram_b4", "TMHS", "TMLS", "TMPS", \ 656 "TMPV", "TMTG", "TN0D", "TN0H", "TNTG", \ 657 "Te1F", "Te1P", "Te1S", "Te2F", "Te2S", \ 658 "Te3F", "Te3S", "Te4F", "Te4S", "Te5F", \ 659 "Te5S", "TeGG", "TeGP", "TeRG", "TeRP", \ 660 "TeRV", "Tp0C", "Tp1C", "TpPS", "TpTG", } 661 662 #define ASMC_MP5_TEMPDESCS { "TA0P", "TCAC", "TCAD", "TCAG", "TCAH", \ 663 "TCAS", "TCBC", "TCBD", "TCBG", "TCBH", \ 664 "TCBS", "TH1F", "TH1P", "TH1V", "TH2F", \ 665 "TH2P", "TH2V", "TH3F", "TH3P", "TH3V", \ 666 "TH4F", "TH4P", "TH4V", "THPS", "THTG", \ 667 "TM1P", "TM2P", "TM2V", "TM3P", "TM3V", \ 668 "TM4P", "TM5P", "TM6P", "TM6V", "TM7P", \ 669 "TM7V", "TM8P", "TM8V", "TM9V", "TMA1", \ 670 "TMA2", "TMA3", "TMA4", "TMB1", "TMB2", \ 671 "TMB3", "TMB4", "TMHS", "TMLS", "TMPS", \ 672 "TMPV", "TMTG", "TN0D", "TN0H", "TNTG", \ 673 "Te1F", "Te1P", "Te1S", "Te2F", "Te2S", \ 674 "Te3F", "Te3S", "Te4F", "Te4S", "Te5F", \ 675 "Te5S", "TeGG", "TeGP", "TeRG", "TeRP", \ 676 "TeRV", "Tp0C", "Tp1C", "TpPS", "TpTG", } 677 678 #define ASMC_MP6_TEMPS { "TA0P", "TA1P", "TC0P", "TG0D", "TG0P", \ 679 "TG1D", "TG1P", "TM0P", "TM1P", NULL } 680 681 #define ASMC_MP6_TEMPNAMES { "ambient_air_1", "ambient_air_2", \ 682 "cpu_proximity", "gpu_diode_1", \ 683 "gpu_proximity_1", "gpu_diode_2", \ 684 "gpu_proximity_2", "mem_proximity_1", \ 685 "mem_proximity_2" } 686 687 #define ASMC_MP6_TEMPDESCS { "Ambient Air 1", "Ambient Air 2", \ 688 "CPU Proximity", "GPU Diode 1", \ 689 "GPU Proximity 1", "GPU Diode 2", \ 690 "GPU Proximity 2", "Memory Bank A", \ 691 "Memory Bank B" } 692 693 #define ASMC_MBA_TEMPS { "TB0T", NULL } 694 #define ASMC_MBA_TEMPNAMES { "enclosure" } 695 #define ASMC_MBA_TEMPDESCS { "Enclosure Bottom" } 696 697 #define ASMC_MBA3_TEMPS { "TB0T", "TB1T", "TB2T", \ 698 "TC0D", "TC0E", "TC0P", NULL } 699 700 #define ASMC_MBA3_TEMPNAMES { "enclosure", "TB1T", "TB2T", \ 701 "TC0D", "TC0E", "TC0P" } 702 703 #define ASMC_MBA3_TEMPDESCS { "Enclosure Bottom", "TB1T", "TB2T", \ 704 "TC0D", "TC0E", "TC0P" } 705 706 #define ASMC_MBA4_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", \ 707 "TC0D", "TC0E", "TC0F", "TC0P", \ 708 "TC1C", "TC2C", "TCGC", "TCSA", \ 709 "TH0F", "TH0J", "TH0O", "TH0o", \ 710 "TM0P", "TPCD", "Ta0P", "Th1H", \ 711 "Tm0P", "Tm1P", "Ts0P", "Ts0S", \ 712 NULL } 713 714 #define ASMC_MBA4_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TC0C", \ 715 "TC0D", "TC0E", "TC0F", "TC0P", \ 716 "TC1C", "TC2C", "TCGC", "TCSA", \ 717 "TH0F", "TH0J", "TH0O", "TH0o", \ 718 "TM0P", "TPCD", "Ta0P", "Th1H", \ 719 "Tm0P", "Tm1P", "Ts0P", "Ts0S", \ 720 NULL } 721 722 #define ASMC_MBA4_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TC0C", \ 723 "TC0D", "TC0E", "TC0F", "TC0P", \ 724 "TC1C", "TC2C", "TCGC", "TCSA", \ 725 "TH0F", "TH0J", "TH0O", "TH0o", \ 726 "TM0P", "TPCD", "Ta0P", "Th1H", \ 727 "Tm0P", "Tm1P", "Ts0P", "Ts0S", \ 728 NULL } 729 730 #define ASMC_MBA5_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", \ 731 "TC0D", "TC0E", "TC0F", "TC0P", \ 732 "TC1C", "TC2C", "TCGC", "TCSA", \ 733 "TCXC", "THSP", "TM0P", "TPCD", \ 734 "Ta0P", "Th1H", "Tm0P", "Tm1P", \ 735 "Ts0P", "Ts0S", NULL } 736 737 #define ASMC_MBA5_TEMPNAMES { "enclosure1", "enclosure2", "enclosure3", "TC0C", \ 738 "cpudiode", "cputemp1", "cputemp2", "cpuproximity", \ 739 "cpucore1", "cpucore2", "cpupeci", "pecisa", \ 740 "TCXC", "THSP", "memorybank", "pchdie", \ 741 "Ta0P", "heatpipe", "mainboardproximity1", "mainboardproximity2", \ 742 "palmrest", "memoryproximity" } 743 744 #define ASMC_MBA5_TEMPDESCS { "Enclosure Bottom 1", "Enclosure Bottom 2", "Enclosure Bottom 3", "TC0C",\ 745 "CPU Diode", "CPU Temp 1", "CPU Temp 2", "CPU Proximity", \ 746 "CPU Core 1", "CPU Core 2", "CPU Peci Core", "PECI SA", \ 747 "TCXC", "THSP", "Memory Bank A", "PCH Die", \ 748 "Ta0P", "Heatpipe", "Mainboard Proximity 1", "Mainboard Proximity 2", \ 749 "Palm Rest", "Memory Proximity" } 750 751 #define ASMC_MBA7_TEMPS { "TB0T", "TB1T", "TB2T", \ 752 "TC0E", "TC0F", "TC0P", \ 753 "TC1C", "TC2C", \ 754 "TCGC", "TCSA", "TCXC", \ 755 "THSP", "TM0P", "TPCD", \ 756 "TW0P" "Ta0P", "Th1H", \ 757 "Tm0P", "Ts0P", "Ts0S", NULL } 758 759 #define ASMC_MBA7_TEMPNAMES { "enclosure1", "enclosure2", "enclosure3", \ 760 "cputemp1", "cputemp2", "cpuproximity", \ 761 "cpucore1", "cpucore2", \ 762 "pecigpu", "pecisa", "pecicpu", \ 763 "thunderboltproximity", "memorybank", "pchdie", \ 764 "wirelessproximity", "airflowproximity", "heatpipe", \ 765 "mainboardproximity", "palmrest", "memoryproximity" } 766 767 #define ASMC_MBA7_TEMPDESCS { "Enclosure Bottom 1", "Enclosure Bottom 2", "Enclosure Bottom 3", \ 768 "CPU Temp 1", "CPU Temp 2", "CPU Proximity", \ 769 "CPU Core 1", "CPU Core 2", \ 770 "PECI GPU", "PECI SA", "PECI CPU", \ 771 "Thunderbolt Proximity", "Memory Bank A", "PCH Die", \ 772 "Wireless Proximity", "Airflow Proxmity", "Heatpipe", \ 773 "Mainboard Proximity", "Palm Rest", "Memory Proximity" } 774