Add support for Intel Sandybridge CPU
[coreboot.git] / src / cpu / intel / model_206ax / acpi / cpu.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 The ChromiumOS Authors.  All rights reserved.
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.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
21
22 /* These devices are created at runtime */
23 External (\_PR.CPU0, DeviceObj)
24 External (\_PR.CPU1, DeviceObj)
25 External (\_PR.CPU2, DeviceObj)
26 External (\_PR.CPU3, DeviceObj)
27 External (\_PR.CPU4, DeviceObj)
28 External (\_PR.CPU5, DeviceObj)
29 External (\_PR.CPU6, DeviceObj)
30 External (\_PR.CPU7, DeviceObj)
31
32 /* Notify OS to re-read CPU tables, assuming ^2 CPU count */
33 Method (PNOT)
34 {
35         If (LGreaterEqual (\PCNT, 2)) {
36                 Notify (\_PR.CPU0, 0x80)  // _PPC
37                 Notify (\_PR.CPU0, 0x81)  // _CST
38                 Notify (\_PR.CPU1, 0x80)  // _PPC
39                 Notify (\_PR.CPU1, 0x81)  // _CST
40         }
41         If (LGreaterEqual (\PCNT, 4)) {
42                 Notify (\_PR.CPU2, 0x80)  // _PPC
43                 Notify (\_PR.CPU2, 0x81)  // _CST
44                 Notify (\_PR.CPU3, 0x80)  // _PPC
45                 Notify (\_PR.CPU3, 0x81)  // _CST
46         }
47         If (LGreaterEqual (\PCNT, 8)) {
48                 Notify (\_PR.CPU4, 0x80)  // _PPC
49                 Notify (\_PR.CPU4, 0x81)  // _CST
50                 Notify (\_PR.CPU5, 0x80)  // _PPC
51                 Notify (\_PR.CPU5, 0x81)  // _CST
52                 Notify (\_PR.CPU6, 0x80)  // _PPC
53                 Notify (\_PR.CPU6, 0x81)  // _CST
54                 Notify (\_PR.CPU7, 0x80)  // _PPC
55                 Notify (\_PR.CPU7, 0x81)  // _CST
56         }
57 }
58
59 /* Notify OS to re-read Throttle Limit tables, assuming ^2 CPU count */
60 Method (TNOT)
61 {
62         If (LGreaterEqual (\PCNT, 2)) {
63                 Notify (\_PR.CPU0, 0x82)  // _TPC
64                 Notify (\_PR.CPU1, 0x82)  // _TPC
65         }
66         If (LGreaterEqual (\PCNT, 4)) {
67                 Notify (\_PR.CPU2, 0x82)  // _TPC
68                 Notify (\_PR.CPU3, 0x82)  // _TPC
69         }
70         If (LGreaterEqual (\PCNT, 8)) {
71                 Notify (\_PR.CPU4, 0x82)  // _TPC
72                 Notify (\_PR.CPU5, 0x82)  // _TPC
73                 Notify (\_PR.CPU6, 0x82)  // _TPC
74                 Notify (\_PR.CPU7, 0x82)  // _TPC
75         }
76 }
77
78 /* Return a package containing enabled processor entries */
79 Method (PPKG)
80 {
81         If (LGreaterEqual (\PCNT, 8)) {
82                 Return (Package() {\_PR.CPU0, \_PR.CPU1, \_PR.CPU2, \_PR.CPU3,
83                                    \_PR.CPU4, \_PR.CPU5, \_PR.CPU6, \_PR.CPU7})
84         } ElseIf (LGreaterEqual (\PCNT, 4)) {
85                 Return (Package() {\_PR.CPU0, \_PR.CPU1, \_PR.CPU2, \_PR.CPU3})
86         } ElseIf (LGreaterEqual (\PCNT, 2)) {
87                 Return (Package() {\_PR.CPU0, \_PR.CPU1})
88         } Else {
89                 Return (Package() {\_PR.CPU0})
90         }
91 }