1 /* SPDX-License-Identifier: GPL-2.0-only */
5 External (\PPKG, MethodObj)
7 #define HAVE_THERMALZONE
10 // Handler for throttle requests on this platform
11 // 0 = Stop throttling
12 // 1 = Start throttling
13 Method (THRT, 1, Serialized)
16 /* Disable Power Limit */
17 \_SB.PCI0.MCHC.CTLD ()
19 /* Enable Power Limit */
20 \_SB.PCI0.MCHC.CTLE (\F0PW)
29 // Thermal zone polling frequency: 10 seconds
32 // Thermal sampling period for passive cooling: 2 seconds
35 // Convert from Degrees C to 1/10 Kelvin for ACPI
46 // Threshold for OS to shutdown
47 Method (_CRT, 0, Serialized)
52 // Threshold for passive cooling
53 Method (_PSV, 0, Serialized)
58 // Processors used for passive cooling
59 Method (_PSL, 0, Serialized)
64 Method (TCHK, 0, Serialized)
66 // Get Temperature from TIN# set in NVS
67 Local0 = \_SB.PCI0.LPCB.EC0.TINS (TMPS)
69 // Check for sensor not calibrated
70 If (Local0 == \_SB.PCI0.LPCB.EC0.TNCA) {
74 // Check for sensor not present
75 If (Local0 == \_SB.PCI0.LPCB.EC0.TNPR) {
79 // Check for sensor not powered
80 If (Local0 == \_SB.PCI0.LPCB.EC0.TNOP) {
84 // Check for sensor bad reading
85 If (Local0 == \_SB.PCI0.LPCB.EC0.TBAD) {
89 // Adjust by offset to get Kelvin
90 Local0 += \_SB.PCI0.LPCB.EC0.TOFS
92 // Convert to 1/10 Kelvin
97 Method (_TMP, 0, Serialized)
99 // Get temperature from EC in deci-kelvin
102 // Critical temperature in deci-kelvin
103 Local1 = CTOK (\TCRT)
105 If (Local0 >= Local1) {
106 Printf ("CRITICAL TEMPERATURE: %o", Local0)
108 // Wait 1 second for EC to re-poll
111 // Re-read temperature from EC
114 Printf ("RE-READ TEMPERATURE: %o", Local0)