Vlv2DeviceRefCodePkg: Fixed thermal issue.
authorlushifex <shifeix.a.lu@intel.com>
Wed, 8 Feb 2017 02:42:35 +0000 (10:42 +0800)
committerGuo Mang <mang.guo@intel.com>
Wed, 8 Feb 2017 07:32:39 +0000 (15:32 +0800)
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>
Reviewed-by: David Wei <david.wei@intel.com>
Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL

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