]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
EdkCompatibilityPkg: Fix some typos of "according"
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / THERMAL.ASL
CommitLineData
3cbfba02
DW
1/**************************************************************************;\r
2;* *;\r
3;* *;\r
4;* Intel Corporation - ACPI Reference Code for the Baytrail *;\r
5;* Family of Customer Reference Boards. *;\r
6;* *;\r
7;* *;\r
8;* Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved *;\r
9;\r
10; This program and the accompanying materials are licensed and made available under\r
11; the terms and conditions of the BSD License that accompanies this distribution.\r
12; The full text of the license may be found at\r
13; http://opensource.org/licenses/bsd-license.php.\r
14;\r
15; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
16; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
17;\r
18;* *;\r
19;* *;\r
20;**************************************************************************/\r
21\r
22\r
23// THERMAL.ASL represents a Thermal Zone to be used for testing on the\r
24// Customer Reference Boards.\r
25\r
26External(\_SB.DPTF.CTOK, MethodObj)\r
27\r
28Scope(\_TZ)\r
29{\r
30\r
31 // Thermal Zone 1 = DTS Thermal Zone.\r
32\r
33 ThermalZone(TZ01)\r
34 {\r
35 // Return the temperature at which the OS must perform a Critcal\r
36 // Shutdown.\r
37\r
38 Method(_CRT,0,Serialized)\r
39 {\r
40 Return(Add(2732,Multiply(CRTT,10)))\r
41 }\r
42\r
43 // Notifies ASL Code the current cooling mode.\r
44 // 0 - Active cooling\r
45 // 1 - Passive cooling\r
46\r
47 Method(_SCP,1,Serialized)\r
48 {\r
49 Store(Arg0,CTYP)\r
50 }\r
51\r
52 // _TMP (Temperature)\r
53 //\r
54 // Return the highest of the CPU temperatures to the OS.\r
55 //\r
56 // Arguments: (0)\r
57 // None\r
58 // Return Value:\r
59 // An Integer containing the current temperature of the thermal zone (in tenths of degrees Kelvin)\r
60 //\r
61 Method(_TMP,0,Serialized)\r
62 {\r
63 If(DTSE)\r
64 {\r
65 If(LGreater(DTS2, DTS1))\r
66 {\r
67 Store(DTS2,Local0)\r
68 } else\r
69 {\r
70 Store(DTS1,Local0)\r
71 }\r
72 Return(Add(2732,Multiply(Local0,10)))\r
73 //\r
74 // Else return a static value if both EC and DTS are unavailable.\r
75 //\r
76 } Else\r
77 {\r
78 Return(3000) // (3000-2732)/10 = 26.8 degree C\r
79 }\r
80 }\r
81\r
82 // Return the Processor(s) used for Passive Cooling.\r
83\r
84 Method(_PSL,0,Serialized)\r
85 {\r
86 If(LEqual(MPEN, 4))\r
87 {\r
88 // CMP - Throttling controls all four logical CPUs.\r
89 Return(Package() {\_PR.CPU0,\_PR.CPU1,\_PR.CPU2,\_PR.CPU3})\r
90 }\r
91\r
92 If(MPEN)\r
93 {\r
94 // CMP - Throttling controls both CPUs.\r
95\r
96 Return(Package() {\_PR.CPU0,\_PR.CPU1})\r
97 }\r
98\r
99 Return(Package() {\_PR.CPU0})\r
100 }\r
101\r
102 // Returns the temperature at which the OS initiates CPU throttling.\r
103\r
104 Method(_PSV,0,Serialized)\r
105 {\r
106 Return(Add(2732,Multiply(PSVT,10)))\r
107 }\r
108\r
109 // Returns TC1 value used in the passive cooling formula.\r
110\r
111 Method(_TC1,0,Serialized)\r
112 {\r
113 Return(TC1V)\r
114 }\r
115\r
116 // Returns TC2 value used in the passive cooling formula.\r
117\r
118 Method(_TC2,0,Serialized)\r
119 {\r
120 Return(TC2V)\r
121 }\r
122\r
123 // Returns the sampling period used in the passive cooling formula.\r
124\r
125 Method(_TSP,0,Serialized)\r
126 {\r
127 Return(TSPV)\r
128 }\r
129\r
130 // Returns Hot Temperature\r
131\r
132 Method(_HOT,0,Serialized)\r
133 {\r
134 Subtract(CRTT, 5, Local0)\r
135 Return(Add(2732,Multiply(Local0,10)))\r
136 }\r
137 }\r
138}\r