THERMAL.ASL 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /**************************************************************************;
  2. ;* *;
  3. ;* *;
  4. ;* Intel Corporation - ACPI Reference Code for the Baytrail *;
  5. ;* Family of Customer Reference Boards. *;
  6. ;* *;
  7. ;* *;
  8. ;* Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved *;
  9. ;
  10. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  11. ;
  12. ;* *;
  13. ;* *;
  14. ;**************************************************************************/
  15. // THERMAL.ASL represents a Thermal Zone to be used for testing on the
  16. // Customer Reference Boards.
  17. External(\_SB.DPTF.CTOK, MethodObj)
  18. Scope(\_TZ)
  19. {
  20. // Thermal Zone 1 = DTS Thermal Zone.
  21. ThermalZone(TZ01)
  22. {
  23. // Return the temperature at which the OS must perform a Critcal
  24. // Shutdown.
  25. Method(_CRT,0,Serialized)
  26. {
  27. Return(Add(2732,Multiply(CRTT,10)))
  28. }
  29. // Notifies ASL Code the current cooling mode.
  30. // 0 - Active cooling
  31. // 1 - Passive cooling
  32. Method(_SCP,1,Serialized)
  33. {
  34. Store(Arg0,CTYP)
  35. }
  36. // _TMP (Temperature)
  37. //
  38. // Return the highest of the CPU temperatures to the OS.
  39. //
  40. // Arguments: (0)
  41. // None
  42. // Return Value:
  43. // An Integer containing the current temperature of the thermal zone (in tenths of degrees Kelvin)
  44. //
  45. Method(_TMP,0,Serialized)
  46. {
  47. If(DTSE)
  48. {
  49. If(LGreater(DTS2, DTS1))
  50. {
  51. Store(DTS2,Local0)
  52. } else
  53. {
  54. Store(DTS1,Local0)
  55. }
  56. If (LEqual(And(Local0, 0x80), 0)) {
  57. Return(Add(2732,Multiply(Local0,10)))
  58. } else {
  59. Add(Subtract(255, Local0), 1, Local0)
  60. Return(Subtract(2732,Multiply(Local0,10)))
  61. }
  62. //
  63. // Else return a static value if both EC and DTS are unavailable.
  64. //
  65. } Else
  66. {
  67. Return(3000) // (3000-2732)/10 = 26.8 degree C
  68. }
  69. }
  70. // Return the Processor(s) used for Passive Cooling.
  71. Method(_PSL,0,Serialized)
  72. {
  73. If(LEqual(MPEN, 4))
  74. {
  75. // CMP - Throttling controls all four logical CPUs.
  76. Return(Package() {\_PR.CPU0,\_PR.CPU1,\_PR.CPU2,\_PR.CPU3})
  77. }
  78. If(MPEN)
  79. {
  80. // CMP - Throttling controls both CPUs.
  81. Return(Package() {\_PR.CPU0,\_PR.CPU1})
  82. }
  83. Return(Package() {\_PR.CPU0})
  84. }
  85. // Returns the temperature at which the OS initiates CPU throttling.
  86. Method(_PSV,0,Serialized)
  87. {
  88. Return(Add(2732,Multiply(PSVT,10)))
  89. }
  90. // Returns TC1 value used in the passive cooling formula.
  91. Method(_TC1,0,Serialized)
  92. {
  93. Return(TC1V)
  94. }
  95. // Returns TC2 value used in the passive cooling formula.
  96. Method(_TC2,0,Serialized)
  97. {
  98. Return(TC2V)
  99. }
  100. // Returns the sampling period used in the passive cooling formula.
  101. Method(_TSP,0,Serialized)
  102. {
  103. Return(TSPV)
  104. }
  105. // Returns Hot Temperature
  106. Method(_HOT,0,Serialized)
  107. {
  108. Subtract(CRTT, 5, Local0)
  109. Return(Add(2732,Multiply(Local0,10)))
  110. }
  111. }
  112. }