[edk2] [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Fixed thermal issue.

lushifex posted 1 patch 7 years, 8 months ago
Failed in applying to current master (apply log)
Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
[edk2] [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Fixed thermal issue.
Posted by lushifex 7 years, 8 months ago
Fixed System auto shutdown when it reached minus 20 degree.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
index e63f5bc..fecc040 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
@@ -5,7 +5,7 @@
 ;*    Family of Customer Reference Boards.                                *;
 ;*                                                                        *;
 ;*                                                                        *;
-;*    Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved   *;
+;*    Copyright (c)  1999  - 2017, Intel Corporation. All rights reserved   *;
 ;
 ; This program and the accompanying materials are licensed and made available under
 ; the terms and conditions of the BSD License that accompanies this distribution.
@@ -69,7 +69,12 @@ Scope(\_TZ)
         {
           Store(DTS1,Local0)
         }
-        Return(Add(2732,Multiply(Local0,10)))
+        If (LEqual(And(Local0, 0x80), 0)) {
+          Return(Add(2732,Multiply(Local0,10)))
+        } else {
+          Add(Subtract(255, Local0), 1, Local0)
+          Return(Subtract(2732,Multiply(Local0,10)))
+        }
         //
         // Else return a static value if both EC and DTS are unavailable.
         //
-- 
2.7.0.windows.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Fixed thermal issue.
Posted by Wei, David 7 years, 8 months ago
Reviewed-by: David Wei <david.wei@intel.com>

Thanks,
David  Wei                                 


-----Original Message-----
From: Lu, ShifeiX A 
Sent: Wednesday, February 08, 2017 1:08 PM
To: edk2-devel@lists.01.org
Cc: Wei, David <david.wei@intel.com>
Subject: [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Fixed thermal issue.

Fixed System auto shutdown when it reached minus 20 degree.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
index e63f5bc..fecc040 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
@@ -5,7 +5,7 @@
 ;*    Family of Customer Reference Boards.                                *;
 ;*                                                                        *;
 ;*                                                                        *;
-;*    Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved   *;
+;*    Copyright (c)  1999  - 2017, Intel Corporation. All rights reserved   *;
 ;
 ; This program and the accompanying materials are licensed and made available under
 ; the terms and conditions of the BSD License that accompanies this distribution.
@@ -69,7 +69,12 @@ Scope(\_TZ)
         {
           Store(DTS1,Local0)
         }
-        Return(Add(2732,Multiply(Local0,10)))
+        If (LEqual(And(Local0, 0x80), 0)) {
+          Return(Add(2732,Multiply(Local0,10)))
+        } else {
+          Add(Subtract(255, Local0), 1, Local0)
+          Return(Subtract(2732,Multiply(Local0,10)))
+        }
         //
         // Else return a static value if both EC and DTS are unavailable.
         //
-- 
2.7.0.windows.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel