Use reserved STS bits from PIIX4 chipset to avoid clash in the future
[qemu-kvm/fedora.git] / kvm / bios / acpi-dsdt.dsl
blob06ab25d4a4380944a34208be5d4f7f1694e3f9d2
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 DefinitionBlock (
20     "acpi-dsdt.aml",    // Output Filename
21     "DSDT",             // Signature
22     0x01,               // DSDT Compliance Revision
23     "BXPC",             // OEMID
24     "BXDSDT",           // TABLE ID
25     0x1                 // OEM Revision
26     )
28    Scope (\_PR)
29    {
30         OperationRegion(PRST, SystemIO, 0xaf00, 32)
31         Field (PRST, ByteAcc, NoLock, Preserve)
32         {
33                 PRS, 256
34         }
36         Name(PRSS, Buffer(32){}) /* shadow CPU status bitmask */
37         Name(SSVL, 0)
39         Method(CRST, 1) {
40                 If (LEqual(SSVL, 0)) {
41                         Store(PRS, PRSS) /* read CPUs status bitmaks from HW */
42                         Store(1, SSVL)
43                 }
44                 ShiftRight(Arg0, 3, Local1)
45                 Store(DerefOf(Index(PRSS, Local1)), Local2)
46                 Return(And(Local2, ShiftLeft(1, And(Arg0, 0x7))))
47         }
49 #define gen_processor(nr, name)                                             \
50         Processor (CPU##name, nr, 0x0000b010, 0x06) {                       \
51             Name (PREN, Buffer(0x8) {0x0, 0x8, nr, nr, 0x1, 0x0, 0x0, 0x0}) \
52             Name (PRDS, Buffer(0x8) {0x0, 0x8, nr, nr, 0x0, 0x0, 0x0, 0x0}) \
53             Method(_MAT, 0) {                                               \
54                 If (CRST(nr)) { Return(PREN) }                              \
55                 Else { Return(PRDS) }                                       \
56             }                                                               \
57             Method (_STA) {                                                 \
58                 If (CRST(nr)) { Return(0xF) }                               \
59                 Else { Return(0x9) }                                        \
60             }                                                               \
61         }                                                                   \
64         gen_processor(0, 0)
65         gen_processor(1, 1)
66         gen_processor(2, 2)
67         gen_processor(3, 3)
68         gen_processor(4, 4)
69         gen_processor(5, 5)
70         gen_processor(6, 6)
71         gen_processor(7, 7)
72         gen_processor(8, 8)
73         gen_processor(9, 9)
74         gen_processor(10, A)
75         gen_processor(11, B)
76         gen_processor(12, C)
77         gen_processor(13, D)
78         gen_processor(14, E)
80         Method (NTFY, 2) {
81 #define gen_ntfy(nr)                              \
82         If (LEqual(Arg0, 0x##nr)) {               \
83                 Notify(CPU##nr, Arg1)             \
84         }
85                 gen_ntfy(0)
86                 gen_ntfy(1)
87                 gen_ntfy(2)
88                 gen_ntfy(3)
89                 gen_ntfy(4)
90                 gen_ntfy(5)
91                 gen_ntfy(6)
92                 gen_ntfy(7)
93                 gen_ntfy(8)
94                 gen_ntfy(9)
95                 gen_ntfy(A)
96                 gen_ntfy(B)
97                 gen_ntfy(C)
98                 gen_ntfy(D)
99                 gen_ntfy(E)
100                 Return(One)
101         }
103         /* Works on 8 bit quentity.
104          * Arg1 - Shadow status bits
105          * Arg2 - Current status bits
106          */
107         Method(PR1, 3) {
108             Xor(Arg1, Arg2, Local0) /* figure out what chaged */
109             ShiftLeft(Arg0, 3, Local1)
110             While (LNotEqual(Local0, Zero)) {
111                 If (And(Local0, 1)) {      /* if staus have changed */
112                     if(And(Arg2, 1)) {     /* check previous status */
113                         Store(3, Local3)
114                     } Else {
115                         Store(1, Local3)
116                     }
117                     NTFY(Local1, Local3)
118                 }
119                 ShiftRight(Local0, 1, Local0)
120                 ShiftRight(Arg2, 1, Arg2)
121                 Increment(Local1)
122             }
123             Return(One)
124         }
126         Method(PRSC, 0) {
127                 Store(Buffer(32){}, Local0)
128                 Store(PRS, Local0) /* read CPUs status bitmask into Local0 */
129                 Store(Zero, Local1)
130                 /* loop over bitmask byte by byte to see what have chaged */
131                 While(LLess(Local1, 32)) {
132                         Store(DerefOf(Index(Local0, Local1)), Local2)
133                         Store(DerefOf(Index(PRSS, Local1)), Local3)
134                         PR1(Local1, Local2, Local3)
135                         Increment(Local1)
136                 }
137                 Store(Local0, PRSS) /* store curr satust bitmask into shadow */
138                 Return(One)
139         }
140     }
142     Scope (\)
143     {
144         /* Debug Output */
145         OperationRegion (DBG, SystemIO, 0xb044, 0x04)
146         Field (DBG, DWordAcc, NoLock, Preserve)
147         {
148             DBGL,   32,
149         }
150     }
153     /* PCI Bus definition */
154     Scope(\_SB) {
155         Device(PCI0) {
156             Name (_HID, EisaId ("PNP0A03"))
157             Name (_ADR, 0x00)
158             Name (_UID, 1)
159             Name(_PRT, Package() {
160                 /* PCI IRQ routing table, example from ACPI 2.0a specification,
161                    section 6.2.8.1 */
162                 /* Note: we provide the same info as the PCI routing
163                    table of the Bochs BIOS */
165 #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
166         Package() { nr##ffff, 0, lnk0, 0 }, \
167         Package() { nr##ffff, 1, lnk1, 0 }, \
168         Package() { nr##ffff, 2, lnk2, 0 }, \
169         Package() { nr##ffff, 3, lnk3, 0 }
171 #define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
172 #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
173 #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
174 #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
176                 prt_slot0(0x0000),
177                 prt_slot1(0x0001),
178                 prt_slot2(0x0002),
179                 prt_slot3(0x0003),
180                 prt_slot0(0x0004),
181                 prt_slot1(0x0005),
182                 prt_slot2(0x0006),
183                 prt_slot3(0x0007),
184                 prt_slot0(0x0008),
185                 prt_slot1(0x0009),
186                 prt_slot2(0x000a),
187                 prt_slot3(0x000b),
188                 prt_slot0(0x000c),
189                 prt_slot1(0x000d),
190                 prt_slot2(0x000e),
191                 prt_slot3(0x000f),
192                 prt_slot0(0x0010),
193                 prt_slot1(0x0011),
194                 prt_slot2(0x0012),
195                 prt_slot3(0x0013),
196                 prt_slot0(0x0014),
197                 prt_slot1(0x0015),
198                 prt_slot2(0x0016),
199                 prt_slot3(0x0017),
200                 prt_slot0(0x0018),
201                 prt_slot1(0x0019),
202                 prt_slot2(0x001a),
203                 prt_slot3(0x001b),
204                 prt_slot0(0x001c),
205                 prt_slot1(0x001d),
206                 prt_slot2(0x001e),
207                 prt_slot3(0x001f),
208             })
210             OperationRegion(PCST, SystemIO, 0xae00, 0x08)
211             Field (PCST, DWordAcc, NoLock, WriteAsZeros)
212             {
213                 PCIU, 32,
214                 PCID, 32,
215             }
217             OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
218             Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
219             {
220                 B0EJ, 32,
221             }
223 #define hotplug_slot(name, nr) \
224             Device (S##name) {                    \
225                Name (_ADR, nr##0000)              \
226                Method (_EJ0,1) {                  \
227                     Store(ShiftLeft(1, nr), B0EJ) \
228                     Return (0x0)                  \
229                }                                  \
230                Name (_SUN, name)                  \
231             }
233             hotplug_slot(1, 0x0001)
234             hotplug_slot(2, 0x0002)
235             hotplug_slot(3, 0x0003)
236             hotplug_slot(4, 0x0004)
237             hotplug_slot(5, 0x0005)
238             hotplug_slot(6, 0x0006)
239             hotplug_slot(7, 0x0007)
240             hotplug_slot(8, 0x0008)
241             hotplug_slot(9, 0x0009)
242             hotplug_slot(10, 0x000a)
243             hotplug_slot(11, 0x000b)
244             hotplug_slot(12, 0x000c)
245             hotplug_slot(13, 0x000d)
246             hotplug_slot(14, 0x000e)
247             hotplug_slot(15, 0x000f)
248             hotplug_slot(16, 0x0010)
249             hotplug_slot(17, 0x0011)
250             hotplug_slot(18, 0x0012)
251             hotplug_slot(19, 0x0013)
252             hotplug_slot(20, 0x0014)
253             hotplug_slot(21, 0x0015)
254             hotplug_slot(22, 0x0016)
255             hotplug_slot(23, 0x0017)
256             hotplug_slot(24, 0x0018)
257             hotplug_slot(25, 0x0019)
258             hotplug_slot(26, 0x001a)
259             hotplug_slot(27, 0x001b)
260             hotplug_slot(28, 0x001c)
261             hotplug_slot(29, 0x001d)
262             hotplug_slot(30, 0x001e)
263             hotplug_slot(31, 0x001f)
265             Name (_CRS, ResourceTemplate ()
266             {
267                 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
268                     0x0000,             // Address Space Granularity
269                     0x0000,             // Address Range Minimum
270                     0x00FF,             // Address Range Maximum
271                     0x0000,             // Address Translation Offset
272                     0x0100,             // Address Length
273                     ,, )
274                 IO (Decode16,
275                     0x0CF8,             // Address Range Minimum
276                     0x0CF8,             // Address Range Maximum
277                     0x01,               // Address Alignment
278                     0x08,               // Address Length
279                     )
280                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
281                     0x0000,             // Address Space Granularity
282                     0x0000,             // Address Range Minimum
283                     0x0CF7,             // Address Range Maximum
284                     0x0000,             // Address Translation Offset
285                     0x0CF8,             // Address Length
286                     ,, , TypeStatic)
287                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
288                     0x0000,             // Address Space Granularity
289                     0x0D00,             // Address Range Minimum
290                     0xFFFF,             // Address Range Maximum
291                     0x0000,             // Address Translation Offset
292                     0xF300,             // Address Length
293                     ,, , TypeStatic)
294                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
295                     0x00000000,         // Address Space Granularity
296                     0x000A0000,         // Address Range Minimum
297                     0x000BFFFF,         // Address Range Maximum
298                     0x00000000,         // Address Translation Offset
299                     0x00020000,         // Address Length
300                     ,, , AddressRangeMemory, TypeStatic)
301                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
302                     0x00000000,         // Address Space Granularity
303                     0xE0000000,         // Address Range Minimum
304                     0xFEBFFFFF,         // Address Range Maximum
305                     0x00000000,         // Address Translation Offset
306                     0x1EC00000,         // Address Length
307                     ,, , AddressRangeMemory, TypeStatic)
308             })
309         }
310     }
312     Scope(\_SB.PCI0) {
313         Device (VGA) {
314                  Name (_ADR, 0x00020000)
315                  Method (_S1D, 0, NotSerialized)
316                  {
317                          Return (0x00)
318                  }
319                  Method (_S2D, 0, NotSerialized)
320                  {
321                          Return (0x00)
322                  }
323                  Method (_S3D, 0, NotSerialized)
324                  {
325                          Return (0x00)
326                  }
327         }
329         /* PIIX3 ISA bridge */
330         Device (ISA) {
331             Name (_ADR, 0x00010000)
333             /* PIIX PCI to ISA irq remapping */
334             OperationRegion (P40C, PCI_Config, 0x60, 0x04)
336             /* Real-time clock */
337             Device (RTC)
338             {
339                 Name (_HID, EisaId ("PNP0B00"))
340                 Name (_CRS, ResourceTemplate ()
341                 {
342                     IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
343                     IRQNoFlags () {8}
344                     IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
345                 })
346             }
348             /* Keyboard seems to be important for WinXP install */
349             Device (KBD)
350             {
351                 Name (_HID, EisaId ("PNP0303"))
352                 Method (_STA, 0, NotSerialized)
353                 {
354                     Return (0x0f)
355                 }
357                 Method (_CRS, 0, NotSerialized)
358                 {
359                      Name (TMP, ResourceTemplate ()
360                      {
361                     IO (Decode16,
362                         0x0060,             // Address Range Minimum
363                         0x0060,             // Address Range Maximum
364                         0x01,               // Address Alignment
365                         0x01,               // Address Length
366                         )
367                     IO (Decode16,
368                         0x0064,             // Address Range Minimum
369                         0x0064,             // Address Range Maximum
370                         0x01,               // Address Alignment
371                         0x01,               // Address Length
372                         )
373                     IRQNoFlags ()
374                         {1}
375                     })
376                     Return (TMP)
377                 }
378             }
380             /* PS/2 mouse */
381             Device (MOU)
382             {
383                 Name (_HID, EisaId ("PNP0F13"))
384                 Method (_STA, 0, NotSerialized)
385                 {
386                     Return (0x0f)
387                 }
389                 Method (_CRS, 0, NotSerialized)
390                 {
391                     Name (TMP, ResourceTemplate ()
392                     {
393                          IRQNoFlags () {12}
394                     })
395                     Return (TMP)
396                 }
397             }
399             /* PS/2 floppy controller */
400             Device (FDC0)
401             {
402                 Name (_HID, EisaId ("PNP0700"))
403                 Method (_STA, 0, NotSerialized)
404                 {
405                     Return (0x0F)
406                 }
407                 Method (_CRS, 0, NotSerialized)
408                 {
409                     Name (BUF0, ResourceTemplate ()
410                     {
411                         IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
412                         IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
413                         IRQNoFlags () {6}
414                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
415                     })
416                     Return (BUF0)
417                 }
418             }
420             /* Parallel port */
421             Device (LPT)
422             {
423                 Name (_HID, EisaId ("PNP0400"))
424                 Method (_STA, 0, NotSerialized)
425                 {
426                     Store (\_SB.PCI0.PX13.DRSA, Local0)
427                     And (Local0, 0x80000000, Local0)
428                     If (LEqual (Local0, 0))
429                     {
430                         Return (0x00)
431                     }
432                     Else
433                     {
434                         Return (0x0F)
435                     }
436                 }
437                 Method (_CRS, 0, NotSerialized)
438                 {
439                     Name (BUF0, ResourceTemplate ()
440                     {
441                         IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
442                         IRQNoFlags () {7}
443                     })
444                     Return (BUF0)
445                 }
446             }
448             /* Serial Ports */
449             Device (COM1)
450             {
451                 Name (_HID, EisaId ("PNP0501"))
452                 Name (_UID, 0x01)
453                 Method (_STA, 0, NotSerialized)
454                 {
455                     Store (\_SB.PCI0.PX13.DRSC, Local0)
456                     And (Local0, 0x08000000, Local0)
457                     If (LEqual (Local0, 0))
458                     {
459                         Return (0x00)
460                     }
461                     Else
462                     {
463                         Return (0x0F)
464                     }
465                 }
466                 Method (_CRS, 0, NotSerialized)
467                 {
468                     Name (BUF0, ResourceTemplate ()
469                     {
470                         IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
471                         IRQNoFlags () {4}
472                     })
473                     Return (BUF0)
474                 }
475             }
477             Device (COM2)
478             {
479                 Name (_HID, EisaId ("PNP0501"))
480                 Name (_UID, 0x02)
481                 Method (_STA, 0, NotSerialized)
482                 {
483                     Store (\_SB.PCI0.PX13.DRSC, Local0)
484                     And (Local0, 0x80000000, Local0)
485                     If (LEqual (Local0, 0))
486                     {
487                         Return (0x00)
488                     }
489                     Else
490                     {
491                         Return (0x0F)
492                     }
493                 }
494                 Method (_CRS, 0, NotSerialized)
495                 {
496                     Name (BUF0, ResourceTemplate ()
497                     {
498                         IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
499                         IRQNoFlags () {3}
500                     })
501                     Return (BUF0)
502                 }
503             }
504         }
506         /* PIIX4 PM */
507         Device (PX13) {
508             Name (_ADR, 0x00010003)
510             OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
511             Field (P13C, DWordAcc, NoLock, Preserve)
512             {
513                 DRSA, 32,
514                 DRSB, 32,
515                 DRSC, 32,
516                 DRSE, 32,
517                 DRSF, 32,
518                 DRSG, 32,
519                 DRSH, 32,
520                 DRSI, 32,
521                 DRSJ, 32
522             }
523         }
524     }
526     /* PCI IRQs */
527     Scope(\_SB) {
528          Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
529          {
530              PRQ0,   8,
531              PRQ1,   8,
532              PRQ2,   8,
533              PRQ3,   8
534          }
536         Device(LNKA){
537                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
538                 Name(_UID, 1)
539                 Name(_PRS, ResourceTemplate(){
540                     Interrupt (, Level, ActiveHigh, Shared)
541                         { 5, 10, 11 }
542                 })
543                 Method (_STA, 0, NotSerialized)
544                 {
545                     Store (0x0B, Local0)
546                     If (And (0x80, PRQ0, Local1))
547                     {
548                          Store (0x09, Local0)
549                     }
550                     Return (Local0)
551                 }
552                 Method (_DIS, 0, NotSerialized)
553                 {
554                     Or (PRQ0, 0x80, PRQ0)
555                 }
556                 Method (_CRS, 0, NotSerialized)
557                 {
558                     Name (PRR0, ResourceTemplate ()
559                     {
560                         Interrupt (, Level, ActiveHigh, Shared)
561                             {1}
562                     })
563                     CreateDWordField (PRR0, 0x05, TMP)
564                     Store (PRQ0, Local0)
565                     If (LLess (Local0, 0x80))
566                     {
567                         Store (Local0, TMP)
568                     }
569                     Else
570                     {
571                         Store (Zero, TMP)
572                     }
573                     Return (PRR0)
574                 }
575                 Method (_SRS, 1, NotSerialized)
576                 {
577                     CreateDWordField (Arg0, 0x05, TMP)
578                     Store (TMP, PRQ0)
579                 }
580         }
581         Device(LNKB){
582                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
583                 Name(_UID, 2)
584                 Name(_PRS, ResourceTemplate(){
585                     Interrupt (, Level, ActiveHigh, Shared)
586                         { 5, 10, 11 }
587                 })
588                 Method (_STA, 0, NotSerialized)
589                 {
590                     Store (0x0B, Local0)
591                     If (And (0x80, PRQ1, Local1))
592                     {
593                          Store (0x09, Local0)
594                     }
595                     Return (Local0)
596                 }
597                 Method (_DIS, 0, NotSerialized)
598                 {
599                     Or (PRQ1, 0x80, PRQ1)
600                 }
601                 Method (_CRS, 0, NotSerialized)
602                 {
603                     Name (PRR0, ResourceTemplate ()
604                     {
605                         Interrupt (, Level, ActiveHigh, Shared)
606                             {1}
607                     })
608                     CreateDWordField (PRR0, 0x05, TMP)
609                     Store (PRQ1, Local0)
610                     If (LLess (Local0, 0x80))
611                     {
612                         Store (Local0, TMP)
613                     }
614                     Else
615                     {
616                         Store (Zero, TMP)
617                     }
618                     Return (PRR0)
619                 }
620                 Method (_SRS, 1, NotSerialized)
621                 {
622                     CreateDWordField (Arg0, 0x05, TMP)
623                     Store (TMP, PRQ1)
624                 }
625         }
626         Device(LNKC){
627                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
628                 Name(_UID, 3)
629                 Name(_PRS, ResourceTemplate(){
630                     Interrupt (, Level, ActiveHigh, Shared)
631                         { 5, 10, 11 }
632                 })
633                 Method (_STA, 0, NotSerialized)
634                 {
635                     Store (0x0B, Local0)
636                     If (And (0x80, PRQ2, Local1))
637                     {
638                          Store (0x09, Local0)
639                     }
640                     Return (Local0)
641                 }
642                 Method (_DIS, 0, NotSerialized)
643                 {
644                     Or (PRQ2, 0x80, PRQ2)
645                 }
646                 Method (_CRS, 0, NotSerialized)
647                 {
648                     Name (PRR0, ResourceTemplate ()
649                     {
650                         Interrupt (, Level, ActiveHigh, Shared)
651                             {1}
652                     })
653                     CreateDWordField (PRR0, 0x05, TMP)
654                     Store (PRQ2, Local0)
655                     If (LLess (Local0, 0x80))
656                     {
657                         Store (Local0, TMP)
658                     }
659                     Else
660                     {
661                         Store (Zero, TMP)
662                     }
663                     Return (PRR0)
664                 }
665                 Method (_SRS, 1, NotSerialized)
666                 {
667                     CreateDWordField (Arg0, 0x05, TMP)
668                     Store (TMP, PRQ2)
669                 }
670         }
671         Device(LNKD){
672                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
673                 Name(_UID, 4)
674                 Name(_PRS, ResourceTemplate(){
675                     Interrupt (, Level, ActiveHigh, Shared)
676                         { 5, 10, 11 }
677                 })
678                 Method (_STA, 0, NotSerialized)
679                 {
680                     Store (0x0B, Local0)
681                     If (And (0x80, PRQ3, Local1))
682                     {
683                          Store (0x09, Local0)
684                     }
685                     Return (Local0)
686                 }
687                 Method (_DIS, 0, NotSerialized)
688                 {
689                     Or (PRQ3, 0x80, PRQ3)
690                 }
691                 Method (_CRS, 0, NotSerialized)
692                 {
693                     Name (PRR0, ResourceTemplate ()
694                     {
695                         Interrupt (, Level, ActiveHigh, Shared)
696                             {1}
697                     })
698                     CreateDWordField (PRR0, 0x05, TMP)
699                     Store (PRQ3, Local0)
700                     If (LLess (Local0, 0x80))
701                     {
702                         Store (Local0, TMP)
703                     }
704                     Else
705                     {
706                         Store (Zero, TMP)
707                     }
708                     Return (PRR0)
709                 }
710                 Method (_SRS, 1, NotSerialized)
711                 {
712                     CreateDWordField (Arg0, 0x05, TMP)
713                     Store (TMP, PRQ3)
714                 }
715         }
716     }
718     /*
719      * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
720      * must match piix4 emulation.
721      */
722     Name (\_S3, Package (0x04)
723     {
724         0x01,  /* PM1a_CNT.SLP_TYP */
725         0x01,  /* PM1b_CNT.SLP_TYP */
726         Zero,  /* reserved */
727         Zero   /* reserved */
728     })
729     Name (\_S4, Package (0x04)
730     {
731         Zero,  /* PM1a_CNT.SLP_TYP */
732         Zero,  /* PM1b_CNT.SLP_TYP */
733         Zero,  /* reserved */
734         Zero   /* reserved */
735     })
736     Name (\_S5, Package (0x04)
737     {
738         Zero,  /* PM1a_CNT.SLP_TYP */
739         Zero,  /* PM1b_CNT.SLP_TYP */
740         Zero,  /* reserved */
741         Zero   /* reserved */
742     })
744     Scope (\_GPE)
745     {
746         Name(_HID, "ACPI0006")
748         Method(_L00) {
749             Return(0x01)
750         }
752 #define gen_pci_hotplug(nr)                                       \
753             If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) {          \
754                 Notify(\_SB.PCI0.S##nr, 1)                        \
755             }                                                     \
756             If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) {          \
757                 Notify(\_SB.PCI0.S##nr, 3)                        \
758             }
760         Method(_L01) {
761             gen_pci_hotplug(1)
762             gen_pci_hotplug(2)
763             gen_pci_hotplug(3)
764             gen_pci_hotplug(4)
765             gen_pci_hotplug(5)
766             gen_pci_hotplug(6)
767             gen_pci_hotplug(7)
768             gen_pci_hotplug(8)
769             gen_pci_hotplug(9)
770             gen_pci_hotplug(10)
771             gen_pci_hotplug(11)
772             gen_pci_hotplug(12)
773             gen_pci_hotplug(13)
774             gen_pci_hotplug(14)
775             gen_pci_hotplug(15)
776             gen_pci_hotplug(16)
777             gen_pci_hotplug(17)
778             gen_pci_hotplug(18)
779             gen_pci_hotplug(19)
780             gen_pci_hotplug(20)
781             gen_pci_hotplug(21)
782             gen_pci_hotplug(22)
783             gen_pci_hotplug(23)
784             gen_pci_hotplug(24)
785             gen_pci_hotplug(25)
786             gen_pci_hotplug(26)
787             gen_pci_hotplug(27)
788             gen_pci_hotplug(28)
789             gen_pci_hotplug(29)
790             gen_pci_hotplug(30)
791             gen_pci_hotplug(31)
793             Return(0x01)
794         }
796         Method(_L02) {
797             Return(\_PR.PRSC())
798         }
799         Method(_L03) {
800             Return(0x01)
801         }
802         Method(_L04) {
803             Return(0x01)
804         }
805         Method(_L05) {
806             Return(0x01)
807         }
808         Method(_L06) {
809             Return(0x01)
810         }
811         Method(_L07) {
812             Return(0x01)
813         }
814         Method(_L08) {
815             Return(0x01)
816         }
817         Method(_L09) {
818             Return(0x01)
819         }
820         Method(_L0A) {
821             Return(0x01)
822         }
823         Method(_L0B) {
824             Return(0x01)
825         }
826         Method(_L0C) {
827             Return(0x01)
828         }
829         Method(_L0D) {
830             Return(0x01)
831         }
832         Method(_L0E) {
833             Return(0x01)
834         }
835         Method(_L0F) {
836             Return(0x01)
837         }
838     }