From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A59D081E0F for ; Tue, 17 Jan 2017 17:07:38 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 17 Jan 2017 17:07:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,247,1477983600"; d="scan'208";a="810132217" Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.8]) by FMSMGA003.fm.intel.com with SMTP; 17 Jan 2017 17:07:38 -0800 Date: Tue, 17 Jan 2017 16:47:35 -0800 From: lushifex CC: david.wei@intel.com; Sender: lushifex To: edk2-devel@lists.01.org Message-ID: X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Fixed thermal issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 01:07:38 -0000 Content-Type: text/plain; Fixed System auto shutdown when it reached minus 20 degree. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- 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