aff3f488dc11277d099a2dc375cb0b7f1321f96a
[seabios.git] / src / acpi-dsdt.dsl
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  */
19
20 ACPI_EXTRACT_ALL_CODE AmlCode
21
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 {
31
32
33 /****************************************************************
34  * Debugging
35  ****************************************************************/
36
37     Scope (\)
38     {
39         /* Debug Output */
40         OperationRegion (DBG, SystemIO, 0x0402, 0x01)
41         Field (DBG, ByteAcc, NoLock, Preserve)
42         {
43             DBGB,   8,
44         }
45
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     }
61
62
63 /****************************************************************
64  * PCI Bus definition
65  ****************************************************************/
66
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),
88                /* Device 1 is power mgmt device, and can only use irq 9 */
89                prt_slot(0x0001, LNKS, LNKB, LNKC, LNKD),
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         }
180     }
181
182
183 /****************************************************************
184  * HPET
185  ****************************************************************/
186
187     Scope(\_SB) {
188         Device(HPET) {
189             Name(_HID,  EISAID("PNP0103"))
190             Name(_UID, 0)
191             Method (_STA, 0, NotSerialized) {
192                     Return(0x0F)
193             }
194             Name(_CRS, ResourceTemplate() {
195                 DWordMemory(
196                     ResourceConsumer, PosDecode, MinFixed, MaxFixed,
197                     NonCacheable, ReadWrite,
198                     0x00000000,
199                     0xFED00000,
200                     0xFED003FF,
201                     0x00000000,
202                     0x00000400 /* 1K memory: FED00000 - FED003FF */
203                 )
204             })
205         }
206     }
207
208
209 /****************************************************************
210  * VGA
211  ****************************************************************/
212
213     Scope(\_SB.PCI0) {
214         Device (VGA) {
215                  Name (_ADR, 0x00020000)
216                  OperationRegion(PCIC, PCI_Config, Zero, 0x4)
217                  Field(PCIC, DWordAcc, NoLock, Preserve) {
218                          VEND, 32
219                  }
220                  Method (_S1D, 0, NotSerialized)
221                  {
222                          Return (0x00)
223                  }
224                  Method (_S2D, 0, NotSerialized)
225                  {
226                          Return (0x00)
227                  }
228                  Method (_S3D, 0, NotSerialized)
229                  {
230                          If (LEqual(VEND, 0x1001b36)) {
231                                  Return (0x03)           // QXL
232                          } Else {
233                                  Return (0x00)
234                          }
235                  }
236         }
237     }
238
239
240 /****************************************************************
241  * PIIX3 ISA bridge
242  ****************************************************************/
243
244     Scope(\_SB.PCI0) {
245         Device (ISA) {
246             Name (_ADR, 0x00010000)
247
248             /* PIIX PCI to ISA irq remapping */
249             OperationRegion (P40C, PCI_Config, 0x60, 0x04)
250         }
251     }
252
253
254 /****************************************************************
255  * SuperIO devices (kbd, mouse, etc.)
256  ****************************************************************/
257
258     Scope(\_SB.PCI0.ISA) {
259             /* Real-time clock */
260             Device (RTC)
261             {
262                 Name (_HID, EisaId ("PNP0B00"))
263                 Name (_CRS, ResourceTemplate ()
264                 {
265                     IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
266                     IRQNoFlags () {8}
267                     IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
268                 })
269             }
270
271             /* Keyboard seems to be important for WinXP install */
272             Device (KBD)
273             {
274                 Name (_HID, EisaId ("PNP0303"))
275                 Method (_STA, 0, NotSerialized)
276                 {
277                     Return (0x0f)
278                 }
279
280                 Method (_CRS, 0, NotSerialized)
281                 {
282                      Name (TMP, ResourceTemplate ()
283                      {
284                     IO (Decode16,
285                         0x0060,             // Address Range Minimum
286                         0x0060,             // Address Range Maximum
287                         0x01,               // Address Alignment
288                         0x01,               // Address Length
289                         )
290                     IO (Decode16,
291                         0x0064,             // Address Range Minimum
292                         0x0064,             // Address Range Maximum
293                         0x01,               // Address Alignment
294                         0x01,               // Address Length
295                         )
296                     IRQNoFlags ()
297                         {1}
298                     })
299                     Return (TMP)
300                 }
301             }
302
303             /* PS/2 mouse */
304             Device (MOU)
305             {
306                 Name (_HID, EisaId ("PNP0F13"))
307                 Method (_STA, 0, NotSerialized)
308                 {
309                     Return (0x0f)
310                 }
311
312                 Method (_CRS, 0, NotSerialized)
313                 {
314                     Name (TMP, ResourceTemplate ()
315                     {
316                          IRQNoFlags () {12}
317                     })
318                     Return (TMP)
319                 }
320             }
321
322             /* PS/2 floppy controller */
323             Device (FDC0)
324             {
325                 Name (_HID, EisaId ("PNP0700"))
326                 Method (_STA, 0, NotSerialized)
327                 {
328                     Return (0x0F)
329                 }
330                 Method (_CRS, 0, NotSerialized)
331                 {
332                     Name (BUF0, ResourceTemplate ()
333                     {
334                         IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
335                         IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
336                         IRQNoFlags () {6}
337                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
338                     })
339                     Return (BUF0)
340                 }
341             }
342
343             /* Parallel port */
344             Device (LPT)
345             {
346                 Name (_HID, EisaId ("PNP0400"))
347                 Method (_STA, 0, NotSerialized)
348                 {
349                     Store (\_SB.PCI0.PX13.DRSA, Local0)
350                     And (Local0, 0x80000000, Local0)
351                     If (LEqual (Local0, 0))
352                     {
353                         Return (0x00)
354                     }
355                     Else
356                     {
357                         Return (0x0F)
358                     }
359                 }
360                 Method (_CRS, 0, NotSerialized)
361                 {
362                     Name (BUF0, ResourceTemplate ()
363                     {
364                         IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
365                         IRQNoFlags () {7}
366                     })
367                     Return (BUF0)
368                 }
369             }
370
371             /* Serial Ports */
372             Device (COM1)
373             {
374                 Name (_HID, EisaId ("PNP0501"))
375                 Name (_UID, 0x01)
376                 Method (_STA, 0, NotSerialized)
377                 {
378                     Store (\_SB.PCI0.PX13.DRSC, Local0)
379                     And (Local0, 0x08000000, Local0)
380                     If (LEqual (Local0, 0))
381                     {
382                         Return (0x00)
383                     }
384                     Else
385                     {
386                         Return (0x0F)
387                     }
388                 }
389                 Method (_CRS, 0, NotSerialized)
390                 {
391                     Name (BUF0, ResourceTemplate ()
392                     {
393                         IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
394                         IRQNoFlags () {4}
395                     })
396                     Return (BUF0)
397                 }
398             }
399
400             Device (COM2)
401             {
402                 Name (_HID, EisaId ("PNP0501"))
403                 Name (_UID, 0x02)
404                 Method (_STA, 0, NotSerialized)
405                 {
406                     Store (\_SB.PCI0.PX13.DRSC, Local0)
407                     And (Local0, 0x80000000, Local0)
408                     If (LEqual (Local0, 0))
409                     {
410                         Return (0x00)
411                     }
412                     Else
413                     {
414                         Return (0x0F)
415                     }
416                 }
417                 Method (_CRS, 0, NotSerialized)
418                 {
419                     Name (BUF0, ResourceTemplate ()
420                     {
421                         IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
422                         IRQNoFlags () {3}
423                     })
424                     Return (BUF0)
425                 }
426             }
427     }
428
429
430 /****************************************************************
431  * PIIX4 PM
432  ****************************************************************/
433
434     Scope(\_SB.PCI0) {
435         Device (PX13) {
436             Name (_ADR, 0x00010003)
437
438             OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
439             Field (P13C, DWordAcc, NoLock, Preserve)
440             {
441                 DRSA, 32,
442                 DRSB, 32,
443                 DRSC, 32,
444                 DRSE, 32,
445                 DRSF, 32,
446                 DRSG, 32,
447                 DRSH, 32,
448                 DRSI, 32,
449                 DRSJ, 32
450             }
451         }
452     }
453
454
455 /****************************************************************
456  * PCI hotplug
457  ****************************************************************/
458
459     Scope(\_SB.PCI0) {
460         /* Methods called by bulk generated PCI devices below */
461
462         /* Methods called by hotplug devices */
463         Method (PCEJ, 1, NotSerialized) {
464             // _EJ0 method - eject callback
465             Store(ShiftLeft(1, Arg0), B0EJ)
466             Return (0x0)
467         }
468
469         /* Hotplug notification method supplied by SSDT */
470         External (\_SB.PCI0.PCNT, MethodObj)
471
472         /* PCI hotplug notify method */
473         Method(PCNF, 0) {
474             // Local0 = iterator
475             Store (Zero, Local0)
476             While (LLess(Local0, 31)) {
477                 Increment(Local0)
478                 If (And(PCIU, ShiftLeft(1, Local0))) {
479                     PCNT(Local0, 1)
480                 }
481                 If (And(PCID, ShiftLeft(1, Local0))) {
482                     PCNT(Local0, 3)
483                 }
484             }
485             Return(One)
486         }
487
488     }
489
490
491 /****************************************************************
492  * PCI IRQs
493  ****************************************************************/
494
495     Scope(\_SB) {
496         Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
497         {
498             PRQ0,   8,
499             PRQ1,   8,
500             PRQ2,   8,
501             PRQ3,   8
502         }
503
504         Method (IQST, 1, NotSerialized) {
505             // _STA method - get status
506             If (And (0x80, Arg0)) {
507                 Return (0x09)
508             }
509             Return (0x0B)
510         }
511         Method (IQDI, 1, NotSerialized) {
512             // _DIS method - disable interrupt
513             Or(DerefOf(Arg0), 0x80, Arg0)
514         }
515         Method (IQCR, 1, NotSerialized) {
516             // _CRS method - get current settings
517             Name (PRR0, ResourceTemplate ()
518             {
519                 Interrupt (, Level, ActiveHigh, Shared)
520                     { 0 }
521             })
522             CreateDWordField (PRR0, 0x05, PRRI)
523             If (LLess (Arg0, 0x80)) {
524                 Store (Arg0, PRRI)
525             }
526             Return (PRR0)
527         }
528         Method (IQSR, 2, NotSerialized) {
529             // _SRS method - set interrupt
530             CreateDWordField (Arg1, 0x05, PRRI)
531             Store (PRRI, Arg0)
532         }
533
534         Device(LNKA) {
535             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
536             Name(_UID, 1)
537             Name(_PRS, ResourceTemplate(){
538                 Interrupt (, Level, ActiveHigh, Shared)
539                     { 5, 10, 11 }
540             })
541             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
542             Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
543             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
544             Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ0), Arg0) }
545         }
546         Device(LNKB) {
547             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
548             Name(_UID, 2)
549             Name(_PRS, ResourceTemplate(){
550                 Interrupt (, Level, ActiveHigh, Shared)
551                     { 5, 10, 11 }
552             })
553             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
554             Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ1)) }
555             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
556             Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ1), Arg0) }
557         }
558         Device(LNKC) {
559             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
560             Name(_UID, 3)
561             Name(_PRS, ResourceTemplate() {
562                 Interrupt (, Level, ActiveHigh, Shared)
563                     { 5, 10, 11 }
564             })
565             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
566             Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ2)) }
567             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
568             Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ2), Arg0) }
569         }
570         Device(LNKD) {
571             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
572             Name(_UID, 4)
573             Name(_PRS, ResourceTemplate() {
574                 Interrupt (, Level, ActiveHigh, Shared)
575                     { 5, 10, 11 }
576             })
577             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
578             Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ3)) }
579             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
580             Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ3), Arg0) }
581         }
582         Device(LNKS) {
583             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
584             Name(_UID, 5)
585             Name(_PRS, ResourceTemplate() {
586                 Interrupt (, Level, ActiveHigh, Shared)
587                     { 9 }
588             })
589             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
590             Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
591             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
592         }
593     }
594
595
596 /****************************************************************
597  * Suspend
598  ****************************************************************/
599
600     /*
601      * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
602      * must match piix4 emulation.
603      */
604     Name (\_S3, Package (0x04)
605     {
606         0x01,  /* PM1a_CNT.SLP_TYP */
607         0x01,  /* PM1b_CNT.SLP_TYP */
608         Zero,  /* reserved */
609         Zero   /* reserved */
610     })
611     Name (\_S4, Package (0x04)
612     {
613         Zero,  /* PM1a_CNT.SLP_TYP */
614         Zero,  /* PM1b_CNT.SLP_TYP */
615         Zero,  /* reserved */
616         Zero   /* reserved */
617     })
618     Name (\_S5, Package (0x04)
619     {
620         Zero,  /* PM1a_CNT.SLP_TYP */
621         Zero,  /* PM1b_CNT.SLP_TYP */
622         Zero,  /* reserved */
623         Zero   /* reserved */
624     })
625
626
627 /****************************************************************
628  * CPU hotplug
629  ****************************************************************/
630
631     Scope(\_SB) {
632         /* Objects filled in by run-time generated SSDT */
633         External(NTFY, MethodObj)
634         External(CPON, PkgObj)
635
636         /* Methods called by run-time generated SSDT Processor objects */
637         Method (CPMA, 1, NotSerialized) {
638             // _MAT method - create an madt apic buffer
639             // Local0 = CPON flag for this cpu
640             Store(DerefOf(Index(CPON, Arg0)), Local0)
641             // Local1 = Buffer (in madt apic form) to return
642             Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1)
643             // Update the processor id, lapic id, and enable/disable status
644             Store(Arg0, Index(Local1, 2))
645             Store(Arg0, Index(Local1, 3))
646             Store(Local0, Index(Local1, 4))
647             Return (Local1)
648         }
649         Method (CPST, 1, NotSerialized) {
650             // _STA method - return ON status of cpu
651             // Local0 = CPON flag for this cpu
652             Store(DerefOf(Index(CPON, Arg0)), Local0)
653             If (Local0) { Return(0xF) } Else { Return(0x0) }
654         }
655         Method (CPEJ, 2, NotSerialized) {
656             // _EJ0 method - eject callback
657             Sleep(200)
658         }
659
660         /* CPU hotplug notify method */
661         OperationRegion(PRST, SystemIO, 0xaf00, 32)
662         Field (PRST, ByteAcc, NoLock, Preserve)
663         {
664             PRS, 256
665         }
666         Method(PRSC, 0) {
667             // Local5 = active cpu bitmap
668             Store (PRS, Local5)
669             // Local2 = last read byte from bitmap
670             Store (Zero, Local2)
671             // Local0 = cpuid iterator
672             Store (Zero, Local0)
673             While (LLess(Local0, SizeOf(CPON))) {
674                 // Local1 = CPON flag for this cpu
675                 Store(DerefOf(Index(CPON, Local0)), Local1)
676                 If (And(Local0, 0x07)) {
677                     // Shift down previously read bitmap byte
678                     ShiftRight(Local2, 1, Local2)
679                 } Else {
680                     // Read next byte from cpu bitmap
681                     Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2)
682                 }
683                 // Local3 = active state for this cpu
684                 Store(And(Local2, 1), Local3)
685
686                 If (LNotEqual(Local1, Local3)) {
687                     // State change - update CPON with new state
688                     Store(Local3, Index(CPON, Local0))
689                     // Do CPU notify
690                     If (LEqual(Local3, 1)) {
691                         NTFY(Local0, 1)
692                     } Else {
693                         NTFY(Local0, 3)
694                     }
695                 }
696                 Increment(Local0)
697             }
698             Return(One)
699         }
700     }
701
702
703 /****************************************************************
704  * General purpose events
705  ****************************************************************/
706
707     Scope (\_GPE)
708     {
709         Name(_HID, "ACPI0006")
710
711         Method(_L00) {
712             Return(0x01)
713         }
714         Method(_L01) {
715             // PCI hotplug event
716             Return(\_SB.PCI0.PCNF())
717         }
718         Method(_L02) {
719             // CPU hotplug event
720             Return(\_SB.PRSC())
721         }
722         Method(_L03) {
723             Return(0x01)
724         }
725         Method(_L04) {
726             Return(0x01)
727         }
728         Method(_L05) {
729             Return(0x01)
730         }
731         Method(_L06) {
732             Return(0x01)
733         }
734         Method(_L07) {
735             Return(0x01)
736         }
737         Method(_L08) {
738             Return(0x01)
739         }
740         Method(_L09) {
741             Return(0x01)
742         }
743         Method(_L0A) {
744             Return(0x01)
745         }
746         Method(_L0B) {
747             Return(0x01)
748         }
749         Method(_L0C) {
750             Return(0x01)
751         }
752         Method(_L0D) {
753             Return(0x01)
754         }
755         Method(_L0E) {
756             Return(0x01)
757         }
758         Method(_L0F) {
759             Return(0x01)
760         }
761     }
762 }