|
|
1.1 root 1: /*
2: * Bochs/QEMU ACPI DSDT ASL definition
3: *
4: * Copyright (c) 2006 Fabrice Bellard
5: *
6: * This library is free software; you can redistribute it and/or
7: * modify it under the terms of the GNU Lesser General Public
8: * License version 2 as published by the Free Software Foundation.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
1.1.1.6 ! root 19:
! 20: ACPI_EXTRACT_ALL_CODE AmlCode
! 21:
1.1 root 22: DefinitionBlock (
23: "acpi-dsdt.aml", // Output Filename
24: "DSDT", // Signature
25: 0x01, // DSDT Compliance Revision
26: "BXPC", // OEMID
27: "BXDSDT", // TABLE ID
28: 0x1 // OEM Revision
29: )
30: {
1.1.1.6 ! root 31:
! 32:
! 33: /****************************************************************
! 34: * Debugging
! 35: ****************************************************************/
! 36:
1.1 root 37: Scope (\)
38: {
39: /* Debug Output */
1.1.1.4 root 40: OperationRegion (DBG, SystemIO, 0x0402, 0x01)
41: Field (DBG, ByteAcc, NoLock, Preserve)
1.1 root 42: {
1.1.1.4 root 43: DBGB, 8,
1.1 root 44: }
45:
1.1.1.4 root 46: /* Debug method - use this method to send output to the QEMU
47: * BIOS debug port. This method handles strings, integers,
48: * and buffers. For example: DBUG("abc") DBUG(0x123) */
49: Method(DBUG, 1) {
50: ToHexString(Arg0, Local0)
51: ToBuffer(Local0, Local0)
52: Subtract(SizeOf(Local0), 1, Local1)
53: Store(Zero, Local2)
54: While (LLess(Local2, Local1)) {
55: Store(DerefOf(Index(Local0, Local2)), DBGB)
56: Increment(Local2)
57: }
58: Store(0x0A, DBGB)
59: }
60: }
1.1 root 61:
1.1.1.6 ! root 62:
! 63: /****************************************************************
! 64: * PCI Bus definition
! 65: ****************************************************************/
! 66:
1.1 root 67: Scope(\_SB) {
68: Device(PCI0) {
69: Name (_HID, EisaId ("PNP0A03"))
70: Name (_ADR, 0x00)
71: Name (_UID, 1)
72: Name(_PRT, Package() {
73: /* PCI IRQ routing table, example from ACPI 2.0a specification,
74: section 6.2.8.1 */
75: /* Note: we provide the same info as the PCI routing
76: table of the Bochs BIOS */
77: #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
78: Package() { nr##ffff, 0, lnk0, 0 }, \
79: Package() { nr##ffff, 1, lnk1, 0 }, \
80: Package() { nr##ffff, 2, lnk2, 0 }, \
81: Package() { nr##ffff, 3, lnk3, 0 }
82:
83: #define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
84: #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
85: #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
86: #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
87: prt_slot0(0x0000),
1.1.1.2 root 88: /* Device 1 is power mgmt device, and can only use irq 9 */
1.1.1.6 ! root 89: prt_slot(0x0001, LNKS, LNKB, LNKC, LNKD),
1.1 root 90: prt_slot2(0x0002),
91: prt_slot3(0x0003),
92: prt_slot0(0x0004),
93: prt_slot1(0x0005),
94: prt_slot2(0x0006),
95: prt_slot3(0x0007),
96: prt_slot0(0x0008),
97: prt_slot1(0x0009),
98: prt_slot2(0x000a),
99: prt_slot3(0x000b),
100: prt_slot0(0x000c),
101: prt_slot1(0x000d),
102: prt_slot2(0x000e),
103: prt_slot3(0x000f),
104: prt_slot0(0x0010),
105: prt_slot1(0x0011),
106: prt_slot2(0x0012),
107: prt_slot3(0x0013),
108: prt_slot0(0x0014),
109: prt_slot1(0x0015),
110: prt_slot2(0x0016),
111: prt_slot3(0x0017),
112: prt_slot0(0x0018),
113: prt_slot1(0x0019),
114: prt_slot2(0x001a),
115: prt_slot3(0x001b),
116: prt_slot0(0x001c),
117: prt_slot1(0x001d),
118: prt_slot2(0x001e),
119: prt_slot3(0x001f),
120: })
121:
122: OperationRegion(PCST, SystemIO, 0xae00, 0x08)
123: Field (PCST, DWordAcc, NoLock, WriteAsZeros)
124: {
125: PCIU, 32,
126: PCID, 32,
127: }
128:
129: OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
130: Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
131: {
132: B0EJ, 32,
133: }
134:
135: Name (_CRS, ResourceTemplate ()
136: {
137: WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
138: 0x0000, // Address Space Granularity
139: 0x0000, // Address Range Minimum
140: 0x00FF, // Address Range Maximum
141: 0x0000, // Address Translation Offset
142: 0x0100, // Address Length
143: ,, )
144: IO (Decode16,
145: 0x0CF8, // Address Range Minimum
146: 0x0CF8, // Address Range Maximum
147: 0x01, // Address Alignment
148: 0x08, // Address Length
149: )
150: WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
151: 0x0000, // Address Space Granularity
152: 0x0000, // Address Range Minimum
153: 0x0CF7, // Address Range Maximum
154: 0x0000, // Address Translation Offset
155: 0x0CF8, // Address Length
156: ,, , TypeStatic)
157: WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
158: 0x0000, // Address Space Granularity
159: 0x0D00, // Address Range Minimum
160: 0xFFFF, // Address Range Maximum
161: 0x0000, // Address Translation Offset
162: 0xF300, // Address Length
163: ,, , TypeStatic)
164: DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
165: 0x00000000, // Address Space Granularity
166: 0x000A0000, // Address Range Minimum
167: 0x000BFFFF, // Address Range Maximum
168: 0x00000000, // Address Translation Offset
169: 0x00020000, // Address Length
170: ,, , AddressRangeMemory, TypeStatic)
171: DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
172: 0x00000000, // Address Space Granularity
173: 0xE0000000, // Address Range Minimum
174: 0xFEBFFFFF, // Address Range Maximum
175: 0x00000000, // Address Translation Offset
176: 0x1EC00000, // Address Length
177: ,, , AddressRangeMemory, TypeStatic)
178: })
179: }
1.1.1.6 ! root 180: }
! 181:
! 182:
! 183: /****************************************************************
! 184: * HPET
! 185: ****************************************************************/
1.1 root 186:
1.1.1.6 ! root 187: Scope(\_SB) {
1.1 root 188: Device(HPET) {
189: Name(_HID, EISAID("PNP0103"))
190: Name(_UID, 0)
1.1.1.6 ! root 191: OperationRegion(HPTM, SystemMemory , 0xFED00000, 0x400)
! 192: Field(HPTM, DWordAcc, Lock, Preserve) {
! 193: VEND, 32,
! 194: PRD, 32,
! 195: }
1.1 root 196: Method (_STA, 0, NotSerialized) {
1.1.1.6 ! root 197: Store (VEND, Local0)
! 198: Store (PRD, Local1)
! 199: ShiftRight(Local0, 16, Local0)
! 200: If (LOr (LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
! 201: Return (0x0)
! 202: }
! 203: If (LOr (LEqual(Local1, 0), LGreater(Local1, 100000000))) {
! 204: Return (0x0)
! 205: }
! 206: Return (0x0F)
1.1 root 207: }
208: Name(_CRS, ResourceTemplate() {
209: DWordMemory(
210: ResourceConsumer, PosDecode, MinFixed, MaxFixed,
211: NonCacheable, ReadWrite,
212: 0x00000000,
213: 0xFED00000,
214: 0xFED003FF,
215: 0x00000000,
216: 0x00000400 /* 1K memory: FED00000 - FED003FF */
217: )
218: })
219: }
220: }
221:
1.1.1.6 ! root 222:
! 223: /****************************************************************
! 224: * VGA
! 225: ****************************************************************/
! 226:
1.1 root 227: Scope(\_SB.PCI0) {
228: Device (VGA) {
229: Name (_ADR, 0x00020000)
1.1.1.5 root 230: OperationRegion(PCIC, PCI_Config, Zero, 0x4)
231: Field(PCIC, DWordAcc, NoLock, Preserve) {
232: VEND, 32
233: }
1.1 root 234: Method (_S1D, 0, NotSerialized)
235: {
236: Return (0x00)
237: }
238: Method (_S2D, 0, NotSerialized)
239: {
240: Return (0x00)
241: }
242: Method (_S3D, 0, NotSerialized)
243: {
1.1.1.5 root 244: If (LEqual(VEND, 0x1001b36)) {
245: Return (0x03) // QXL
246: } Else {
247: Return (0x00)
248: }
1.1 root 249: }
250: }
1.1.1.6 ! root 251: }
1.1 root 252:
1.1.1.6 ! root 253:
! 254: /****************************************************************
! 255: * PIIX3 ISA bridge
! 256: ****************************************************************/
! 257:
! 258: Scope(\_SB.PCI0) {
1.1 root 259: Device (ISA) {
260: Name (_ADR, 0x00010000)
261:
262: /* PIIX PCI to ISA irq remapping */
263: OperationRegion (P40C, PCI_Config, 0x60, 0x04)
1.1.1.6 ! root 264: }
! 265: }
! 266:
! 267:
! 268: /****************************************************************
! 269: * SuperIO devices (kbd, mouse, etc.)
! 270: ****************************************************************/
1.1 root 271:
1.1.1.6 ! root 272: Scope(\_SB.PCI0.ISA) {
1.1 root 273: /* Real-time clock */
274: Device (RTC)
275: {
276: Name (_HID, EisaId ("PNP0B00"))
277: Name (_CRS, ResourceTemplate ()
278: {
279: IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
280: IRQNoFlags () {8}
281: IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
282: })
283: }
284:
285: /* Keyboard seems to be important for WinXP install */
286: Device (KBD)
287: {
288: Name (_HID, EisaId ("PNP0303"))
289: Method (_STA, 0, NotSerialized)
290: {
291: Return (0x0f)
292: }
293:
294: Method (_CRS, 0, NotSerialized)
295: {
296: Name (TMP, ResourceTemplate ()
297: {
298: IO (Decode16,
299: 0x0060, // Address Range Minimum
300: 0x0060, // Address Range Maximum
301: 0x01, // Address Alignment
302: 0x01, // Address Length
303: )
304: IO (Decode16,
305: 0x0064, // Address Range Minimum
306: 0x0064, // Address Range Maximum
307: 0x01, // Address Alignment
308: 0x01, // Address Length
309: )
310: IRQNoFlags ()
311: {1}
312: })
313: Return (TMP)
314: }
315: }
316:
317: /* PS/2 mouse */
318: Device (MOU)
319: {
320: Name (_HID, EisaId ("PNP0F13"))
321: Method (_STA, 0, NotSerialized)
322: {
323: Return (0x0f)
324: }
325:
326: Method (_CRS, 0, NotSerialized)
327: {
328: Name (TMP, ResourceTemplate ()
329: {
330: IRQNoFlags () {12}
331: })
332: Return (TMP)
333: }
334: }
335:
336: /* PS/2 floppy controller */
337: Device (FDC0)
338: {
339: Name (_HID, EisaId ("PNP0700"))
340: Method (_STA, 0, NotSerialized)
341: {
342: Return (0x0F)
343: }
344: Method (_CRS, 0, NotSerialized)
345: {
346: Name (BUF0, ResourceTemplate ()
347: {
348: IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
349: IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
350: IRQNoFlags () {6}
351: DMA (Compatibility, NotBusMaster, Transfer8) {2}
352: })
353: Return (BUF0)
354: }
355: }
356:
357: /* Parallel port */
358: Device (LPT)
359: {
360: Name (_HID, EisaId ("PNP0400"))
361: Method (_STA, 0, NotSerialized)
362: {
363: Store (\_SB.PCI0.PX13.DRSA, Local0)
364: And (Local0, 0x80000000, Local0)
365: If (LEqual (Local0, 0))
366: {
367: Return (0x00)
368: }
369: Else
370: {
371: Return (0x0F)
372: }
373: }
374: Method (_CRS, 0, NotSerialized)
375: {
376: Name (BUF0, ResourceTemplate ()
377: {
378: IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
379: IRQNoFlags () {7}
380: })
381: Return (BUF0)
382: }
383: }
384:
385: /* Serial Ports */
386: Device (COM1)
387: {
388: Name (_HID, EisaId ("PNP0501"))
389: Name (_UID, 0x01)
390: Method (_STA, 0, NotSerialized)
391: {
392: Store (\_SB.PCI0.PX13.DRSC, Local0)
393: And (Local0, 0x08000000, Local0)
394: If (LEqual (Local0, 0))
395: {
396: Return (0x00)
397: }
398: Else
399: {
400: Return (0x0F)
401: }
402: }
403: Method (_CRS, 0, NotSerialized)
404: {
405: Name (BUF0, ResourceTemplate ()
406: {
407: IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
408: IRQNoFlags () {4}
409: })
410: Return (BUF0)
411: }
412: }
413:
414: Device (COM2)
415: {
416: Name (_HID, EisaId ("PNP0501"))
417: Name (_UID, 0x02)
418: Method (_STA, 0, NotSerialized)
419: {
420: Store (\_SB.PCI0.PX13.DRSC, Local0)
421: And (Local0, 0x80000000, Local0)
422: If (LEqual (Local0, 0))
423: {
424: Return (0x00)
425: }
426: Else
427: {
428: Return (0x0F)
429: }
430: }
431: Method (_CRS, 0, NotSerialized)
432: {
433: Name (BUF0, ResourceTemplate ()
434: {
435: IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
436: IRQNoFlags () {3}
437: })
438: Return (BUF0)
439: }
440: }
1.1.1.6 ! root 441: }
1.1 root 442:
1.1.1.6 ! root 443:
! 444: /****************************************************************
! 445: * PIIX4 PM
! 446: ****************************************************************/
! 447:
! 448: Scope(\_SB.PCI0) {
1.1 root 449: Device (PX13) {
450: Name (_ADR, 0x00010003)
451:
452: OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
453: Field (P13C, DWordAcc, NoLock, Preserve)
454: {
455: DRSA, 32,
456: DRSB, 32,
457: DRSC, 32,
458: DRSE, 32,
459: DRSF, 32,
460: DRSG, 32,
461: DRSH, 32,
462: DRSI, 32,
463: DRSJ, 32
464: }
465: }
466: }
467:
1.1.1.6 ! root 468:
! 469: /****************************************************************
! 470: * PCI hotplug
! 471: ****************************************************************/
! 472:
! 473: Scope(\_SB.PCI0) {
! 474: /* Methods called by bulk generated PCI devices below */
! 475:
! 476: /* Methods called by hotplug devices */
! 477: Method (PCEJ, 1, NotSerialized) {
! 478: // _EJ0 method - eject callback
! 479: Store(ShiftLeft(1, Arg0), B0EJ)
! 480: Return (0x0)
1.1 root 481: }
1.1.1.6 ! root 482:
! 483: /* Hotplug notification method supplied by SSDT */
! 484: External (\_SB.PCI0.PCNT, MethodObj)
! 485:
! 486: /* PCI hotplug notify method */
! 487: Method(PCNF, 0) {
! 488: // Local0 = iterator
! 489: Store (Zero, Local0)
! 490: While (LLess(Local0, 31)) {
! 491: Increment(Local0)
! 492: If (And(PCIU, ShiftLeft(1, Local0))) {
! 493: PCNT(Local0, 1)
1.1 root 494: }
1.1.1.6 ! root 495: If (And(PCID, ShiftLeft(1, Local0))) {
! 496: PCNT(Local0, 3)
1.1 root 497: }
1.1.1.6 ! root 498: }
! 499: Return(One)
1.1 root 500: }
1.1.1.6 ! root 501:
! 502: }
! 503:
! 504:
! 505: /****************************************************************
! 506: * PCI IRQs
! 507: ****************************************************************/
! 508:
! 509: Scope(\_SB) {
! 510: Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
! 511: {
! 512: PRQ0, 8,
! 513: PRQ1, 8,
! 514: PRQ2, 8,
! 515: PRQ3, 8
! 516: }
! 517:
! 518: Method (IQST, 1, NotSerialized) {
! 519: // _STA method - get status
! 520: If (And (0x80, Arg0)) {
! 521: Return (0x09)
! 522: }
! 523: Return (0x0B)
! 524: }
! 525: Method (IQCR, 1, NotSerialized) {
! 526: // _CRS method - get current settings
! 527: Name (PRR0, ResourceTemplate ()
! 528: {
! 529: Interrupt (, Level, ActiveHigh, Shared)
! 530: { 0 }
! 531: })
! 532: CreateDWordField (PRR0, 0x05, PRRI)
! 533: If (LLess (Arg0, 0x80)) {
! 534: Store (Arg0, PRRI)
! 535: }
! 536: Return (PRR0)
! 537: }
! 538: // _DIS method - disable interrupt
! 539: #define DISIRQ(PRQVAR) \
! 540: Or(PRQVAR, 0x80, PRQVAR) \
! 541: // _SRS method - set interrupt
! 542: #define SETIRQ(PRQVAR, IRQINFO) \
! 543: CreateDWordField (IRQINFO, 0x05, PRRI) \
! 544: Store (PRRI, PRQVAR)
! 545:
! 546: Device(LNKA) {
! 547: Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
! 548: Name(_UID, 1)
! 549: Name(_PRS, ResourceTemplate(){
! 550: Interrupt (, Level, ActiveHigh, Shared)
! 551: { 5, 10, 11 }
! 552: })
! 553: Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
! 554: Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
! 555: Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
! 556: Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ0, Arg0) }
! 557: }
! 558: Device(LNKB) {
! 559: Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
! 560: Name(_UID, 2)
! 561: Name(_PRS, ResourceTemplate(){
! 562: Interrupt (, Level, ActiveHigh, Shared)
! 563: { 5, 10, 11 }
! 564: })
! 565: Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
! 566: Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ1) }
! 567: Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
! 568: Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ1, Arg0) }
! 569: }
! 570: Device(LNKC) {
! 571: Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
! 572: Name(_UID, 3)
! 573: Name(_PRS, ResourceTemplate() {
! 574: Interrupt (, Level, ActiveHigh, Shared)
! 575: { 5, 10, 11 }
! 576: })
! 577: Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
! 578: Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ2) }
! 579: Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
! 580: Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ2, Arg0) }
! 581: }
! 582: Device(LNKD) {
! 583: Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
! 584: Name(_UID, 4)
! 585: Name(_PRS, ResourceTemplate() {
! 586: Interrupt (, Level, ActiveHigh, Shared)
! 587: { 5, 10, 11 }
! 588: })
! 589: Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
! 590: Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ3) }
! 591: Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
! 592: Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ3, Arg0) }
! 593: }
! 594: Device(LNKS) {
! 595: Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
! 596: Name(_UID, 5)
! 597: Name(_PRS, ResourceTemplate() {
! 598: Interrupt (, Level, ActiveHigh, Shared)
! 599: { 9 }
! 600: })
! 601: Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
! 602: Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
! 603: Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
1.1.1.3 root 604: }
1.1 root 605: }
606:
1.1.1.6 ! root 607:
! 608: /****************************************************************
! 609: * Suspend
! 610: ****************************************************************/
! 611:
1.1 root 612: /*
613: * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
614: * must match piix4 emulation.
615: */
616: Name (\_S3, Package (0x04)
617: {
618: 0x01, /* PM1a_CNT.SLP_TYP */
619: 0x01, /* PM1b_CNT.SLP_TYP */
620: Zero, /* reserved */
621: Zero /* reserved */
622: })
623: Name (\_S4, Package (0x04)
624: {
625: Zero, /* PM1a_CNT.SLP_TYP */
626: Zero, /* PM1b_CNT.SLP_TYP */
627: Zero, /* reserved */
628: Zero /* reserved */
629: })
630: Name (\_S5, Package (0x04)
631: {
632: Zero, /* PM1a_CNT.SLP_TYP */
633: Zero, /* PM1b_CNT.SLP_TYP */
634: Zero, /* reserved */
635: Zero /* reserved */
636: })
637:
1.1.1.6 ! root 638:
! 639: /****************************************************************
! 640: * CPU hotplug
! 641: ****************************************************************/
! 642:
1.1.1.3 root 643: Scope(\_SB) {
644: /* Objects filled in by run-time generated SSDT */
645: External(NTFY, MethodObj)
646: External(CPON, PkgObj)
647:
648: /* Methods called by run-time generated SSDT Processor objects */
649: Method (CPMA, 1, NotSerialized) {
650: // _MAT method - create an madt apic buffer
651: // Local0 = CPON flag for this cpu
652: Store(DerefOf(Index(CPON, Arg0)), Local0)
653: // Local1 = Buffer (in madt apic form) to return
654: Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1)
655: // Update the processor id, lapic id, and enable/disable status
656: Store(Arg0, Index(Local1, 2))
657: Store(Arg0, Index(Local1, 3))
658: Store(Local0, Index(Local1, 4))
659: Return (Local1)
660: }
661: Method (CPST, 1, NotSerialized) {
662: // _STA method - return ON status of cpu
663: // Local0 = CPON flag for this cpu
664: Store(DerefOf(Index(CPON, Arg0)), Local0)
665: If (Local0) { Return(0xF) } Else { Return(0x0) }
666: }
667: Method (CPEJ, 2, NotSerialized) {
668: // _EJ0 method - eject callback
669: Sleep(200)
670: }
671:
672: /* CPU hotplug notify method */
673: OperationRegion(PRST, SystemIO, 0xaf00, 32)
674: Field (PRST, ByteAcc, NoLock, Preserve)
675: {
676: PRS, 256
677: }
678: Method(PRSC, 0) {
679: // Local5 = active cpu bitmap
680: Store (PRS, Local5)
681: // Local2 = last read byte from bitmap
682: Store (Zero, Local2)
683: // Local0 = cpuid iterator
684: Store (Zero, Local0)
685: While (LLess(Local0, SizeOf(CPON))) {
686: // Local1 = CPON flag for this cpu
687: Store(DerefOf(Index(CPON, Local0)), Local1)
688: If (And(Local0, 0x07)) {
689: // Shift down previously read bitmap byte
690: ShiftRight(Local2, 1, Local2)
691: } Else {
692: // Read next byte from cpu bitmap
693: Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2)
694: }
695: // Local3 = active state for this cpu
696: Store(And(Local2, 1), Local3)
697:
698: If (LNotEqual(Local1, Local3)) {
699: // State change - update CPON with new state
700: Store(Local3, Index(CPON, Local0))
701: // Do CPU notify
702: If (LEqual(Local3, 1)) {
703: NTFY(Local0, 1)
704: } Else {
705: NTFY(Local0, 3)
706: }
707: }
708: Increment(Local0)
709: }
710: Return(One)
711: }
712: }
713:
1.1.1.6 ! root 714:
! 715: /****************************************************************
! 716: * General purpose events
! 717: ****************************************************************/
! 718:
1.1 root 719: Scope (\_GPE)
720: {
721: Name(_HID, "ACPI0006")
722:
723: Method(_L00) {
724: Return(0x01)
725: }
1.1.1.6 ! root 726: Method(_E01) {
! 727: // PCI hotplug event
! 728: Return(\_SB.PCI0.PCNF())
1.1 root 729: }
1.1.1.6 ! root 730: Method(_E02) {
1.1.1.3 root 731: // CPU hotplug event
732: Return(\_SB.PRSC())
1.1 root 733: }
734: Method(_L03) {
735: Return(0x01)
736: }
737: Method(_L04) {
738: Return(0x01)
739: }
740: Method(_L05) {
741: Return(0x01)
742: }
743: Method(_L06) {
744: Return(0x01)
745: }
746: Method(_L07) {
747: Return(0x01)
748: }
749: Method(_L08) {
750: Return(0x01)
751: }
752: Method(_L09) {
753: Return(0x01)
754: }
755: Method(_L0A) {
756: Return(0x01)
757: }
758: Method(_L0B) {
759: Return(0x01)
760: }
761: Method(_L0C) {
762: Return(0x01)
763: }
764: Method(_L0D) {
765: Return(0x01)
766: }
767: Method(_L0E) {
768: Return(0x01)
769: }
770: Method(_L0F) {
771: Return(0x01)
772: }
773: }
774: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.