diff options
-rw-r--r-- | src/mainboard/google/falco/acpi/thermal.asl | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/mainboard/google/falco/acpi/thermal.asl b/src/mainboard/google/falco/acpi/thermal.asl index 397f3eb556..a622d6cba6 100644 --- a/src/mainboard/google/falco/acpi/thermal.asl +++ b/src/mainboard/google/falco/acpi/thermal.asl @@ -75,7 +75,7 @@ Scope (\_TZ) Return (\PPKG ()) } - Method (_TMP, 0, Serialized) + Method (TCHK, 0, Serialized) { // Get Temperature from TIN# set in NVS Store (\_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0) @@ -107,5 +107,30 @@ Scope (\_TZ) Multiply (Local0, 10, Local0) Return (Local0) } + + Method (_TMP, 0, Serialized) + { + // Get temperature from EC in deci-kelvin + Store (TCHK (), Local0) + + // Critical temperature in deci-kelvin + Store (CTOK (\TCRT), Local1) + + If (LGreaterEqual (Local0, Local1)) { + Store ("CRITICAL TEMPERATURE", Debug) + Store (Local0, Debug) + + // Wait 1 second for EC to re-poll + Sleep (1000) + + // Re-read temperature from EC + Store (TCHK (), Local0) + + Store ("RE-READ TEMPERATURE", Debug) + Store (Local0, Debug) + } + + Return (Local0) + } } } |