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