Vlv2DeviceRefCodePkg: Fixed thermal issue.
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / THERMAL.ASL
index e63f5bc..fecc040 100644 (file)
@@ -5,7 +5,7 @@
 ;*    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
@@ -69,7 +69,12 @@ Scope(\_TZ)
         {\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