Stefan Reinauer | 7cfa7f9 | 2010-05-16 14:24:41 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2010 coresystems GmbH |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; version 2 of |
| 9 | * the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Stefan Reinauer | 7cfa7f9 | 2010-05-16 14:24:41 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | // Thermal Zone |
| 18 | |
| 19 | Scope (\_TZ) |
| 20 | { |
| 21 | ThermalZone (THRM) |
| 22 | { |
| 23 | // TODO These could/should be read from the |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 24 | // GNVS area, so they can be controlled by |
Stefan Reinauer | 7cfa7f9 | 2010-05-16 14:24:41 +0000 | [diff] [blame] | 25 | // coreboot |
| 26 | Name(TC1V, 0x00) |
| 27 | Name(TC2V, 0x0a) |
| 28 | Name(TSPV, 0x32) |
| 29 | |
| 30 | |
| 31 | // Convert from °C to 1/10 Kelvin |
| 32 | Method(DEGR, 1, NotSerialized) |
| 33 | { |
| 34 | Store(Arg0, Local0) |
| 35 | // 10ths of degrees |
| 36 | Multiply(Local0, 10, Local0) |
| 37 | // 0°C is 273.15 K, we need to round it. |
| 38 | Add(Local0, 2732, Local0) |
| 39 | Return(Local0) |
| 40 | } |
| 41 | |
| 42 | // At which temperature should the OS start |
| 43 | // active cooling? |
| 44 | Method (_AC0, 0, Serialized) |
| 45 | { |
| 46 | Return (0xf5c) // Value for Rocky |
| 47 | } |
| 48 | |
| 49 | // Critical shutdown temperature |
| 50 | Method (_CRT, 0, Serialized) |
| 51 | { |
| 52 | Store(\_SB.PCI0.LPCB.EC0.CRTT, Local0) |
| 53 | Store(DEGR(Local0), Local0) |
| 54 | Return(Local0) |
| 55 | } |
| 56 | |
| 57 | // CPU throttling start temperature |
| 58 | Method (_PSV, 0, Serialized) |
| 59 | { |
| 60 | Store(\_SB.PCI0.LPCB.EC0.CTRO, Local0) |
| 61 | Store(DEGR(Local0), Local0) |
| 62 | Return(Local0) |
| 63 | } |
| 64 | |
| 65 | // Get DTS Temperature |
| 66 | Method (_TMP, 0, Serialized) |
| 67 | { |
| 68 | Store(\_SB.PCI0.LPCB.EC0.CTMP, Local0) |
| 69 | Store(DEGR(Local0), Local0) |
| 70 | Return(Local0) |
| 71 | } |
| 72 | |
| 73 | // Processors used for active cooling |
| 74 | Method (_PSL, 0, Serialized) |
| 75 | { |
| 76 | If (MPEN) { |
Timothy Pearson | 033bb4b | 2015-02-10 22:21:39 -0600 | [diff] [blame] | 77 | Return (Package() {\_PR.CP00, \_PR.CP01}) |
Stefan Reinauer | 7cfa7f9 | 2010-05-16 14:24:41 +0000 | [diff] [blame] | 78 | } |
Timothy Pearson | 033bb4b | 2015-02-10 22:21:39 -0600 | [diff] [blame] | 79 | Return (Package() {\_PR.CP00}) |
Stefan Reinauer | 7cfa7f9 | 2010-05-16 14:24:41 +0000 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | // TC1 value for passive cooling |
| 83 | Method (_TC1, 0, Serialized) |
| 84 | { |
| 85 | Return (TC1V) |
| 86 | } |
| 87 | |
| 88 | // TC2 value for passive cooling |
| 89 | Method (_TC2, 0, Serialized) |
| 90 | { |
| 91 | Return (TC2V) |
| 92 | } |
| 93 | |
| 94 | // Sampling period for passive cooling |
| 95 | Method (_TSP, 0, Serialized) |
| 96 | { |
| 97 | Return (TSPV) |
| 98 | } |
| 99 | } |
| 100 | } |