<p>Peter Lemenkov has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/29659">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mb/lenovo: Unify thermal threshold handling<br><br>Unify thermal handling across Lenovo boards. Namely, do the following:<br><br>* Move thermal levels to thermal.h (and create if necessary).<br>* Don't use board-specific ifded guards.<br>* Set thermal levels using dedicated acpi_update_thermal_table function.<br>* Update list of authors in comments. Merge all author entries.<br>* Minor whitespace and formatting.<br><br>This makes diff -ruw between the Lenovo borders smaller.<br><br>Change-Id: If569f67c932b7fbf14893b890a5588df4994daeb<br>Signed-off-by: Peter Lemenkov <lemenkov@gmail.com><br>---<br>M src/mainboard/lenovo/l520/acpi_tables.c<br>M src/mainboard/lenovo/l520/thermal.h<br>M src/mainboard/lenovo/s230u/acpi_tables.c<br>A src/mainboard/lenovo/s230u/thermal.h<br>M src/mainboard/lenovo/t400/acpi_tables.c<br>A src/mainboard/lenovo/t400/thermal.h<br>M src/mainboard/lenovo/t420/thermal.h<br>M src/mainboard/lenovo/t420s/thermal.h<br>M src/mainboard/lenovo/t430/thermal.h<br>M src/mainboard/lenovo/t430s/thermal.h<br>M src/mainboard/lenovo/t520/acpi_tables.c<br>M src/mainboard/lenovo/t520/thermal.h<br>M src/mainboard/lenovo/t530/acpi_tables.c<br>M src/mainboard/lenovo/t530/thermal.h<br>M src/mainboard/lenovo/t60/acpi_tables.c<br>A src/mainboard/lenovo/t60/thermal.h<br>M src/mainboard/lenovo/x131e/thermal.h<br>M src/mainboard/lenovo/x1_carbon_gen1/thermal.h<br>M src/mainboard/lenovo/x200/acpi_tables.c<br>A src/mainboard/lenovo/x200/thermal.h<br>M src/mainboard/lenovo/x201/acpi_tables.c<br>A src/mainboard/lenovo/x201/thermal.h<br>M src/mainboard/lenovo/x220/thermal.h<br>M src/mainboard/lenovo/x230/thermal.h<br>M src/mainboard/lenovo/x60/acpi_tables.c<br>A src/mainboard/lenovo/x60/thermal.h<br>M src/mainboard/lenovo/z61t/acpi_tables.c<br>A src/mainboard/lenovo/z61t/thermal.h<br>28 files changed, 395 insertions(+), 112 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/29659/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/lenovo/l520/acpi_tables.c b/src/mainboard/lenovo/l520/acpi_tables.c</span><br><span>index b861864..31f41e7 100644</span><br><span>--- a/src/mainboard/lenovo/l520/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/l520/acpi_tables.c</span><br><span>@@ -35,7 +35,6 @@</span><br><span>     gnvs->s5u0 = 0;</span><br><span>   gnvs->s5u1 = 0;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>       // the lid is open by default.</span><br><span>       gnvs->lids = 1;</span><br><span> </span><br><span>diff --git a/src/mainboard/lenovo/l520/thermal.h b/src/mainboard/lenovo/l520/thermal.h</span><br><span>index a2007ff..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/l520/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/l520/thermal.h</span><br><span>@@ -2,7 +2,10 @@</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span>  * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span>  * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span>  * This program is free software; you can redistribute it and/or</span><br><span>  * modify it under the terms of the GNU General Public License as</span><br><span>@@ -15,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef L520_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define L520_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-     /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* L520_THERMAL_H */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/s230u/acpi_tables.c b/src/mainboard/lenovo/s230u/acpi_tables.c</span><br><span>index 21fce85..8d6d93f 100644</span><br><span>--- a/src/mainboard/lenovo/s230u/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/s230u/acpi_tables.c</span><br><span>@@ -14,6 +14,13 @@</span><br><span>  */</span><br><span> </span><br><span> #include <southbridge/intel/bd82x6x/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -28,6 +35,5 @@</span><br><span>    /* The LID is open by default */</span><br><span>     gnvs->lids = 1;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span>diff --git a/src/mainboard/lenovo/s230u/thermal.h b/src/mainboard/lenovo/s230u/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/s230u/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE      100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t400/acpi_tables.c b/src/mainboard/lenovo/t400/acpi_tables.c</span><br><span>index 2893d39..6645438 100644</span><br><span>--- a/src/mainboard/lenovo/t400/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/t400/acpi_tables.c</span><br><span>@@ -24,6 +24,13 @@</span><br><span> #include <device/pci.h></span><br><span> #include <device/pci_ids.h></span><br><span> #include <southbridge/intel/i82801ix/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -35,9 +42,7 @@</span><br><span>    gnvs->cmap = 0x01;</span><br><span>        gnvs->cmbp = 0x01;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Set thermal levels */</span><br><span style="color: hsl(0, 100%, 40%);">-        gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span> </span><br><span> unsigned long acpi_fill_madt(unsigned long current)</span><br><span>diff --git a/src/mainboard/lenovo/t400/thermal.h b/src/mainboard/lenovo/t400/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/t400/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE      100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t420/thermal.h b/src/mainboard/lenovo/t420/thermal.h</span><br><span>index 6ca5b2a..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/t420/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t420/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,8 +18,8 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef T420_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define T420_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span> /* Temperature which OS will shutdown at */</span><br><span> #define CRITICAL_TEMPERATURE       100</span><br><span>@@ -23,4 +27,4 @@</span><br><span> /* Temperature which OS will throttle CPU */</span><br><span> #define PASSIVE_TEMPERATURE  90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t420s/thermal.h b/src/mainboard/lenovo/t420s/thermal.h</span><br><span>index c7803e5..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/t420s/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t420s/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef T420S_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define T420S_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t430/thermal.h b/src/mainboard/lenovo/t430/thermal.h</span><br><span>index e3e49f5..6c1b41b 100644</span><br><span>--- a/src/mainboard/lenovo/t430/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t430/thermal.h</span><br><span>@@ -14,8 +14,8 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef _LENOVO_T430_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define _LENOVO_T430_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span> /* Config TDP Sensor ID */</span><br><span> #define CTDP_SENSOR_ID                     0 /* PECI */</span><br><span>@@ -37,4 +37,4 @@</span><br><span> /* Tj_max value for calculating PECI CPU temperature */</span><br><span> #define MAX_TEMPERATURE                  105</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t430s/thermal.h b/src/mainboard/lenovo/t430s/thermal.h</span><br><span>index 1d55584..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/t430s/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t430s/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,8 +18,8 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef T430S_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define T430S_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span> /* Temperature which OS will shutdown at */</span><br><span> #define CRITICAL_TEMPERATURE        100</span><br><span>@@ -23,4 +27,4 @@</span><br><span> /* Temperature which OS will throttle CPU */</span><br><span> #define PASSIVE_TEMPERATURE  90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* T430S_THERMAL_H */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t520/acpi_tables.c b/src/mainboard/lenovo/t520/acpi_tables.c</span><br><span>index a3b0894..279674d 100644</span><br><span>--- a/src/mainboard/lenovo/t520/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/t520/acpi_tables.c</span><br><span>@@ -32,7 +32,6 @@</span><br><span>    gnvs->s5u0 = 0;</span><br><span>   gnvs->s5u1 = 0;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>       // the lid is open by default.</span><br><span>       gnvs->lids = 1;</span><br><span> </span><br><span>diff --git a/src/mainboard/lenovo/t520/thermal.h b/src/mainboard/lenovo/t520/thermal.h</span><br><span>index 60721bf..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/t520/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t520/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef T520_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define T520_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* T520_THERMAL_H */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t530/acpi_tables.c b/src/mainboard/lenovo/t530/acpi_tables.c</span><br><span>index a3b0894..279674d 100644</span><br><span>--- a/src/mainboard/lenovo/t530/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/t530/acpi_tables.c</span><br><span>@@ -32,7 +32,6 @@</span><br><span>     gnvs->s5u0 = 0;</span><br><span>   gnvs->s5u1 = 0;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>       // the lid is open by default.</span><br><span>       gnvs->lids = 1;</span><br><span> </span><br><span>diff --git a/src/mainboard/lenovo/t530/thermal.h b/src/mainboard/lenovo/t530/thermal.h</span><br><span>index 0b24ea8..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/t530/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/t530/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef T530_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define T530_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* T530_THERMAL_H */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c</span><br><span>index 183b7fe..bd10a0e 100644</span><br><span>--- a/src/mainboard/lenovo/t60/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/t60/acpi_tables.c</span><br><span>@@ -16,6 +16,13 @@</span><br><span> </span><br><span> #include <stdint.h></span><br><span> #include <southbridge/intel/i82801gx/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -23,7 +30,5 @@</span><br><span>    gnvs->cmap = 0x01;</span><br><span>        gnvs->cmbp = 0x01;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Set thermal levels */</span><br><span style="color: hsl(0, 100%, 40%);">-        gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span>diff --git a/src/mainboard/lenovo/t60/thermal.h b/src/mainboard/lenovo/t60/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/t60/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x131e/thermal.h b/src/mainboard/lenovo/x131e/thermal.h</span><br><span>index ff92869..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/x131e/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/x131e/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span>  * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,15 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef X131E_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define X131E_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/* Active Thermal and fans are controlled by the EC. */</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span> /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-#define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE       100</span><br><span> </span><br><span> /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-#define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE  90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* X131E_THERMAL_H */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x1_carbon_gen1/thermal.h b/src/mainboard/lenovo/x1_carbon_gen1/thermal.h</span><br><span>index 199c27e..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/x1_carbon_gen1/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/x1_carbon_gen1/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef X230_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define X230_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x200/acpi_tables.c b/src/mainboard/lenovo/x200/acpi_tables.c</span><br><span>index 2893d39..6645438 100644</span><br><span>--- a/src/mainboard/lenovo/x200/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/x200/acpi_tables.c</span><br><span>@@ -24,6 +24,13 @@</span><br><span> #include <device/pci.h></span><br><span> #include <device/pci_ids.h></span><br><span> #include <southbridge/intel/i82801ix/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -35,9 +42,7 @@</span><br><span>    gnvs->cmap = 0x01;</span><br><span>        gnvs->cmbp = 0x01;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Set thermal levels */</span><br><span style="color: hsl(0, 100%, 40%);">-        gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span> </span><br><span> unsigned long acpi_fill_madt(unsigned long current)</span><br><span>diff --git a/src/mainboard/lenovo/x200/thermal.h b/src/mainboard/lenovo/x200/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/x200/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE      100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x201/acpi_tables.c b/src/mainboard/lenovo/x201/acpi_tables.c</span><br><span>index e412503..82991b2 100644</span><br><span>--- a/src/mainboard/lenovo/x201/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/x201/acpi_tables.c</span><br><span>@@ -17,10 +17,15 @@</span><br><span> </span><br><span> #include <stdint.h></span><br><span> #include <southbridge/intel/ibexpeak/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t * gnvs)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-  /* Set thermal levels */</span><br><span style="color: hsl(0, 100%, 40%);">-        gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span>diff --git a/src/mainboard/lenovo/x201/thermal.h b/src/mainboard/lenovo/x201/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/x201/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE 100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x220/thermal.h b/src/mainboard/lenovo/x220/thermal.h</span><br><span>index 82df303..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/x220/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/x220/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef X220_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define X220_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x230/thermal.h b/src/mainboard/lenovo/x230/thermal.h</span><br><span>index 199c27e..72953fd 100644</span><br><span>--- a/src/mainboard/lenovo/x230/thermal.h</span><br><span>+++ b/src/mainboard/lenovo/x230/thermal.h</span><br><span>@@ -1,12 +1,16 @@</span><br><span> /*</span><br><span>  * This file is part of the coreboot project.</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span>  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span>  * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span>  *</span><br><span>  * This program is distributed in the hope that it will be useful,</span><br><span>  * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span>@@ -14,13 +18,13 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef X230_THERMAL_H</span><br><span style="color: hsl(0, 100%, 40%);">-#define X230_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    /* Temperature which OS will shutdown at */</span><br><span style="color: hsl(0, 100%, 40%);">-     #define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE  100</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(0, 100%, 40%);">-    #define PASSIVE_TEMPERATURE     90</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE   90</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c</span><br><span>index 183b7fe..bd10a0e 100644</span><br><span>--- a/src/mainboard/lenovo/x60/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/x60/acpi_tables.c</span><br><span>@@ -16,6 +16,13 @@</span><br><span> </span><br><span> #include <stdint.h></span><br><span> #include <southbridge/intel/i82801gx/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -23,7 +30,5 @@</span><br><span>    gnvs->cmap = 0x01;</span><br><span>        gnvs->cmbp = 0x01;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Set thermal levels */</span><br><span style="color: hsl(0, 100%, 40%);">-        gnvs->tcrt = 100;</span><br><span style="color: hsl(0, 100%, 40%);">-    gnvs->tpsv = 90;</span><br><span style="color: hsl(120, 100%, 40%);">+   acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span>diff --git a/src/mainboard/lenovo/x60/thermal.h b/src/mainboard/lenovo/x60/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/x60/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE    100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span>diff --git a/src/mainboard/lenovo/z61t/acpi_tables.c b/src/mainboard/lenovo/z61t/acpi_tables.c</span><br><span>index 3e9a810..bd10a0e 100644</span><br><span>--- a/src/mainboard/lenovo/z61t/acpi_tables.c</span><br><span>+++ b/src/mainboard/lenovo/z61t/acpi_tables.c</span><br><span>@@ -16,6 +16,13 @@</span><br><span> </span><br><span> #include <stdint.h></span><br><span> #include <southbridge/intel/i82801gx/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "thermal.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void acpi_update_thermal_table(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    gnvs->tcrt = CRITICAL_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->tpsv = PASSIVE_TEMPERATURE;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span> {</span><br><span>@@ -23,4 +30,5 @@</span><br><span>    gnvs->cmap = 0x01;</span><br><span>        gnvs->cmbp = 0x01;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     acpi_update_thermal_table(gnvs);</span><br><span> }</span><br><span>diff --git a/src/mainboard/lenovo/z61t/thermal.h b/src/mainboard/lenovo/z61t/thermal.h</span><br><span>new file mode 100644</span><br><span>index 0000000..72953fd</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/lenovo/z61t/thermal.h</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2016 Patrick Rudolph  <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 James Ye <jye836@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_THERMAL_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will shutdown at */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CRITICAL_TEMPERATURE 100</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Temperature which OS will throttle CPU */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PASSIVE_TEMPERATURE        90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* MAINBOARD_THERMAL_H */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/29659">change 29659</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/29659"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If569f67c932b7fbf14893b890a5588df4994daeb </div>
<div style="display:none"> Gerrit-Change-Number: 29659 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Peter Lemenkov <lemenkov@gmail.com> </div>