93bdbcfe6603921edd4d30784c9abeeec5538b32
[coreboot.git] / src / mainboard / getac / p470 / acpi / thermal.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2010 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; version 2 of
9  * the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
21
22 // Thermal Zone
23
24 Scope (\_TZ)
25 {
26         ThermalZone (THRM)
27         {
28                 // TODO These could/should be read from the
29                 // GNVS area, so they can be controlled by 
30                 // coreboot
31                 Name(TC1V, 0x00)
32                 Name(TC2V, 0x0a)
33                 Name(TSPV, 0x32)
34
35
36                 // Convert from °C to 1/10 Kelvin
37                 Method(DEGR, 1, NotSerialized)
38                 {
39                         Store(Arg0, Local0)
40                         // 10ths of degrees
41                         Multiply(Local0, 10, Local0)
42                         // 0°C is 273.15 K, we need to round it.
43                         Add(Local0, 2732, Local0)
44                         Return(Local0)
45                 }
46
47                 // At which temperature should the OS start
48                 // active cooling?
49                 Method (_AC0, 0, Serialized)
50                 {
51                         Return (0xf5c) // Value for Rocky
52                 }
53
54                 // Critical shutdown temperature
55                 Method (_CRT, 0, Serialized)
56                 {
57                         Store(\_SB.PCI0.LPCB.EC0.CRTT, Local0)
58                         Store(DEGR(Local0), Local0)
59                         Return(Local0)
60                 }
61
62                 // CPU throttling start temperature
63                 Method (_PSV, 0, Serialized)
64                 {
65                         Store(\_SB.PCI0.LPCB.EC0.CTRO, Local0)
66                         Store(DEGR(Local0), Local0)
67                         Return(Local0)
68                 }
69
70                 // Get DTS Temperature
71                 Method (_TMP, 0, Serialized)
72                 {
73                         Store(\_SB.PCI0.LPCB.EC0.CTMP, Local0)
74                         Store(DEGR(Local0), Local0)
75                         Return(Local0)
76                 }
77
78                 // Processors used for active cooling
79                 Method (_PSL, 0, Serialized)
80                 {
81                         If (MPEN) {
82                                 Return (Package() {\_PR.CPU0, \_PR.CPU1})
83                         }
84                         Return (Package() {\_PR.CPU0})
85                 }
86
87                 // TC1 value for passive cooling
88                 Method (_TC1, 0, Serialized)
89                 {
90                         Return (TC1V)
91                 }
92
93                 // TC2 value for passive cooling
94                 Method (_TC2, 0, Serialized)
95                 {
96                         Return (TC2V)
97                 }
98
99                 // Sampling period for passive cooling
100                 Method (_TSP, 0, Serialized)
101                 {
102                         Return (TSPV)
103                 }
104         }
105 }
106