2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 // Thermal zone polling frequency: 5 seconds
29 // Convert from Degrees C to 1/10 Kelvin for ACPI
32 Multiply (Arg0, 10, Local0)
35 Add (Local0, 2732, Local0)
40 // Threshold for OS to shutdown
41 Method (_CRT, 0, Serialized)
46 Method (_TMP, 0, Serialized)
48 // Get CPU Temperature from TIN9/PECI via EC
49 Store (\_SB.PCI0.LPCB.EC0.TIN9, Local0)
51 // Check for sensor not present
52 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNPR)) {
56 // Check for sensor not powered
57 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNOP)) {
61 // Check for sensor bad reading
62 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TBAD)) {
66 // Adjust by offset to get Kelvin
67 Add (\_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0)
69 // Convert to 1/10 Kelvin
70 Multiply (Local0, 10, Local0)
80 // Thermal zone polling frequency: 10 seconds
83 // Thermal sampling period for passive cooling: 2 seconds
86 // Convert from Degrees C to 1/10 Kelvin for ACPI
89 Multiply (Arg0, 10, Local0)
92 Add (Local0, 2732, Local0)
97 // Threshold for OS to shutdown
98 Method (_CRT, 0, Serialized)
100 Return (CTOK (\TCRT))
103 // Threshold for passive cooling
104 Method (_PSV, 0, Serialized)
106 Return (CTOK (\TPSV))
109 // Processors used for passive cooling
110 Method (_PSL, 0, Serialized)
115 Method (_TMP, 0, Serialized)
117 // Get Temperature from TIN# set in NVS
118 Store (\_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0)
120 // Check for sensor not present
121 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNPR)) {
125 // Check for sensor not powered
126 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNOP)) {
130 // Check for sensor bad reading
131 If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TBAD)) {
135 // Adjust by offset to get Kelvin
136 Add (\_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0)
138 // Convert to 1/10 Kelvin
139 Multiply (Local0, 10, Local0)
145 If (LLessEqual (\FLVL, 0)) {
146 Return (CTOK (\F0OF))
148 Return (CTOK (\F0ON))
154 If (LLessEqual (\FLVL, 1)) {
155 Return (CTOK (\F1OF))
157 Return (CTOK (\F1ON))
161 Name (_AL0, Package () { TDP0 })
162 Name (_AL1, Package () { TDP1 })
164 PowerResource (TNP0, 0, 0)
167 If (LLessEqual (\FLVL, 0)) {
175 \_SB.PCI0.MCHC.STND ()
176 Notify (\_TZ.THRM, 0x81)
180 \_SB.PCI0.MCHC.STDN ()
181 Notify (\_TZ.THRM, 0x81)
185 PowerResource (TNP1, 0, 0)
188 If (LLessEqual (\FLVL, 1)) {
196 Notify (\_TZ.THRM, 0x81)
200 Notify (\_TZ.THRM, 0x81)
206 Name (_HID, EISAID ("PNP0C0B"))
208 Name (_PR0, Package () { TNP0 })
213 Name (_HID, EISAID ("PNP0C0B"))
215 Name (_PR0, Package () { TNP1 })