[coreboot-gerrit] Change in coreboot[master]: ec/lenovo/h8/acpi/thermal: Don't hardcode limits

Patrick Rudolph (Code Review) gerrit at coreboot.org
Wed Aug 23 17:45:06 CEST 2017


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/21159


Change subject: ec/lenovo/h8/acpi/thermal: Don't hardcode limits
......................................................................

ec/lenovo/h8/acpi/thermal: Don't hardcode limits

Add support for board specific critical and passive
limits using GNVS table. Use default values if no
board specific limit exists.

* Add ACPI methods _TZP, _TSP and _PSV.
* Update ACPI method _CRT to use board specific if available.

Tested on Lenovo T500.

Change-Id: If438a909f4415f50cd7a764fb5fba7ec29599606
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/ec/lenovo/h8/acpi/thermal.asl
1 file changed, 25 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/21159/1

diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl
index 2e95b69..84e23f9 100644
--- a/src/ec/lenovo/h8/acpi/thermal.asl
+++ b/src/ec/lenovo/h8/acpi/thermal.asl
@@ -34,9 +34,28 @@
 
 	ThermalZone(THM0)
 	{
+		/* Thermal zone polling frequency: 10 seconds */
+		Name (_TZP, 100)
+
+		/* Thermal sampling period for passive cooling: 10 seconds */
+		Name (_TSP, 100)
+
 		Method(_CRT, 0, NotSerialized) {
+			Store (\TCRT, Local0)
+			if (LGreater(Local0, Zero)) {
+				Return (C2K(Local0))
+			}
 			Return (C2K(127))
 		}
+
+		Method(_PSV, 0, NotSerialized) {
+			Store (\TPSV, Local0)
+			if (LGreater(Local0, Zero)) {
+				Return (C2K(Local0))
+			}
+			Return (C2K(95))
+		}
+
 		Method(_TMP) {
 #if defined (EC_LENOVO_H8_ME_WORKAROUND)
 			/* Avoid tripping alarm if ME isn't booted at all yet */
@@ -51,6 +70,12 @@
 
 	ThermalZone(THM1)
 	{
+		/* Thermal zone polling frequency: 10 seconds */
+		Name (_TZP, 100)
+
+		/* Thermal sampling period for passive cooling: 10 seconds */
+		Name (_TSP, 100)
+
 		Method(_CRT, 0, NotSerialized) {
 			Return (C2K(99))
 		}

-- 
To view, visit https://review.coreboot.org/21159
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If438a909f4415f50cd7a764fb5fba7ec29599606
Gerrit-Change-Number: 21159
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170823/74f49140/attachment.html>


More information about the coreboot-gerrit mailing list