VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/vbox-cpuhotplug.dsl@ 28345

Last change on this file since 28345 was 26613, checked in by vboxsync, 15 years ago

CPU hotplug: The container has to be there always (you can't remove a CPU socket, only the CPU) and the OSPM needs to check the CPU object not the container during a hot-plug event. Fixes Linux guests not detecting the new CPU after insertion if it was removed before

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.7 KB
Line 
1// $Id: vbox-cpuhotplug.dsl 26613 2010-02-17 15:01:47Z vboxsync $
2/// @file
3//
4// VirtualBox ACPI
5//
6// Copyright (C) 2006-2007 Sun Microsystems, Inc.
7//
8// This file is part of VirtualBox Open Source Edition (OSE), as
9// available from http://www.virtualbox.org. This file is free software;
10// you can redistribute it and/or modify it under the terms of the GNU
11// General Public License (GPL) as published by the Free Software
12// Foundation, in version 2 as it comes in the "COPYING" file of the
13// VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14// hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15//
16// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
17// Clara, CA 95054 USA or visit http://www.sun.com if you need
18// additional information or have any questions.
19
20DefinitionBlock ("SSDT-cpuhotplug.aml", "SSDT", 1, "VBOX ", "VBOXCPUT", 2)
21{
22 External(\_SB.CPUC)
23 External(\_SB.CPUL)
24 External(\_SB.CPEV)
25 External(\_SB.CPET)
26
27 // Method to check for the CPU status
28 Method(CPCK, 1)
29 {
30 Store (Arg0, \_SB.CPUC)
31 Return(LEqual(\_SB.CPUL, 0x01))
32 }
33
34 Scope (\_SB)
35 {
36
37#define GENERATE_CPU_OBJECT(id, sck, sckuid, cpu, cpuuid) \
38 Device (sck) \
39 { \
40 Name (_HID, "ACPI0004") \
41 Name (_UID, sckuid) \
42 \
43 \
44 Processor (cpu, /* Name */ \
45 id, /* Id */ \
46 0x0, /* Processor IO ports range start */ \
47 0x0 /* Processor IO ports range length */ \
48 ) \
49 { \
50 Name (_HID, "ACPI0007") \
51 Name (_UID, cpuuid) \
52 Name (_PXM, 0x00) \
53 \
54 Method(_MAT, 0) \
55 { \
56 IF (CPCK(id)) \
57 { \
58 Name (APIC, Buffer (8) {0x00, 0x08, id, id, 0x01}) \
59 Return(APIC) \
60 } \
61 Else \
62 { \
63 Return (0x00) \
64 } \
65 } \
66 Method(_STA) /* Used for device presence detection */ \
67 { \
68 IF (CPCK(id)) \
69 { \
70 Return (0xF) \
71 } \
72 Else \
73 { \
74 Return (0x0) \
75 } \
76 } \
77 Method(_EJ0, 1) \
78 { \
79 Store(id, \_SB.CPUL) /* Unlock the CPU */ \
80 Return \
81 } \
82 } \
83 } \
84
85 GENERATE_CPU_OBJECT(0x00, SCK0, "SCKCPU0", CPU0, "SCK0-CPU0")
86 GENERATE_CPU_OBJECT(0x01, SCK1, "SCKCPU1", CPU1, "SCK1-CPU0")
87 GENERATE_CPU_OBJECT(0x02, SCK2, "SCKCPU2", CPU2, "SCK2-CPU0")
88 GENERATE_CPU_OBJECT(0x03, SCK3, "SCKCPU3", CPU3, "SCK3-CPU0")
89 GENERATE_CPU_OBJECT(0x04, SCK4, "SCKCPU4", CPU4, "SCK4-CPU0")
90 GENERATE_CPU_OBJECT(0x05, SCK5, "SCKCPU5", CPU5, "SCK5-CPU0")
91 GENERATE_CPU_OBJECT(0x06, SCK6, "SCKCPU6", CPU6, "SCK6-CPU0")
92 GENERATE_CPU_OBJECT(0x07, SCK7, "SCKCPU7", CPU7, "SCK7-CPU0")
93 GENERATE_CPU_OBJECT(0x08, SCK8, "SCKCPU8", CPU8, "SCK8-CPU0")
94 GENERATE_CPU_OBJECT(0x09, SCK9, "SCKCPU9", CPU9, "SCK9-CPU0")
95 GENERATE_CPU_OBJECT(0x0a, SCKA, "SCKCPUA", CPUA, "SCKA-CPU0")
96 GENERATE_CPU_OBJECT(0x0b, SCKB, "SCKCPUB", CPUB, "SCKB-CPU0")
97 GENERATE_CPU_OBJECT(0x0c, SCKC, "SCKCPUC", CPUC, "SCKC-CPU0")
98 GENERATE_CPU_OBJECT(0x0d, SCKD, "SCKCPUD", CPUD, "SCKD-CPU0")
99 GENERATE_CPU_OBJECT(0x0e, SCKE, "SCKCPUE", CPUE, "SCKE-CPU0")
100 GENERATE_CPU_OBJECT(0x0f, SCKF, "SCKCPUF", CPUF, "SCKF-CPU0")
101 GENERATE_CPU_OBJECT(0x10, SCKG, "SCKCPUG", CPUG, "SCKG-CPU0")
102 GENERATE_CPU_OBJECT(0x11, SCKH, "SCKCPUH", CPUH, "SCKH-CPU0")
103 GENERATE_CPU_OBJECT(0x12, SCKI, "SCKCPUI", CPUI, "SCKI-CPU0")
104 GENERATE_CPU_OBJECT(0x13, SCKJ, "SCKCPUJ", CPUJ, "SCKJ-CPU0")
105 GENERATE_CPU_OBJECT(0x14, SCKK, "SCKCPUK", CPUK, "SCKK-CPU0")
106 GENERATE_CPU_OBJECT(0x15, SCKL, "SCKCPUL", CPUL, "SCKL-CPU0")
107 GENERATE_CPU_OBJECT(0x16, SCKM, "SCKCPUM", CPUM, "SCKM-CPU0")
108 GENERATE_CPU_OBJECT(0x17, SCKN, "SCKCPUN", CPUN, "SCKN-CPU0")
109 GENERATE_CPU_OBJECT(0x18, SCKO, "SCKCPUO", CPUO, "SCKO-CPU0")
110 GENERATE_CPU_OBJECT(0x19, SCKP, "SCKCPUP", CPUP, "SCKP-CPU0")
111 GENERATE_CPU_OBJECT(0x1a, SCKQ, "SCKCPUQ", CPUQ, "SCKQ-CPU0")
112 GENERATE_CPU_OBJECT(0x1b, SCKR, "SCKCPUR", CPUR, "SCKR-CPU0")
113 GENERATE_CPU_OBJECT(0x1c, SCKS, "SCKCPUS", CPUS, "SCKS-CPU0")
114 GENERATE_CPU_OBJECT(0x1d, SCKT, "SCKCPUT", CPUT, "SCKT-CPU0")
115 GENERATE_CPU_OBJECT(0x1e, SCKU, "SCKCPUU", CPUU, "SCKU-CPU0")
116 GENERATE_CPU_OBJECT(0x1f, SCKV, "SCKCPUV", CPUV, "SCKV-CPU0")
117
118#undef GENERATE_CPU_OBJECT
119 }
120
121 Scope (\_GPE)
122 {
123
124#define CHECK_CPU(cpu, sck, cpuname) \
125 IF (LEqual(Local0, cpu)) \
126 { \
127 Notify (\_SB.sck.cpuname, Local1) \
128 } \
129
130 // GPE bit 1 handler
131 // GPE.1 must be set and SCI raised when
132 // processor info changed and CPU must be
133 // re-evaluated
134 Method (_L01, 0, NotSerialized)
135 {
136 Store(\_SB.CPEV, Local0)
137 Store(\_SB.CPET, Local1)
138
139 CHECK_CPU(0x01, SCK1, CPU1)
140 CHECK_CPU(0x02, SCK2, CPU2)
141 CHECK_CPU(0x03, SCK3, CPU3)
142 CHECK_CPU(0x04, SCK4, CPU4)
143 CHECK_CPU(0x05, SCK5, CPU5)
144 CHECK_CPU(0x06, SCK6, CPU6)
145 CHECK_CPU(0x07, SCK7, CPU7)
146 CHECK_CPU(0x08, SCK8, CPU8)
147 CHECK_CPU(0x09, SCK9, CPU9)
148 CHECK_CPU(0x0a, SCKA, CPUA)
149 CHECK_CPU(0x0b, SCKB, CPUB)
150 CHECK_CPU(0x0c, SCKC, CPUC)
151 CHECK_CPU(0x0d, SCKD, CPUD)
152 CHECK_CPU(0x0e, SCKE, CPUE)
153 CHECK_CPU(0x0f, SCKF, CPUF)
154 CHECK_CPU(0x10, SCKG, CPUG)
155 CHECK_CPU(0x11, SCKH, CPUH)
156 CHECK_CPU(0x12, SCKI, CPUI)
157 CHECK_CPU(0x13, SCKJ, CPUJ)
158 CHECK_CPU(0x14, SCKK, CPUK)
159 CHECK_CPU(0x15, SCKL, CPUL)
160 CHECK_CPU(0x16, SCKM, CPUM)
161 CHECK_CPU(0x17, SCKN, CPUN)
162 CHECK_CPU(0x18, SCKO, CPUO)
163 CHECK_CPU(0x19, SCKP, CPUP)
164 CHECK_CPU(0x1a, SCKQ, CPUQ)
165 CHECK_CPU(0x1b, SCKR, CPUR)
166 CHECK_CPU(0x1c, SCKS, CPUS)
167 CHECK_CPU(0x1d, SCKT, CPUT)
168 CHECK_CPU(0x1e, SCKU, CPUU)
169 CHECK_CPU(0x1f, SCKV, CPUV)
170 }
171
172#undef CHECK_CPU
173 }
174
175}
176
177/*
178 * Local Variables:
179 * comment-start: "//"
180 * End:
181 */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette