grml...
[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 (IQCR, 1, NotSerialized) {
512             // _CRS method - get current settings
513             Name (PRR0, ResourceTemplate ()
514             {
515                 Interrupt (, Level, ActiveHigh, Shared)
516                     { 0 }
517             })
518             CreateDWordField (PRR0, 0x05, PRRI)
519             If (LLess (Arg0, 0x80)) {
520                 Store (Arg0, PRRI)
521             }
522             Return (PRR0)
523         }
524         // _DIS method - disable interrupt
525 #define DISIRQ(PRQVAR)                          \
526             Or(PRQVAR, 0x80, PRQVAR)            \
527         // _SRS method - set interrupt
528 #define SETIRQ(PRQVAR, IRQINFO)                         \
529             CreateDWordField (IRQINFO, 0x05, PRRI)      \
530             Store (PRRI, PRQVAR)
531
532         Device(LNKA) {
533             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
534             Name(_UID, 1)
535             Name(_PRS, ResourceTemplate(){
536                 Interrupt (, Level, ActiveHigh, Shared)
537                     { 5, 10, 11 }
538             })
539             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
540             Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
541             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
542             Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ0, Arg0) }
543         }
544         Device(LNKB) {
545             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
546             Name(_UID, 2)
547             Name(_PRS, ResourceTemplate(){
548                 Interrupt (, Level, ActiveHigh, Shared)
549                     { 5, 10, 11 }
550             })
551             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
552             Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ1) }
553             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
554             Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ1, Arg0) }
555         }
556         Device(LNKC) {
557             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
558             Name(_UID, 3)
559             Name(_PRS, ResourceTemplate() {
560                 Interrupt (, Level, ActiveHigh, Shared)
561                     { 5, 10, 11 }
562             })
563             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
564             Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ2) }
565             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
566             Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ2, Arg0) }
567         }
568         Device(LNKD) {
569             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
570             Name(_UID, 4)
571             Name(_PRS, ResourceTemplate() {
572                 Interrupt (, Level, ActiveHigh, Shared)
573                     { 5, 10, 11 }
574             })
575             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
576             Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ3) }
577             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
578             Method (_SRS, 1, NotSerialized) { SETIRQ(PRQ3, Arg0) }
579         }
580         Device(LNKS) {
581             Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
582             Name(_UID, 5)
583             Name(_PRS, ResourceTemplate() {
584                 Interrupt (, Level, ActiveHigh, Shared)
585                     { 9 }
586             })
587             Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
588             Method (_DIS, 0, NotSerialized) { DISIRQ(PRQ0) }
589             Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
590         }
591     }
592
593
594 /****************************************************************
595  * Suspend
596  ****************************************************************/
597
598     /*
599      * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
600      * must match piix4 emulation.
601      */
602     Name (\_S3, Package (0x04)
603     {
604         0x01,  /* PM1a_CNT.SLP_TYP */
605         0x01,  /* PM1b_CNT.SLP_TYP */
606         Zero,  /* reserved */
607         Zero   /* reserved */
608     })
609     Name (\_S4, Package (0x04)
610     {
611         Zero,  /* PM1a_CNT.SLP_TYP */
612         Zero,  /* PM1b_CNT.SLP_TYP */
613         Zero,  /* reserved */
614         Zero   /* reserved */
615     })
616     Name (\_S5, Package (0x04)
617     {
618         Zero,  /* PM1a_CNT.SLP_TYP */
619         Zero,  /* PM1b_CNT.SLP_TYP */
620         Zero,  /* reserved */
621         Zero   /* reserved */
622     })
623
624
625 /****************************************************************
626  * CPU hotplug
627  ****************************************************************/
628
629     Scope(\_SB) {
630         /* Objects filled in by run-time generated SSDT */
631         External(NTFY, MethodObj)
632         External(CPON, PkgObj)
633
634         /* Methods called by run-time generated SSDT Processor objects */
635         Method (CPMA, 1, NotSerialized) {
636             // _MAT method - create an madt apic buffer
637             // Local0 = CPON flag for this cpu
638             Store(DerefOf(Index(CPON, Arg0)), Local0)
639             // Local1 = Buffer (in madt apic form) to return
640             Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1)
641             // Update the processor id, lapic id, and enable/disable status
642             Store(Arg0, Index(Local1, 2))
643             Store(Arg0, Index(Local1, 3))
644             Store(Local0, Index(Local1, 4))
645             Return (Local1)
646         }
647         Method (CPST, 1, NotSerialized) {
648             // _STA method - return ON status of cpu
649             // Local0 = CPON flag for this cpu
650             Store(DerefOf(Index(CPON, Arg0)), Local0)
651             If (Local0) { Return(0xF) } Else { Return(0x0) }
652         }
653         Method (CPEJ, 2, NotSerialized) {
654             // _EJ0 method - eject callback
655             Sleep(200)
656         }
657
658         /* CPU hotplug notify method */
659         OperationRegion(PRST, SystemIO, 0xaf00, 32)
660         Field (PRST, ByteAcc, NoLock, Preserve)
661         {
662             PRS, 256
663         }
664         Method(PRSC, 0) {
665             // Local5 = active cpu bitmap
666             Store (PRS, Local5)
667             // Local2 = last read byte from bitmap
668             Store (Zero, Local2)
669             // Local0 = cpuid iterator
670             Store (Zero, Local0)
671             While (LLess(Local0, SizeOf(CPON))) {
672                 // Local1 = CPON flag for this cpu
673                 Store(DerefOf(Index(CPON, Local0)), Local1)
674                 If (And(Local0, 0x07)) {
675                     // Shift down previously read bitmap byte
676                     ShiftRight(Local2, 1, Local2)
677                 } Else {
678                     // Read next byte from cpu bitmap
679                     Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2)
680                 }
681                 // Local3 = active state for this cpu
682                 Store(And(Local2, 1), Local3)
683
684                 If (LNotEqual(Local1, Local3)) {
685                     // State change - update CPON with new state
686                     Store(Local3, Index(CPON, Local0))
687                     // Do CPU notify
688                     If (LEqual(Local3, 1)) {
689                         NTFY(Local0, 1)
690                     } Else {
691                         NTFY(Local0, 3)
692                     }
693                 }
694                 Increment(Local0)
695             }
696             Return(One)
697         }
698     }
699
700
701 /****************************************************************
702  * General purpose events
703  ****************************************************************/
704
705     Scope (\_GPE)
706     {
707         Name(_HID, "ACPI0006")
708
709         Method(_L00) {
710             Return(0x01)
711         }
712         Method(_L01) {
713             // PCI hotplug event
714             Return(\_SB.PCI0.PCNF())
715         }
716         Method(_L02) {
717             // CPU hotplug event
718             Return(\_SB.PRSC())
719         }
720         Method(_L03) {
721             Return(0x01)
722         }
723         Method(_L04) {
724             Return(0x01)
725         }
726         Method(_L05) {
727             Return(0x01)
728         }
729         Method(_L06) {
730             Return(0x01)
731         }
732         Method(_L07) {
733             Return(0x01)
734         }
735         Method(_L08) {
736             Return(0x01)
737         }
738         Method(_L09) {
739             Return(0x01)
740         }
741         Method(_L0A) {
742             Return(0x01)
743         }
744         Method(_L0B) {
745             Return(0x01)
746         }
747         Method(_L0C) {
748             Return(0x01)
749         }
750         Method(_L0D) {
751             Return(0x01)
752         }
753         Method(_L0E) {
754             Return(0x01)
755         }
756         Method(_L0F) {
757             Return(0x01)
758         }
759     }
760 }