2 * This file is part of the coreboot project.
4 * Copyright (C) 2012 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
25 // Thermal zone polling frequency: 10 seconds
28 // Thermal sampling period for passive cooling: 2 seconds
31 // Convert from Degrees C to 1/10 Kelvin for ACPI
34 Multiply (Arg0, 10, Local0)
37 Add (Local0, 2732, Local0)
42 // Threshold for OS to shutdown
43 Method (_CRT, 0, Serialized)
48 // Threshold for passive cooling
49 Method (_PSV, 0, Serialized)
54 // Processors used for passive cooling
55 Method (_PSL, 0, Serialized)
60 Method (_TMP, 0, Serialized)
62 // Get Temperature from TIN# set in NVS
63 Store (\_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0)
65 // Check for sensor not calibrated
66 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNCA)) {
70 // Check for sensor not present
71 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNPR)) {
75 // Check for sensor not powered
76 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNOP)) {
80 // Check for sensor bad reading
81 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TBAD)) {
85 // Adjust by offset to get Kelvin
86 Add (\_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0)
88 // Convert to 1/10 Kelvin
89 Multiply (Local0, 10, Local0)
95 If (LLessEqual (\FLVL, 0)) {
104 If (LLessEqual (\FLVL, 1)) {
105 Return (CTOK (\F1OF))
107 Return (CTOK (\F1ON))
111 Name (_AL0, Package () { TDP0 })
112 Name (_AL1, Package () { TDP1 })
114 PowerResource (TNP0, 0, 0)
117 If (LLessEqual (\FLVL, 0)) {
126 /* Enable Power Limit */
127 \_SB.PCI0.MCHC.CTLE (\F0PW)
129 Notify (\_TZ.THRM, 0x81)
134 /* Disable Power Limit */
135 \_SB.PCI0.MCHC.CTLD ()
137 Notify (\_TZ.THRM, 0x81)
141 PowerResource (TNP1, 0, 0)
144 If (LLessEqual (\FLVL, 1)) {
152 Notify (\_TZ.THRM, 0x81)
156 Notify (\_TZ.THRM, 0x81)
162 Name (_HID, EISAID ("PNP0C0B"))
164 Name (_PR0, Package () { TNP0 })
169 Name (_HID, EISAID ("PNP0C0B"))
171 Name (_PR0, Package () { TNP1 })