summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-08-26 08:33:56 -0700
committerPatrick Georgi <patrick@georgi-clan.de>2014-08-04 09:32:20 +0200
commitcc6b924042a0ca1c2d46e05dbb98c15fd2730d47 (patch)
treeaa14281417ee02501a7c7fe320dfd80ad635c2c9 /src
parent1f68880e50a2b847838bbdc6916484f9fd86a681 (diff)
downloadcoreboot-cc6b924042a0ca1c2d46e05dbb98c15fd2730d47.tar.xz
falco: Re-read critical temperatures in ACPI _TMP
There seem to be a significant number of shutdowns during suspend resume tests related to critical temperatures. It is possible that we are getting a bad reading from PECI and shutting down prematurely in some cases. If we get a reading that is above critical then wait for the EC to re-poll and then re-check the temperature in case it was just a bad reading. Also add some ACPI debug messages when this happens. Original-Change-Id: I0ab7bdcc50d133981c0f36fc696b06d4a1d939a7 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/66937 Reviewed-by: Aaron Durbin <adurbin@chromium.org> (cherry picked from commit a39d7b11dd7b2af37fc2658542d56b32e3966ed4) Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Change-Id: Ib612266511d90749ec6507f8467c71523ee8fb95 Reviewed-on: https://chromium-review.googlesource.com/66939 Tested-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Duncan Laurie <dlaurie@chromium.org> (cherry picked from commit e98da983dca7819490464bddf08b9c53f28d2712) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6457 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/falco/acpi/thermal.asl27
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)
+ }
}
}