summaryrefslogtreecommitdiff
path: root/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
diff options
context:
space:
mode:
authorDavid Wei <david.wei@intel.com>2015-01-12 09:37:20 +0000
committerzwei4 <zwei4@Edk2>2015-01-12 09:37:20 +0000
commit3cbfba02fef9dae07a041fdbf2e89611d72d6f90 (patch)
tree0b3bf0783124d38a191e09736492c0141aa36c15 /Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
parent6f785cfcc304c48ec04e542ee429df95e7b51bc5 (diff)
downloadedk2-platforms-3cbfba02fef9dae07a041fdbf2e89611d72d6f90.tar.xz
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
https://svn.code.sf.net/p/edk2/code/trunk/edk2/, which are for MinnowBoard MAX open source project. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Wei <david.wei@intel.com> Reviewed-by: Mike Wu <mike.wu@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16599 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL')
-rw-r--r--Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL138
1 files changed, 138 insertions, 0 deletions
diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
new file mode 100644
index 0000000000..e63f5bc69d
--- /dev/null
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/THERMAL.ASL
@@ -0,0 +1,138 @@
+/**************************************************************************;
+;* *;
+;* *;
+;* Intel Corporation - ACPI Reference Code for the Baytrail *;
+;* Family of Customer Reference Boards. *;
+;* *;
+;* *;
+;* Copyright (c) 1999 - 2014, 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.
+; The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php.
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;* *;
+;* *;
+;**************************************************************************/
+
+
+// THERMAL.ASL represents a Thermal Zone to be used for testing on the
+// Customer Reference Boards.
+
+External(\_SB.DPTF.CTOK, MethodObj)
+
+Scope(\_TZ)
+{
+
+ // Thermal Zone 1 = DTS Thermal Zone.
+
+ ThermalZone(TZ01)
+ {
+ // Return the temperature at which the OS must perform a Critcal
+ // Shutdown.
+
+ Method(_CRT,0,Serialized)
+ {
+ Return(Add(2732,Multiply(CRTT,10)))
+ }
+
+ // Notifies ASL Code the current cooling mode.
+ // 0 - Active cooling
+ // 1 - Passive cooling
+
+ Method(_SCP,1,Serialized)
+ {
+ Store(Arg0,CTYP)
+ }
+
+ // _TMP (Temperature)
+ //
+ // Return the highest of the CPU temperatures to the OS.
+ //
+ // Arguments: (0)
+ // None
+ // Return Value:
+ // An Integer containing the current temperature of the thermal zone (in tenths of degrees Kelvin)
+ //
+ Method(_TMP,0,Serialized)
+ {
+ If(DTSE)
+ {
+ If(LGreater(DTS2, DTS1))
+ {
+ Store(DTS2,Local0)
+ } else
+ {
+ Store(DTS1,Local0)
+ }
+ Return(Add(2732,Multiply(Local0,10)))
+ //
+ // Else return a static value if both EC and DTS are unavailable.
+ //
+ } Else
+ {
+ Return(3000) // (3000-2732)/10 = 26.8 degree C
+ }
+ }
+
+ // Return the Processor(s) used for Passive Cooling.
+
+ Method(_PSL,0,Serialized)
+ {
+ If(LEqual(MPEN, 4))
+ {
+ // CMP - Throttling controls all four logical CPUs.
+ Return(Package() {\_PR.CPU0,\_PR.CPU1,\_PR.CPU2,\_PR.CPU3})
+ }
+
+ If(MPEN)
+ {
+ // CMP - Throttling controls both CPUs.
+
+ Return(Package() {\_PR.CPU0,\_PR.CPU1})
+ }
+
+ Return(Package() {\_PR.CPU0})
+ }
+
+ // Returns the temperature at which the OS initiates CPU throttling.
+
+ Method(_PSV,0,Serialized)
+ {
+ Return(Add(2732,Multiply(PSVT,10)))
+ }
+
+ // Returns TC1 value used in the passive cooling formula.
+
+ Method(_TC1,0,Serialized)
+ {
+ Return(TC1V)
+ }
+
+ // Returns TC2 value used in the passive cooling formula.
+
+ Method(_TC2,0,Serialized)
+ {
+ Return(TC2V)
+ }
+
+ // Returns the sampling period used in the passive cooling formula.
+
+ Method(_TSP,0,Serialized)
+ {
+ Return(TSPV)
+ }
+
+ // Returns Hot Temperature
+
+ Method(_HOT,0,Serialized)
+ {
+ Subtract(CRTT, 5, Local0)
+ Return(Add(2732,Multiply(Local0,10)))
+ }
+ }
+}