2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
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
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.
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,
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)
32 /* Notify OS to re-read CPU tables, assuming ^2 CPU count */
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
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
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
59 /* Notify OS to re-read Throttle Limit tables, assuming ^2 CPU count */
62 If (LGreaterEqual (\PCNT, 2)) {
63 Notify (\_PR.CPU0, 0x82) // _TPC
64 Notify (\_PR.CPU1, 0x82) // _TPC
66 If (LGreaterEqual (\PCNT, 4)) {
67 Notify (\_PR.CPU2, 0x82) // _TPC
68 Notify (\_PR.CPU3, 0x82) // _TPC
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
78 /* Return a package containing enabled processor entries */
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})
89 Return (Package() {\_PR.CPU0})