Ticket #138: dsdt_awrdacpi1.dsl

File dsdt_awrdacpi1.dsl, 169.8 KB (added by Chuck McKinnis, 17 years ago)

iasl -d v2.0

Line 
1/*
2 * Intel ACPI Component Architecture
3 * AML Disassembler version 20060912
4 *
5 * Disassembly of (null), Fri Oct 26 12:07:28 2007
6 *
7 *
8 * Original Table Header:
9 *     Signature        "DSDT"
10 *     Length           0x000040B7 (16567)
11 *     Revision         0x01
12 *     OEM ID           "INTELR"
13 *     OEM Table ID     "AWRDACPI"
14 *     OEM Revision     0x00001000 (4096)
15 *     Creator ID       "MSFT"
16 *     Creator Revision 0x0100000E (16777230)
17 */
18DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTELR", "AWRDACPI", 0x00001000)
19{
20    Scope (\_PR)
21    {
22        Processor (\_PR.CPU0, 0x00, 0x00000000, 0x00) {}
23        Processor (\_PR.CPU1, 0x01, 0x00000000, 0x00) {}
24    }
25
26    Name (\_S0, Package (0x04)
27    {
28        0x00,
29        0x00,
30        0x00,
31        0x00
32    })
33    Name (\_S1, Package (0x04)
34    {
35        0x01,
36        0x00,
37        0x00,
38        0x00
39    })
40    Name (\SS3, Package (0x04)
41    {
42        0x05,
43        0x00,
44        0x00,
45        0x00
46    })
47    Name (\_S4, Package (0x04)
48    {
49        0x06,
50        0x00,
51        0x00,
52        0x00
53    })
54    Name (\_S5, Package (0x04)
55    {
56        0x07,
57        0x00,
58        0x00,
59        0x00
60    })
61    Name (FLAG, 0x00)
62    Name (STAT, 0x00)
63    OperationRegion (\DEBG, SystemIO, 0x80, 0x01)
64    Field (\DEBG, ByteAcc, NoLock, Preserve)
65    {
66        DBG1,   8
67    }
68
69    OperationRegion (EXTM, SystemMemory, 0x000FF830, 0x10)
70    Field (EXTM, WordAcc, NoLock, Preserve)
71    {
72        ROM1,   16,
73        RMS1,   16,
74        ROM2,   16,
75        RMS2,   16,
76        ROM3,   16,
77        RMS3,   16,
78        AMEM,   32
79    }
80
81    OperationRegion (\SMIC, SystemIO, 0xB2, 0x01)
82    Field (\SMIC, ByteAcc, NoLock, Preserve)
83    {
84        SCP,    8
85    }
86
87    OperationRegion (\PM1S, SystemIO, 0x4000, 0x04)
88    Field (\PM1S, ByteAcc, NoLock, Preserve)
89    {
90        PM00,   8,
91        PM01,   8,
92        PM02,   8,
93        PM03,   8
94    }
95
96    OperationRegion (\SPEN, SystemIO, 0x4030, 0x01)
97    Field (\SPEN, ByteAcc, NoLock, Preserve)
98    {
99            ,   4,
100        TRAP,   1
101    }
102
103    OperationRegion (\GPI, SystemIO, 0x402A, 0x02)
104    Field (\GPI, ByteAcc, NoLock, Preserve)
105    {
106        GI00,   1,
107        GI01,   1,
108        GI02,   1,
109        GI03,   1,
110        GI04,   1,
111        GI05,   1,
112        GI06,   1,
113        GI07,   1,
114        GI08,   1,
115        GI09,   1,
116        GI0A,   1,
117        GI0B,   1,
118        GI0C,   1,
119        GI0D,   1,
120        GI0E,   1,
121        GI0F,   1
122    }
123
124    OperationRegion (\GPI1, SystemIO, 0x408E, 0x02)
125    Field (\GPI1, ByteAcc, NoLock, Preserve)
126    {
127        GI10,   1,
128        GI11,   1,
129        GI12,   1,
130        GI13,   1,
131        GI14,   1,
132        GI15,   1,
133        GI16,   1,
134        GI17,   1,
135        GI18,   1,
136        GI19,   1,
137        GI1A,   1,
138        GI1B,   1,
139        GI1C,   1,
140        GI1D,   1,
141        GI1E,   1,
142        GI1F,   1
143    }
144
145    OperationRegion (\GBLE, SystemIO, 0x4021, 0x01)
146    Field (\GBLE, ByteAcc, NoLock, Preserve)
147    {
148        ESMI,   8
149    }
150
151    OperationRegion (APMP, SystemIO, 0xB2, 0x02)
152    Field (APMP, ByteAcc, NoLock, Preserve)
153    {
154        APMC,   8,
155        APMD,   8
156    }
157
158    OperationRegion (\GPO, SystemIO, 0x408E, 0x02)
159    Field (\GPO, ByteAcc, NoLock, Preserve)
160    {
161        GO10,   1,
162        GO11,   1,
163            ,   1,
164            ,   1,
165            ,   1,
166        GO15,   1,
167        GO16,   1,
168        GO17,   1,
169        GO18,   1,
170        GO19,   1,
171        GO1A,   1,
172        GO1B,   1,
173        GO1C,   1
174    }
175
176    OperationRegion (\GPO2, SystemIO, 0x40B8, 0x02)
177    Field (\GPO2, ByteAcc, NoLock, Preserve)
178    {
179        GO20,   1,
180        GO21,   1,
181        GO22,   1,
182        GO23,   1,
183        GO24,   1,
184        GO25,   1,
185        GO26,   1,
186        GO27,   1,
187        GO28,   1,
188        GO29,   1,
189        GO2A,   1,
190        GO2B,   1
191    }
192
193    Name (OSFX, 0x01)
194    Name (OSFL, 0x01)
195    Method (STRC, 2, NotSerialized)
196    {
197        If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1)))
198        {
199            Return (0x00)
200        }
201
202        Add (SizeOf (Arg0), 0x01, Local0)
203        Name (BUF0, Buffer (Local0) {})
204        Name (BUF1, Buffer (Local0) {})
205        Store (Arg0, BUF0)
206        Store (Arg1, BUF1)
207        While (Local0)
208        {
209            Decrement (Local0)
210            If (LNotEqual (DerefOf (Index (BUF0, Local0)), DerefOf (Index (
211                BUF1, Local0))))
212            {
213                Return (Zero)
214            }
215        }
216
217        Return (One)
218    }
219
220    OperationRegion (RTCM, SystemIO, 0x70, 0x02)
221    Field (RTCM, ByteAcc, NoLock, Preserve)
222    {
223        CMIN,   8,
224        CMDA,   8
225    }
226
227    IndexField (CMIN, CMDA, ByteAcc, NoLock, Preserve)
228    {
229                Offset (0x0F),
230        SHUT,   8
231    }
232
233    OperationRegion (INFO, SystemMemory, 0x000FF840, 0x01)
234    Field (INFO, ByteAcc, NoLock, Preserve)
235    {
236        KBDI,   1,
237        RTCW,   1,
238        PS2F,   1,
239        IRFL,   2,
240        DISE,   1,
241        SSHU,   1
242    }
243
244    OperationRegion (BEEP, SystemIO, 0x61, 0x01)
245    Field (BEEP, ByteAcc, NoLock, Preserve)
246    {
247        S1B,    8
248    }
249
250    OperationRegion (CONT, SystemIO, 0x40, 0x04)
251    Field (CONT, ByteAcc, NoLock, Preserve)
252    {
253        CNT0,   8,
254        CNT1,   8,
255        CNT2,   8,
256        CTRL,   8
257    }
258
259    Method (SPKR, 1, NotSerialized)
260    {
261        Store (S1B, Local0)
262        Store (0xB6, CTRL)
263        Store (0x55, CNT2)
264        Store (0x03, CNT2)
265        Store (Arg0, Local2)
266        While (LGreater (Local2, 0x00))
267        {
268            Or (S1B, 0x03, S1B)
269            Store (0x5FFF, Local3)
270            While (LGreater (Local3, 0x00))
271            {
272                Decrement (Local3)
273            }
274
275            And (S1B, 0xFC, S1B)
276            Store (0x0EFF, Local3)
277            While (LGreater (Local3, 0x00))
278            {
279                Decrement (Local3)
280            }
281
282            Decrement (Local2)
283        }
284
285        Store (Local0, S1B)
286    }
287
288    Scope (\)
289    {
290        Name (PICF, 0x00)
291        Method (_PIC, 1, NotSerialized)
292        {
293            Store (Arg0, PICF)
294        }
295    }
296
297    Method (\_PTS, 1, NotSerialized)
298    {
299        Or (Arg0, 0xF0, Local0)
300        Store (Local0, DBG1)
301        OSTP ()
302        If (LEqual (Arg0, 0x01))
303        {
304            Store (Arg0, Local0)
305            SALD (Local0)
306            SFAN (Zero)
307        }
308
309        If (LEqual (Arg0, 0x02)) {}
310        If (LEqual (Arg0, 0x03))
311        {
312            Store (Arg0, Local0)
313            SALD (Local0)
314        }
315
316        If (LEqual (Arg0, 0x05))
317        {
318            Store (ESMI, Local0)
319            And (Local0, 0xFB, Local0)
320            Store (Local0, ESMI)
321            Store (Arg0, Local0)
322            SALD (Local0)
323        }
324
325        If (LEqual (Arg0, 0x04))
326        {
327            If (LNot (PICF))
328            {
329                Sleep (0x64)
330            }
331        }
332    }
333
334    Method (\_WAK, 1, NotSerialized)
335    {
336        Store (0xFF, DBG1)
337        While (LEqual (GI0C, One))
338        {
339            Store (One, GI0C)
340            Store (0x77, FLAG)
341            Notify (\_SB.SLPB, 0x02)
342        }
343
344        SALD (0x00)
345        SFAN (0xFF)
346        Notify (\_SB.PCI0.PX40.UAR1, 0x00)
347        If (OSFL)
348        {
349            Notify (\_SB.PWRB, 0x02)
350        }
351        Else
352        {
353            If (LEqual (RTCW, 0x00))
354            {
355                Notify (\_SB.PWRB, 0x02)
356            }
357        }
358
359        Notify (\_SB.PCI0.USB0, 0x00)
360        Notify (\_SB.PCI0.USB1, 0x00)
361        Notify (\_SB.PCI0.USB2, 0x00)
362    }
363
364    Scope (\_SI)
365    {
366        Method (_MSG, 1, NotSerialized)
367        {
368            Store (Local0, Local0)
369        }
370
371        Method (_SST, 1, NotSerialized)
372        {
373            Store (Local0, Local0)
374        }
375    }
376
377    Scope (\_GPE)
378    {
379        Method (_L05, 0, NotSerialized)
380        {
381            Notify (\_SB.PCI0.MODM, 0x02)
382        }
383
384        Method (_L03, 0, NotSerialized)
385        {
386            Notify (\_SB.PCI0.USB0, 0x02)
387        }
388
389        Method (_L04, 0, NotSerialized)
390        {
391            Notify (\_SB.PCI0.USB1, 0x02)
392        }
393
394        Method (_L0B, 0, NotSerialized)
395        {
396            Notify (\_SB.PCI0.HUB0, 0x02)
397        }
398
399        Method (_L08, 0, NotSerialized)
400        {
401            Notify (\_SB.PCI0.PX40.UAR1, 0x02)
402            Notify (\_SB.PCI0.PX40.UAR2, 0x02)
403        }
404
405        Method (_L1B, 0, NotSerialized)
406        {
407            If (LEqual (FLAG, 0x77))
408            {
409                While (LEqual (GI0C, One))
410                {
411                    Store (One, GI0C)
412                }
413
414                Store (0x00, FLAG)
415                Notify (\_SB.SLPB, 0x02)
416            }
417            Else
418            {
419                Notify (\_SB.SLPB, 0x80)
420            }
421        }
422
423        Method (_L0C, 0, NotSerialized)
424        {
425            Notify (\_SB.PCI0.USB2, 0x02)
426        }
427
428        Method (_L0D, 0, NotSerialized)
429        {
430            Notify (\_SB.PCI0.USBE, 0x02)
431        }
432    }
433
434    Scope (\_SB)
435    {
436        Device (PWRB)
437        {
438            Name (_HID, EisaId ("PNP0C0C"))
439            Method (_STA, 0, NotSerialized)
440            {
441                Return (0x0B)
442            }
443        }
444
445        Device (SLPB)
446        {
447            Name (_HID, EisaId ("PNP0C0E"))
448            Method (_STA, 0, NotSerialized)
449            {
450                Return (0x0B)
451            }
452
453            Name (_PRW, Package (0x02)
454            {
455                0x1B,
456                0x05
457            })
458        }
459
460        Device (PCI0)
461        {
462            Name (_HID, EisaId ("PNP0A03"))
463            Name (_ADR, 0x00)
464            Name (_UID, 0x01)
465            Name (_BBN, 0x00)
466            Method (SS3D, 0, NotSerialized)
467            {
468                If (LEqual (OSFL, 0x02))
469                {
470                    Return (0x02)
471                }
472                Else
473                {
474                    Return (0x03)
475                }
476            }
477
478            Method (_STA, 0, NotSerialized)
479            {
480                Return (0x0F)
481            }
482
483            Method (_CRS, 0, NotSerialized)
484            {
485                Name (BUF0, ResourceTemplate ()
486                {
487                    WordBusNumber (ResourceConsumer, MinNotFixed, MaxNotFixed, PosDecode,
488                        0x0000,             // Granularity
489                        0x0000,             // Range Minimum
490                        0x00FF,             // Range Maximum
491                        0x0000,             // Translation Offset
492                        0x0100,             // Length
493                        ,, )
494                    IO (Decode16,
495                        0x0CF8,             // Range Minimum
496                        0x0CF8,             // Range Maximum
497                        0x01,               // Alignment
498                        0x08,               // Length
499                        )
500                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
501                        0x0000,             // Granularity
502                        0x0000,             // Range Minimum
503                        0x0CF7,             // Range Maximum
504                        0x0000,             // Translation Offset
505                        0x0CF8,             // Length
506                        ,, , TypeStatic)
507                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
508                        0x0000,             // Granularity
509                        0x0D00,             // Range Minimum
510                        0xFFFF,             // Range Maximum
511                        0x0000,             // Translation Offset
512                        0xF300,             // Length
513                        ,, , TypeStatic)
514                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
515                        0x00000000,         // Granularity
516                        0x000A0000,         // Range Minimum
517                        0x000BFFFF,         // Range Maximum
518                        0x00000000,         // Translation Offset
519                        0x00020000,         // Length
520                        ,, , AddressRangeMemory, TypeStatic)
521                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
522                        0x00000000,         // Granularity
523                        0x000C0000,         // Range Minimum
524                        0x000DFFFF,         // Range Maximum
525                        0x00000000,         // Translation Offset
526                        0x00020000,         // Length
527                        ,, , AddressRangeMemory, TypeStatic)
528                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
529                        0x00000000,         // Granularity
530                        0x00100000,         // Range Minimum
531                        0xFEBFFFFF,         // Range Maximum
532                        0x00000000,         // Translation Offset
533                        0xFFF00000,         // Length
534                        ,, _Y00, AddressRangeMemory, TypeStatic)
535                })
536                CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._MIN, TCMM)
537                CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._LEN, TOMM)
538                Add (AMEM, 0x00010000, TCMM)
539                Subtract (0xFEC00000, TCMM, TOMM)
540                Return (BUF0)
541            }
542
543            Name (PICM, Package (0x17)
544            {
545                Package (0x04)
546                {
547                    0x0002FFFF,
548                    0x00,
549                    \_SB.PCI0.LNKA,
550                    0x00
551                },
552
553                Package (0x04)
554                {
555                    0x0002FFFF,
556                    0x01,
557                    \_SB.PCI0.LNKB,
558                    0x00
559                },
560
561                Package (0x04)
562                {
563                    0x0002FFFF,
564                    0x02,
565                    \_SB.PCI0.LNKC,
566                    0x00
567                },
568
569                Package (0x04)
570                {
571                    0x0002FFFF,
572                    0x03,
573                    \_SB.PCI0.LNKD,
574                    0x00
575                },
576
577                Package (0x04)
578                {
579                    0x001EFFFF,
580                    0x00,
581                    \_SB.PCI0.LNKA,
582                    0x00
583                },
584
585                Package (0x04)
586                {
587                    0x001EFFFF,
588                    0x01,
589                    \_SB.PCI0.LNKB,
590                    0x00
591                },
592
593                Package (0x04)
594                {
595                    0x001EFFFF,
596                    0x02,
597                    \_SB.PCI0.LNKC,
598                    0x00
599                },
600
601                Package (0x04)
602                {
603                    0x001EFFFF,
604                    0x03,
605                    \_SB.PCI0.LNKD,
606                    0x00
607                },
608
609                Package (0x04)
610                {
611                    0x0002FFFF,
612                    0x00,
613                    \_SB.PCI0.LNKA,
614                    0x00
615                },
616
617                Package (0x04)
618                {
619                    0x0002FFFF,
620                    0x01,
621                    \_SB.PCI0.LNKB,
622                    0x00
623                },
624
625                Package (0x04)
626                {
627                    0x0002FFFF,
628                    0x02,
629                    \_SB.PCI0.LNKC,
630                    0x00
631                },
632
633                Package (0x04)
634                {
635                    0x0002FFFF,
636                    0x03,
637                    \_SB.PCI0.LNKD,
638                    0x00
639                },
640
641                Package (0x04)
642                {
643                    0x001FFFFF,
644                    0x02,
645                    \_SB.PCI0.LNKA,
646                    0x00
647                },
648
649                Package (0x04)
650                {
651                    0x001FFFFF,
652                    0x00,
653                    \_SB.PCI0.LNKC,
654                    0x00
655                },
656
657                Package (0x04)
658                {
659                    0x001FFFFF,
660                    0x01,
661                    \_SB.PCI0.LNKB,
662                    0x00
663                },
664
665                Package (0x04)
666                {
667                    0x001DFFFF,
668                    0x00,
669                    \_SB.PCI0.LNKA,
670                    0x00
671                },
672
673                Package (0x04)
674                {
675                    0x001DFFFF,
676                    0x01,
677                    \_SB.PCI0.LNKD,
678                    0x00
679                },
680
681                Package (0x04)
682                {
683                    0x001DFFFF,
684                    0x02,
685                    \_SB.PCI0.LNKC,
686                    0x00
687                },
688
689                Package (0x04)
690                {
691                    0x001DFFFF,
692                    0x03,
693                    \_SB.PCI0.LNK1,
694                    0x00
695                },
696
697                Package (0x04)
698                {
699                    0x0001FFFF,
700                    0x00,
701                    \_SB.PCI0.LNKA,
702                    0x00
703                },
704
705                Package (0x04)
706                {
707                    0x0001FFFF,
708                    0x01,
709                    \_SB.PCI0.LNKB,
710                    0x00
711                },
712
713                Package (0x04)
714                {
715                    0x0001FFFF,
716                    0x02,
717                    \_SB.PCI0.LNKC,
718                    0x00
719                },
720
721                Package (0x04)
722                {
723                    0x0001FFFF,
724                    0x03,
725                    \_SB.PCI0.LNKD,
726                    0x00
727                }
728            })
729            Name (APIC, Package (0x17)
730            {
731                Package (0x04)
732                {
733                    0x0002FFFF,
734                    0x00,
735                    0x00,
736                    0x10
737                },
738
739                Package (0x04)
740                {
741                    0x0002FFFF,
742                    0x01,
743                    0x00,
744                    0x11
745                },
746
747                Package (0x04)
748                {
749                    0x0002FFFF,
750                    0x02,
751                    0x00,
752                    0x12
753                },
754
755                Package (0x04)
756                {
757                    0x0002FFFF,
758                    0x03,
759                    0x00,
760                    0x13
761                },
762
763                Package (0x04)
764                {
765                    0x001EFFFF,
766                    0x00,
767                    0x00,
768                    0x10
769                },
770
771                Package (0x04)
772                {
773                    0x001EFFFF,
774                    0x01,
775                    0x00,
776                    0x11
777                },
778
779                Package (0x04)
780                {
781                    0x001EFFFF,
782                    0x02,
783                    0x00,
784                    0x12
785                },
786
787                Package (0x04)
788                {
789                    0x001EFFFF,
790                    0x03,
791                    0x00,
792                    0x13
793                },
794
795                Package (0x04)
796                {
797                    0x0002FFFF,
798                    0x00,
799                    0x00,
800                    0x10
801                },
802
803                Package (0x04)
804                {
805                    0x0002FFFF,
806                    0x01,
807                    0x00,
808                    0x11
809                },
810
811                Package (0x04)
812                {
813                    0x0002FFFF,
814                    0x02,
815                    0x00,
816                    0x12
817                },
818
819                Package (0x04)
820                {
821                    0x0002FFFF,
822                    0x03,
823                    0x00,
824                    0x13
825                },
826
827                Package (0x04)
828                {
829                    0x001FFFFF,
830                    0x02,
831                    0x00,
832                    0x10
833                },
834
835                Package (0x04)
836                {
837                    0x001FFFFF,
838                    0x00,
839                    0x00,
840                    0x12
841                },
842
843                Package (0x04)
844                {
845                    0x001FFFFF,
846                    0x01,
847                    0x00,
848                    0x11
849                },
850
851                Package (0x04)
852                {
853                    0x001DFFFF,
854                    0x00,
855                    0x00,
856                    0x10
857                },
858
859                Package (0x04)
860                {
861                    0x001DFFFF,
862                    0x01,
863                    0x00,
864                    0x13
865                },
866
867                Package (0x04)
868                {
869                    0x001DFFFF,
870                    0x02,
871                    0x00,
872                    0x12
873                },
874
875                Package (0x04)
876                {
877                    0x001DFFFF,
878                    0x03,
879                    0x00,
880                    0x17
881                },
882
883                Package (0x04)
884                {
885                    0x0001FFFF,
886                    0x00,
887                    0x00,
888                    0x10
889                },
890
891                Package (0x04)
892                {
893                    0x0001FFFF,
894                    0x01,
895                    0x00,
896                    0x11
897                },
898
899                Package (0x04)
900                {
901                    0x0001FFFF,
902                    0x02,
903                    0x00,
904                    0x12
905                },
906
907                Package (0x04)
908                {
909                    0x0001FFFF,
910                    0x03,
911                    0x00,
912                    0x13
913                }
914            })
915            Method (_PRT, 0, NotSerialized)
916            {
917                If (LNot (PICF))
918                {
919                    Return (PICM)
920                }
921                Else
922                {
923                    Return (APIC)
924                }
925            }
926
927            Device (HUB0)
928            {
929                Name (_ADR, 0x001E0000)
930                Method (_STA, 0, NotSerialized)
931                {
932                    Return (0x0F)
933                }
934
935                Name (PICM, Package (0x14)
936                {
937                    Package (0x04)
938                    {
939                        0x0008FFFF,
940                        0x00,
941                        \_SB.PCI0.LNKE,
942                        0x00
943                    },
944
945                    Package (0x04)
946                    {
947                        0x0008FFFF,
948                        0x01,
949                        \_SB.PCI0.LNKF,
950                        0x00
951                    },
952
953                    Package (0x04)
954                    {
955                        0x0008FFFF,
956                        0x02,
957                        \_SB.PCI0.LNK0,
958                        0x00
959                    },
960
961                    Package (0x04)
962                    {
963                        0x0008FFFF,
964                        0x03,
965                        \_SB.PCI0.LNK1,
966                        0x00
967                    },
968
969                    Package (0x04)
970                    {
971                        0xFFFF,
972                        0x00,
973                        \_SB.PCI0.LNKA,
974                        0x00
975                    },
976
977                    Package (0x04)
978                    {
979                        0xFFFF,
980                        0x01,
981                        \_SB.PCI0.LNKB,
982                        0x00
983                    },
984
985                    Package (0x04)
986                    {
987                        0xFFFF,
988                        0x02,
989                        \_SB.PCI0.LNKC,
990                        0x00
991                    },
992
993                    Package (0x04)
994                    {
995                        0xFFFF,
996                        0x03,
997                        \_SB.PCI0.LNKD,
998                        0x00
999                    },
1000
1001                    Package (0x04)
1002                    {
1003                        0x0001FFFF,
1004                        0x00,
1005                        \_SB.PCI0.LNKB,
1006                        0x00
1007                    },
1008
1009                    Package (0x04)
1010                    {
1011                        0x0001FFFF,
1012                        0x01,
1013                        \_SB.PCI0.LNKC,
1014                        0x00
1015                    },
1016
1017                    Package (0x04)
1018                    {
1019                        0x0001FFFF,
1020                        0x02,
1021                        \_SB.PCI0.LNKD,
1022                        0x00
1023                    },
1024
1025                    Package (0x04)
1026                    {
1027                        0x0001FFFF,
1028                        0x03,
1029                        \_SB.PCI0.LNKA,
1030                        0x00
1031                    },
1032
1033                    Package (0x04)
1034                    {
1035                        0x0002FFFF,
1036                        0x00,
1037                        \_SB.PCI0.LNKC,
1038                        0x00
1039                    },
1040
1041                    Package (0x04)
1042                    {
1043                        0x0002FFFF,
1044                        0x01,
1045                        \_SB.PCI0.LNKD,
1046                        0x00
1047                    },
1048
1049                    Package (0x04)
1050                    {
1051                        0x0002FFFF,
1052                        0x02,
1053                        \_SB.PCI0.LNKA,
1054                        0x00
1055                    },
1056
1057                    Package (0x04)
1058                    {
1059                        0x0002FFFF,
1060                        0x03,
1061                        \_SB.PCI0.LNKB,
1062                        0x00
1063                    },
1064
1065                    Package (0x04)
1066                    {
1067                        0x000DFFFF,
1068                        0x00,
1069                        \_SB.PCI0.LNKF,
1070                        0x00
1071                    },
1072
1073                    Package (0x04)
1074                    {
1075                        0x000DFFFF,
1076                        0x01,
1077                        \_SB.PCI0.LNK0,
1078                        0x00
1079                    },
1080
1081                    Package (0x04)
1082                    {
1083                        0x000DFFFF,
1084                        0x02,
1085                        \_SB.PCI0.LNK1,
1086                        0x00
1087                    },
1088
1089                    Package (0x04)
1090                    {
1091                        0x000DFFFF,
1092                        0x03,
1093                        \_SB.PCI0.LNKE,
1094                        0x00
1095                    }
1096                })
1097                Name (APIC, Package (0x14)
1098                {
1099                    Package (0x04)
1100                    {
1101                        0x0008FFFF,
1102                        0x00,
1103                        0x00,
1104                        0x14
1105                    },
1106
1107                    Package (0x04)
1108                    {
1109                        0x0008FFFF,
1110                        0x01,
1111                        0x00,
1112                        0x15
1113                    },
1114
1115                    Package (0x04)
1116                    {
1117                        0x0008FFFF,
1118                        0x02,
1119                        0x00,
1120                        0x16
1121                    },
1122
1123                    Package (0x04)
1124                    {
1125                        0x0008FFFF,
1126                        0x03,
1127                        0x00,
1128                        0x17
1129                    },
1130
1131                    Package (0x04)
1132                    {
1133                        0xFFFF,
1134                        0x00,
1135                        0x00,
1136                        0x10
1137                    },
1138
1139                    Package (0x04)
1140                    {
1141                        0xFFFF,
1142                        0x01,
1143                        0x00,
1144                        0x11
1145                    },
1146
1147                    Package (0x04)
1148                    {
1149                        0xFFFF,
1150                        0x02,
1151                        0x00,
1152                        0x12
1153                    },
1154
1155                    Package (0x04)
1156                    {
1157                        0xFFFF,
1158                        0x03,
1159                        0x00,
1160                        0x13
1161                    },
1162
1163                    Package (0x04)
1164                    {
1165                        0x0001FFFF,
1166                        0x00,
1167                        0x00,
1168                        0x11
1169                    },
1170
1171                    Package (0x04)
1172                    {
1173                        0x0001FFFF,
1174                        0x01,
1175                        0x00,
1176                        0x12
1177                    },
1178
1179                    Package (0x04)
1180                    {
1181                        0x0001FFFF,
1182                        0x02,
1183                        0x00,
1184                        0x13
1185                    },
1186
1187                    Package (0x04)
1188                    {
1189                        0x0001FFFF,
1190                        0x03,
1191                        0x00,
1192                        0x10
1193                    },
1194
1195                    Package (0x04)
1196                    {
1197                        0x0002FFFF,
1198                        0x00,
1199                        0x00,
1200                        0x12
1201                    },
1202
1203                    Package (0x04)
1204                    {
1205                        0x0002FFFF,
1206                        0x01,
1207                        0x00,
1208                        0x13
1209                    },
1210
1211                    Package (0x04)
1212                    {
1213                        0x0002FFFF,
1214                        0x02,
1215                        0x00,
1216                        0x10
1217                    },
1218
1219                    Package (0x04)
1220                    {
1221                        0x0002FFFF,
1222                        0x03,
1223                        0x00,
1224                        0x11
1225                    },
1226
1227                    Package (0x04)
1228                    {
1229                        0x000DFFFF,
1230                        0x00,
1231                        0x00,
1232                        0x15
1233                    },
1234
1235                    Package (0x04)
1236                    {
1237                        0x000DFFFF,
1238                        0x01,
1239                        0x00,
1240                        0x16
1241                    },
1242
1243                    Package (0x04)
1244                    {
1245                        0x000DFFFF,
1246                        0x02,
1247                        0x00,
1248                        0x17
1249                    },
1250
1251                    Package (0x04)
1252                    {
1253                        0x000DFFFF,
1254                        0x03,
1255                        0x00,
1256                        0x14
1257                    }
1258                })
1259                Method (_PRT, 0, NotSerialized)
1260                {
1261                    If (LNot (PICF))
1262                    {
1263                        Return (PICM)
1264                    }
1265                    Else
1266                    {
1267                        Return (APIC)
1268                    }
1269                }
1270
1271                Method (_PRW, 0, NotSerialized)
1272                {
1273                    Return (Package (0x02)
1274                    {
1275                        0x0B,
1276                        0x05
1277                    })
1278                }
1279            }
1280
1281            Device (PX40)
1282            {
1283                Name (_ADR, 0x001F0000)
1284                OperationRegion (PREV, PCI_Config, 0x08, 0x01)
1285                Scope (\)
1286                {
1287                    Field (\_SB.PCI0.PX40.PREV, ByteAcc, NoLock, Preserve)
1288                    {
1289                        REV0,   8
1290                    }
1291                }
1292
1293                OperationRegion (PIRQ, PCI_Config, 0x60, 0x04)
1294                Scope (\)
1295                {
1296                    Field (\_SB.PCI0.PX40.PIRQ, ByteAcc, NoLock, Preserve)
1297                    {
1298                        PIRA,   8,
1299                        PIRB,   8,
1300                        PIRC,   8,
1301                        PIRD,   8
1302                    }
1303                }
1304
1305                OperationRegion (PIR2, PCI_Config, 0x68, 0x04)
1306                Scope (\)
1307                {
1308                    Field (\_SB.PCI0.PX40.PIR2, ByteAcc, NoLock, Preserve)
1309                    {
1310                        PIRE,   8,
1311                        PIRF,   8,
1312                        PIRG,   8,
1313                        PIRH,   8
1314                    }
1315                }
1316
1317                OperationRegion (LPIO, PCI_Config, 0xE0, 0x0E)
1318                Scope (\)
1319                {
1320                    Field (\_SB.PCI0.PX40.LPIO, ByteAcc, NoLock, Preserve)
1321                    {
1322                        UAIO,   8,
1323                        PRIO,   8,
1324                        SNDD,   8,
1325                        FWHD,   8,
1326                        GN1L,   8,
1327                        GN1H,   8,
1328                        LPE1,   8,
1329                        LPE2,   8,
1330                                Offset (0x0C),
1331                        GN2L,   8,
1332                        GN2H,   8
1333                    }
1334
1335                    Method (DISD, 1, NotSerialized)
1336                    {
1337                        If (LEqual (Arg0, 0x00))
1338                        {
1339                            And (LPE1, 0xFE, LPE1)
1340                        }
1341
1342                        If (LEqual (Arg0, 0x01))
1343                        {
1344                            And (LPE1, 0xFD, LPE1)
1345                        }
1346
1347                        If (LEqual (Arg0, 0x02))
1348                        {
1349                            And (LPE1, 0xFB, LPE1)
1350                        }
1351
1352                        If (LEqual (Arg0, 0x03))
1353                        {
1354                            And (LPE1, 0xF7, LPE1)
1355                        }
1356
1357                        If (LEqual (Arg0, 0x04))
1358                        {
1359                            And (LPE2, 0xFC, LPE2)
1360                        }
1361
1362                        If (LEqual (Arg0, 0x05))
1363                        {
1364                            And (LPE1, 0xDF, LPE1)
1365                        }
1366
1367                        If (LEqual (Arg0, 0x06))
1368                        {
1369                            And (GN2L, 0xFE, GN2L)
1370                        }
1371                    }
1372
1373                    Method (CKIO, 2, NotSerialized)
1374                    {
1375                        If (LEqual (Arg1, 0x00))
1376                        {
1377                            Or (LPE1, 0x01, LPE1)
1378                            And (UAIO, 0xF0, Local0)
1379                            If (LEqual (Arg0, 0x03F8))
1380                            {
1381                                Or (Local0, 0x00, UAIO)
1382                            }
1383
1384                            If (LEqual (Arg0, 0x02F8))
1385                            {
1386                                Or (Local0, 0x01, UAIO)
1387                            }
1388
1389                            If (LEqual (Arg0, 0x02E8))
1390                            {
1391                                Or (Local0, 0x05, UAIO)
1392                            }
1393
1394                            If (LEqual (Arg0, 0x03E8))
1395                            {
1396                                Or (Local0, 0x07, UAIO)
1397                            }
1398                        }
1399
1400                        If (LEqual (Arg1, 0x01))
1401                        {
1402                            Or (LPE1, 0x02, LPE1)
1403                            And (UAIO, 0x0F, Local0)
1404                            If (LEqual (Arg0, 0x03F8))
1405                            {
1406                                Or (Local0, 0x00, UAIO)
1407                            }
1408
1409                            If (LEqual (Arg0, 0x02F8))
1410                            {
1411                                Or (Local0, 0x10, UAIO)
1412                            }
1413
1414                            If (LEqual (Arg0, 0x02E8))
1415                            {
1416                                Or (Local0, 0x50, UAIO)
1417                            }
1418
1419                            If (LEqual (Arg0, 0x03E8))
1420                            {
1421                                Or (Local0, 0x70, UAIO)
1422                            }
1423                        }
1424
1425                        If (LEqual (Arg1, 0x02))
1426                        {
1427                            Or (LPE1, 0x04, LPE1)
1428                            And (PRIO, 0xFC, Local0)
1429                            If (LEqual (Arg0, 0x0378))
1430                            {
1431                                Or (Local0, 0x00, PRIO)
1432                            }
1433
1434                            If (LEqual (Arg0, 0x0278))
1435                            {
1436                                Or (Local0, 0x01, PRIO)
1437                            }
1438
1439                            If (LEqual (Arg0, 0x03BC))
1440                            {
1441                                Or (Local0, 0x02, PRIO)
1442                            }
1443                        }
1444
1445                        If (LEqual (Arg1, 0x03))
1446                        {
1447                            Or (LPE1, 0x08, LPE1)
1448                        }
1449
1450                        If (LEqual (Arg1, 0x04))
1451                        {
1452                            If (LEqual (Arg0, 0x0201))
1453                            {
1454                                Or (LPE2, 0x01, LPE2)
1455                            }
1456
1457                            If (LEqual (Arg0, 0x0209))
1458                            {
1459                                Or (LPE2, 0x02, LPE2)
1460                            }
1461                        }
1462
1463                        If (LEqual (Arg1, 0x05))
1464                        {
1465                            Or (LPE1, 0x20, LPE1)
1466                            If (LEqual (Arg0, 0x0300))
1467                            {
1468                                Or (SNDD, 0x08, SNDD)
1469                            }
1470
1471                            If (LEqual (Arg0, 0x0330))
1472                            {
1473                                And (SNDD, 0xF7, SNDD)
1474                            }
1475                        }
1476
1477                        If (LEqual (Arg1, 0x06))
1478                        {
1479                            If (LNotEqual (Arg0, 0xFFFF))
1480                            {
1481                                And (Arg0, 0xFF, Local0)
1482                                Or (Local0, 0x01, GN2L)
1483                                ShiftRight (Arg0, 0x08, GN2H)
1484                            }
1485                            Else
1486                            {
1487                                Store (Zero, GN2H)
1488                                Store (Zero, GN2L)
1489                            }
1490                        }
1491                    }
1492                }
1493
1494                OperationRegion (LPDM, PCI_Config, 0x90, 0x02)
1495                Scope (\)
1496                {
1497                    Field (\_SB.PCI0.PX40.LPDM, ByteAcc, NoLock, Preserve)
1498                    {
1499                        LDM0,   8,
1500                        LDM1,   8
1501                    }
1502
1503                    Method (SLDM, 2, NotSerialized)
1504                    {
1505                        If (LEqual (Arg0, 0x00))
1506                        {
1507                            And (LDM0, 0xFC, Local0)
1508                            Or (Local0, 0x01, LDM0)
1509                        }
1510
1511                        If (LEqual (Arg0, 0x01))
1512                        {
1513                            And (LDM0, 0xF3, Local0)
1514                            Or (Local0, 0x04, LDM0)
1515                        }
1516
1517                        If (LEqual (Arg0, 0x02))
1518                        {
1519                            And (LDM0, 0xCF, Local0)
1520                            Or (Local0, 0x10, LDM0)
1521                        }
1522
1523                        If (LEqual (Arg0, 0x03))
1524                        {
1525                            And (LDM0, 0x3F, Local0)
1526                            Or (Local0, 0x40, LDM0)
1527                        }
1528
1529                        If (LEqual (Arg1, 0x00))
1530                        {
1531                            And (LDM0, 0xFC, Local0)
1532                            Or (Local0, 0x03, LDM0)
1533                        }
1534
1535                        If (LEqual (Arg1, 0x01))
1536                        {
1537                            And (LDM0, 0xF3, Local0)
1538                            Or (Local0, 0x0C, LDM0)
1539                        }
1540
1541                        If (LEqual (Arg1, 0x02))
1542                        {
1543                            And (LDM0, 0xCF, Local0)
1544                            Or (Local0, 0x30, LDM0)
1545                        }
1546
1547                        If (LEqual (Arg1, 0x03))
1548                        {
1549                            And (LDM0, 0x3F, Local0)
1550                            Or (Local0, 0xC0, LDM0)
1551                        }
1552                    }
1553                }
1554
1555                Scope (\)
1556                {
1557                    OperationRegion (\SCPP, SystemIO, 0xB2, 0x01)
1558                    Field (\SCPP, ByteAcc, NoLock, Preserve)
1559                    {
1560                        SMIP,   8
1561                    }
1562                }
1563
1564                Method (\_SB.PCI0._INI, 0, NotSerialized)
1565                {
1566                    If (STRC (\_OS, "Microsoft Windows"))
1567                    {
1568                        Store (0x56, SMIP)
1569                    }
1570                    Else
1571                    {
1572                        If (STRC (\_OS, "Microsoft Windows NT"))
1573                        {
1574                            If (CondRefOf (_OSI, Local0))
1575                            {
1576                                If (\_OSI ("Windows 2001"))
1577                                {
1578                                    Store (0x59, SMIP)
1579                                    Store (0x00, OSFL)
1580                                    Store (0x03, OSFX)
1581                                }
1582                            }
1583                            Else
1584                            {
1585                                Store (0x58, SMIP)
1586                                Store (0x00, OSFX)
1587                                Store (0x00, OSFL)
1588                            }
1589                        }
1590                        Else
1591                        {
1592                            Store (0x57, SMIP)
1593                            Store (0x02, OSFX)
1594                            Store (0x02, OSFL)
1595                        }
1596                    }
1597                }
1598
1599                Scope (\)
1600                {
1601                    Method (OSTP, 0, NotSerialized)
1602                    {
1603                        If (LEqual (OSFX, 0x01))
1604                        {
1605                            Store (0x56, SMIP)
1606                        }
1607
1608                        If (LEqual (OSFX, 0x02))
1609                        {
1610                            Store (0x57, SMIP)
1611                        }
1612
1613                        If (LEqual (OSFX, 0x00))
1614                        {
1615                            Store (0x58, SMIP)
1616                        }
1617
1618                        If (LEqual (OSFX, 0x03))
1619                        {
1620                            Store (0x59, SMIP)
1621                        }
1622                    }
1623                }
1624
1625                Device (SYSR)
1626                {
1627                    Name (_HID, EisaId ("PNP0C02"))
1628                    Name (_UID, 0x01)
1629                    Name (_CRS, ResourceTemplate ()
1630                    {
1631                        IO (Decode16,
1632                            0x0010,             // Range Minimum
1633                            0x0010,             // Range Maximum
1634                            0x01,               // Alignment
1635                            0x10,               // Length
1636                            )
1637                        IO (Decode16,
1638                            0x0022,             // Range Minimum
1639                            0x0022,             // Range Maximum
1640                            0x01,               // Alignment
1641                            0x1E,               // Length
1642                            )
1643                        IO (Decode16,
1644                            0x0044,             // Range Minimum
1645                            0x0044,             // Range Maximum
1646                            0x01,               // Alignment
1647                            0x1C,               // Length
1648                            )
1649                        IO (Decode16,
1650                            0x0062,             // Range Minimum
1651                            0x0062,             // Range Maximum
1652                            0x01,               // Alignment
1653                            0x02,               // Length
1654                            )
1655                        IO (Decode16,
1656                            0x0065,             // Range Minimum
1657                            0x0065,             // Range Maximum
1658                            0x01,               // Alignment
1659                            0x0B,               // Length
1660                            )
1661                        IO (Decode16,
1662                            0x0074,             // Range Minimum
1663                            0x0074,             // Range Maximum
1664                            0x01,               // Alignment
1665                            0x0C,               // Length
1666                            )
1667                        IO (Decode16,
1668                            0x0091,             // Range Minimum
1669                            0x0091,             // Range Maximum
1670                            0x01,               // Alignment
1671                            0x03,               // Length
1672                            )
1673                        IO (Decode16,
1674                            0x00A2,             // Range Minimum
1675                            0x00A2,             // Range Maximum
1676                            0x01,               // Alignment
1677                            0x1E,               // Length
1678                            )
1679                        IO (Decode16,
1680                            0x00E0,             // Range Minimum
1681                            0x00E0,             // Range Maximum
1682                            0x01,               // Alignment
1683                            0x10,               // Length
1684                            )
1685                        IO (Decode16,
1686                            0x0B78,             // Range Minimum
1687                            0x0B78,             // Range Maximum
1688                            0x04,               // Alignment
1689                            0x04,               // Length
1690                            )
1691                        IO (Decode16,
1692                            0x0F78,             // Range Minimum
1693                            0x0F78,             // Range Maximum
1694                            0x04,               // Alignment
1695                            0x04,               // Length
1696                            )
1697                        IO (Decode16,
1698                            0x0A78,             // Range Minimum
1699                            0x0A78,             // Range Maximum
1700                            0x04,               // Alignment
1701                            0x04,               // Length
1702                            )
1703                        IO (Decode16,
1704                            0x0E78,             // Range Minimum
1705                            0x0E78,             // Range Maximum
1706                            0x04,               // Alignment
1707                            0x04,               // Length
1708                            )
1709                        IO (Decode16,
1710                            0x0BBC,             // Range Minimum
1711                            0x0BBC,             // Range Maximum
1712                            0x04,               // Alignment
1713                            0x04,               // Length
1714                            )
1715                        IO (Decode16,
1716                            0x0FBC,             // Range Minimum
1717                            0x0FBC,             // Range Maximum
1718                            0x04,               // Alignment
1719                            0x04,               // Length
1720                            )
1721                        IO (Decode16,
1722                            0x04D0,             // Range Minimum
1723                            0x04D0,             // Range Maximum
1724                            0x01,               // Alignment
1725                            0x02,               // Length
1726                            )
1727                        IO (Decode16,
1728                            0x0294,             // Range Minimum
1729                            0x0294,             // Range Maximum
1730                            0x01,               // Alignment
1731                            0x04,               // Length
1732                            )
1733                    })
1734                }
1735
1736                Device (PIC)
1737                {
1738                    Name (_HID, EisaId ("PNP0000"))
1739                    Name (_CRS, ResourceTemplate ()
1740                    {
1741                        IO (Decode16,
1742                            0x0020,             // Range Minimum
1743                            0x0020,             // Range Maximum
1744                            0x01,               // Alignment
1745                            0x02,               // Length
1746                            )
1747                        IO (Decode16,
1748                            0x00A0,             // Range Minimum
1749                            0x00A0,             // Range Maximum
1750                            0x01,               // Alignment
1751                            0x02,               // Length
1752                            )
1753                        IRQNoFlags ()
1754                            {2}
1755                    })
1756                }
1757
1758                Device (DMA1)
1759                {
1760                    Name (_HID, EisaId ("PNP0200"))
1761                    Name (_CRS, ResourceTemplate ()
1762                    {
1763                        DMA (Compatibility, BusMaster, Transfer8, )
1764                            {4}
1765                        IO (Decode16,
1766                            0x0000,             // Range Minimum
1767                            0x0000,             // Range Maximum
1768                            0x01,               // Alignment
1769                            0x10,               // Length
1770                            )
1771                        IO (Decode16,
1772                            0x0080,             // Range Minimum
1773                            0x0080,             // Range Maximum
1774                            0x01,               // Alignment
1775                            0x11,               // Length
1776                            )
1777                        IO (Decode16,
1778                            0x0094,             // Range Minimum
1779                            0x0094,             // Range Maximum
1780                            0x01,               // Alignment
1781                            0x0C,               // Length
1782                            )
1783                        IO (Decode16,
1784                            0x00C0,             // Range Minimum
1785                            0x00C0,             // Range Maximum
1786                            0x01,               // Alignment
1787                            0x20,               // Length
1788                            )
1789                    })
1790                }
1791
1792                Device (TMR)
1793                {
1794                    Name (_HID, EisaId ("PNP0100"))
1795                    Name (_CRS, ResourceTemplate ()
1796                    {
1797                        IO (Decode16,
1798                            0x0040,             // Range Minimum
1799                            0x0040,             // Range Maximum
1800                            0x01,               // Alignment
1801                            0x04,               // Length
1802                            )
1803                        IRQNoFlags ()
1804                            {0}
1805                    })
1806                }
1807
1808                Device (RTC)
1809                {
1810                    Name (_HID, EisaId ("PNP0B00"))
1811                    Name (_CRS, ResourceTemplate ()
1812                    {
1813                        IO (Decode16,
1814                            0x0070,             // Range Minimum
1815                            0x0070,             // Range Maximum
1816                            0x04,               // Alignment
1817                            0x04,               // Length
1818                            )
1819                        IRQNoFlags ()
1820                            {8}
1821                    })
1822                }
1823
1824                Device (SPKR)
1825                {
1826                    Name (_HID, EisaId ("PNP0800"))
1827                    Name (_CRS, ResourceTemplate ()
1828                    {
1829                        IO (Decode16,
1830                            0x0061,             // Range Minimum
1831                            0x0061,             // Range Maximum
1832                            0x01,               // Alignment
1833                            0x01,               // Length
1834                            )
1835                    })
1836                }
1837
1838                Device (COPR)
1839                {
1840                    Name (_HID, EisaId ("PNP0C04"))
1841                    Name (_CRS, ResourceTemplate ()
1842                    {
1843                        IO (Decode16,
1844                            0x00F0,             // Range Minimum
1845                            0x00F0,             // Range Maximum
1846                            0x01,               // Alignment
1847                            0x10,               // Length
1848                            )
1849                        IRQNoFlags ()
1850                            {13}
1851                    })
1852                }
1853
1854                Scope (\)
1855                {
1856                    OperationRegion (WIN1, SystemIO, 0x2E, 0x02)
1857                    Field (WIN1, ByteAcc, NoLock, Preserve)
1858                    {
1859                        INDP,   8,
1860                        DATA,   8
1861                    }
1862
1863                    IndexField (INDP, DATA, ByteAcc, NoLock, Preserve)
1864                    {
1865                                Offset (0x02),
1866                        CFG,    8,
1867                                Offset (0x07),
1868                        LDN,    8,
1869                                Offset (0x20),
1870                        IDHI,   8,
1871                        IDLO,   8,
1872                        POWC,   8,
1873                                Offset (0x30),
1874                        ACTR,   8,
1875                                Offset (0x60),
1876                        IOAH,   8,
1877                        IOAL,   8,
1878                        IO2H,   8,
1879                        IO2L,   8,
1880                                Offset (0x70),
1881                        INTR,   8,
1882                                Offset (0x72),
1883                        INT1,   8,
1884                                Offset (0x74),
1885                        DMCH,   8,
1886                                Offset (0xE0),
1887                        CRE0,   8,
1888                        CRE1,   8,
1889                        CRE2,   8,
1890                        CRE3,   8,
1891                        CRE4,   8,
1892                                Offset (0xF0),
1893                        OPT1,   8,
1894                        OPT2,   8,
1895                        OPT3,   8,
1896                        OPT4,   8,
1897                        OPT5,   8,
1898                        OPT6,   8,
1899                        OPT7,   8,
1900                        OPT8,   8,
1901                        OPT9,   8,
1902                        OPTA,   8
1903                    }
1904
1905                    Method (ENFG, 0, NotSerialized)
1906                    {
1907                        Store (0x87, INDP)
1908                        Store (0x87, INDP)
1909                    }
1910
1911                    Method (EXFG, 0, NotSerialized)
1912                    {
1913                        Store (0xAA, INDP)
1914                    }
1915                }
1916
1917                OperationRegion (COM1, SystemIO, 0x03F8, 0x08)
1918                Field (COM1, ByteAcc, NoLock, Preserve)
1919                {
1920                    P3F8,   8,
1921                    P3F9,   8,
1922                    P3FA,   8,
1923                    P3FB,   8,
1924                    P3FC,   8,
1925                    P3FD,   8,
1926                    P3FE,   8,
1927                    P3FF,   8
1928                }
1929
1930                OperationRegion (COM2, SystemIO, 0x02F8, 0x08)
1931                Field (COM2, ByteAcc, NoLock, Preserve)
1932                {
1933                    P2F8,   8,
1934                    P2F9,   8,
1935                    P2FA,   8,
1936                    P2FB,   8,
1937                    P2FC,   8,
1938                    P2FD,   8,
1939                    P2FE,   8,
1940                    P2FF,   8
1941                }
1942
1943                OperationRegion (COM3, SystemIO, 0x03E8, 0x08)
1944                Field (COM3, ByteAcc, NoLock, Preserve)
1945                {
1946                    P3E8,   8,
1947                    P3E9,   8,
1948                    P3EA,   8,
1949                    P3EB,   8,
1950                    P3EC,   8,
1951                    P3ED,   8,
1952                    P3EE,   8,
1953                    P3EF,   8
1954                }
1955
1956                OperationRegion (COM4, SystemIO, 0x02E8, 0x08)
1957                Field (COM4, ByteAcc, NoLock, Preserve)
1958                {
1959                    P2E8,   8,
1960                    P2E9,   8,
1961                    P2EA,   8,
1962                    P2EB,   8,
1963                    P2EC,   8,
1964                    P2ED,   8,
1965                    P2EE,   8,
1966                    P2EF,   8
1967                }
1968
1969                Method (ICOM, 1, NotSerialized)
1970                {
1971                    Store (Arg0, Local0)
1972                    If (LEqual (Local0, 0x03F8))
1973                    {
1974                        Store (P3FD, Local0)
1975                        Store (P3FD, Local0)
1976                        Store (0xC3, P3FA)
1977                        While (LNotEqual (P3FA, 0xC1))
1978                        {
1979                            Store (P3FE, Local0)
1980                        }
1981                    }
1982                    Else
1983                    {
1984                        If (LEqual (Local0, 0x02F8))
1985                        {
1986                            Store (P2FD, Local0)
1987                            Store (P2FD, Local0)
1988                            Store (0xC3, P2FA)
1989                            While (LNotEqual (P2FA, 0xC1))
1990                            {
1991                                Store (P2FE, Local0)
1992                            }
1993                        }
1994                        Else
1995                        {
1996                            If (LEqual (Local0, 0x03E8))
1997                            {
1998                                Store (P3ED, Local0)
1999                                Store (P3ED, Local0)
2000                                Store (0xC3, P3EA)
2001                                While (LNotEqual (P3EA, 0xC1))
2002                                {
2003                                    Store (P3EE, Local0)
2004                                }
2005                            }
2006                            Else
2007                            {
2008                                If (LEqual (Local0, 0x02E8))
2009                                {
2010                                    Store (P2ED, Local0)
2011                                    Store (P2ED, Local0)
2012                                    Store (0xC3, P2EA)
2013                                    While (LNotEqual (P2EA, 0xC1))
2014                                    {
2015                                        Store (P2EE, Local0)
2016                                    }
2017                                }
2018                            }
2019                        }
2020                    }
2021                }
2022
2023                Device (FDC0)
2024                {
2025                    Name (_HID, EisaId ("PNP0700"))
2026                    Method (_STA, 0, NotSerialized)
2027                    {
2028                        ENFG ()
2029                        Store (Zero, LDN)
2030                        If (ACTR)
2031                        {
2032                            EXFG ()
2033                            Return (0x0F)
2034                        }
2035                        Else
2036                        {
2037                            If (LOr (IOAH, IOAL))
2038                            {
2039                                EXFG ()
2040                                Return (0x0D)
2041                            }
2042                            Else
2043                            {
2044                                EXFG ()
2045                                Return (0x00)
2046                            }
2047                        }
2048                    }
2049
2050                    Method (_DIS, 0, NotSerialized)
2051                    {
2052                        ENFG ()
2053                        Store (0x00, LDN)
2054                        Store (Zero, ACTR)
2055                        SLDM (DMCH, 0x04)
2056                        EXFG ()
2057                        DISD (0x03)
2058                    }
2059
2060                    Method (_CRS, 0, NotSerialized)
2061                    {
2062                        Name (BUF0, ResourceTemplate ()
2063                        {
2064                            IO (Decode16,
2065                                0x03F0,             // Range Minimum
2066                                0x03F0,             // Range Maximum
2067                                0x01,               // Alignment
2068                                0x06,               // Length
2069                                _Y01)
2070                            IO (Decode16,
2071                                0x03F7,             // Range Minimum
2072                                0x03F7,             // Range Maximum
2073                                0x01,               // Alignment
2074                                0x01,               // Length
2075                                )
2076                            IRQNoFlags ()
2077                                {6}
2078                            DMA (Compatibility, NotBusMaster, Transfer8, )
2079                                {2}
2080                        })
2081                        CreateByteField (BUF0, \_SB.PCI0.PX40.FDC0._CRS._Y01._MIN, IOLO)
2082                        CreateByteField (BUF0, 0x03, IOHI)
2083                        CreateByteField (BUF0, \_SB.PCI0.PX40.FDC0._CRS._Y01._MAX, IORL)
2084                        CreateByteField (BUF0, 0x05, IORH)
2085                        ENFG ()
2086                        EXFG ()
2087                        Return (BUF0)
2088                    }
2089
2090                    Name (_PRS, ResourceTemplate ()
2091                    {
2092                        StartDependentFnNoPri ()
2093                        {
2094                            IO (Decode16,
2095                                0x03F0,             // Range Minimum
2096                                0x03F0,             // Range Maximum
2097                                0x01,               // Alignment
2098                                0x06,               // Length
2099                                )
2100                            IO (Decode16,
2101                                0x03F7,             // Range Minimum
2102                                0x03F7,             // Range Maximum
2103                                0x01,               // Alignment
2104                                0x01,               // Length
2105                                )
2106                            IRQNoFlags ()
2107                                {6}
2108                            DMA (Compatibility, NotBusMaster, Transfer8, )
2109                                {2}
2110                        }
2111                        EndDependentFn ()
2112                    })
2113                    Method (_SRS, 1, NotSerialized)
2114                    {
2115                        CreateByteField (Arg0, 0x02, IOLO)
2116                        CreateByteField (Arg0, 0x03, IOHI)
2117                        CreateWordField (Arg0, 0x02, IOAD)
2118                        CreateWordField (Arg0, 0x19, IRQL)
2119                        CreateByteField (Arg0, 0x1C, DMAV)
2120                        ENFG ()
2121                        Store (Zero, LDN)
2122                        Store (One, ACTR)
2123                        SLDM (DMCH, DMCH)
2124                        EXFG ()
2125                        CKIO (IOAD, 0x03)
2126                    }
2127                }
2128
2129                Device (UAR1)
2130                {
2131                    Name (_HID, EisaId ("PNP0501"))
2132                    Name (_UID, 0x01)
2133                    Method (_STA, 0, NotSerialized)
2134                    {
2135                        ENFG ()
2136                        Store (0x02, LDN)
2137                        If (ACTR)
2138                        {
2139                            EXFG ()
2140                            Return (0x0F)
2141                        }
2142                        Else
2143                        {
2144                            If (LOr (IOAH, IOAL))
2145                            {
2146                                EXFG ()
2147                                Return (0x0D)
2148                            }
2149                            Else
2150                            {
2151                                EXFG ()
2152                                Return (0x00)
2153                            }
2154                        }
2155
2156                        EXFG ()
2157                    }
2158
2159                    Method (_DIS, 0, NotSerialized)
2160                    {
2161                        ENFG ()
2162                        Store (0x02, LDN)
2163                        Store (Zero, ACTR)
2164                        EXFG ()
2165                        DISD (0x00)
2166                    }
2167
2168                    Method (_CRS, 0, NotSerialized)
2169                    {
2170                        Name (BUF1, ResourceTemplate ()
2171                        {
2172                            IO (Decode16,
2173                                0x0000,             // Range Minimum
2174                                0x0000,             // Range Maximum
2175                                0x01,               // Alignment
2176                                0x08,               // Length
2177                                _Y02)
2178                            IRQNoFlags (_Y03)
2179                                {}
2180                        })
2181                        CreateByteField (BUF1, \_SB.PCI0.PX40.UAR1._CRS._Y02._MIN, IOLO)
2182                        CreateByteField (BUF1, 0x03, IOHI)
2183                        CreateByteField (BUF1, \_SB.PCI0.PX40.UAR1._CRS._Y02._MAX, IORL)
2184                        CreateByteField (BUF1, 0x05, IORH)
2185                        CreateWordField (BUF1, \_SB.PCI0.PX40.UAR1._CRS._Y03._INT, IRQW)
2186                        ENFG ()
2187                        Store (0x02, LDN)
2188                        Store (IOAL, IOLO)
2189                        Store (IOAL, IORL)
2190                        Store (IOAH, IOHI)
2191                        Store (IOAH, IORH)
2192                        Store (One, Local0)
2193                        ShiftLeft (Local0, INTR, IRQW)
2194                        EXFG ()
2195                        Return (BUF1)
2196                    }
2197
2198                    Name (_PRS, ResourceTemplate ()
2199                    {
2200                        StartDependentFnNoPri ()
2201                        {
2202                            IO (Decode16,
2203                                0x03F8,             // Range Minimum
2204                                0x03F8,             // Range Maximum
2205                                0x01,               // Alignment
2206                                0x08,               // Length
2207                                )
2208                            IRQNoFlags ()
2209                                {4,10,11}
2210                        }
2211                        StartDependentFnNoPri ()
2212                        {
2213                            IO (Decode16,
2214                                0x02F8,             // Range Minimum
2215                                0x02F8,             // Range Maximum
2216                                0x01,               // Alignment
2217                                0x08,               // Length
2218                                )
2219                            IRQNoFlags ()
2220                                {3,10,11}
2221                        }
2222                        StartDependentFnNoPri ()
2223                        {
2224                            IO (Decode16,
2225                                0x03E8,             // Range Minimum
2226                                0x03E8,             // Range Maximum
2227                                0x01,               // Alignment
2228                                0x08,               // Length
2229                                )
2230                            IRQNoFlags ()
2231                                {3,4,5,7,9,10,11,12}
2232                        }
2233                        StartDependentFnNoPri ()
2234                        {
2235                            IO (Decode16,
2236                                0x02E8,             // Range Minimum
2237                                0x02E8,             // Range Maximum
2238                                0x01,               // Alignment
2239                                0x08,               // Length
2240                                )
2241                            IRQNoFlags ()
2242                                {3,4,5,7,9,10,11,12}
2243                        }
2244                        EndDependentFn ()
2245                    })
2246                    Method (_SRS, 1, NotSerialized)
2247                    {
2248                        CreateByteField (Arg0, 0x02, IOLO)
2249                        CreateByteField (Arg0, 0x03, IOHI)
2250                        CreateWordField (Arg0, 0x02, IOAD)
2251                        CreateWordField (Arg0, 0x09, IRQW)
2252                        ENFG ()
2253                        Store (0x02, LDN)
2254                        Store (One, ACTR)
2255                        Store (IOLO, IOAL)
2256                        Store (IOHI, IOAH)
2257                        FindSetRightBit (IRQW, Local0)
2258                        Subtract (Local0, 0x01, INTR)
2259                        EXFG ()
2260                        CKIO (IOAD, 0x00)
2261                    }
2262                }
2263
2264                Device (UAR2)
2265                {
2266                    Name (_HID, EisaId ("PNP0501"))
2267                    Name (_UID, 0x02)
2268                    Method (_STA, 0, NotSerialized)
2269                    {
2270                        ENFG ()
2271                        Store (0x03, LDN)
2272                        And (OPT2, 0x30, Local0)
2273                        If (LNotEqual (Local0, 0x10))
2274                        {
2275                            If (ACTR)
2276                            {
2277                                EXFG ()
2278                                Return (0x0F)
2279                            }
2280                            Else
2281                            {
2282                                If (LOr (IOAH, IOAL))
2283                                {
2284                                    EXFG ()
2285                                    Return (0x0D)
2286                                }
2287                                Else
2288                                {
2289                                    EXFG ()
2290                                    Return (0x00)
2291                                }
2292                            }
2293                        }
2294                        Else
2295                        {
2296                            EXFG ()
2297                            Return (0x00)
2298                        }
2299                    }
2300
2301                    Method (_DIS, 0, NotSerialized)
2302                    {
2303                        ENFG ()
2304                        Store (0x03, LDN)
2305                        And (OPT2, 0x38, Local0)
2306                        If (LEqual (Local0, 0x00))
2307                        {
2308                            Store (Zero, ACTR)
2309                        }
2310
2311                        EXFG ()
2312                        DISD (0x01)
2313                    }
2314
2315                    Method (_CRS, 0, NotSerialized)
2316                    {
2317                        Name (BUF2, ResourceTemplate ()
2318                        {
2319                            IO (Decode16,
2320                                0x0000,             // Range Minimum
2321                                0x0000,             // Range Maximum
2322                                0x01,               // Alignment
2323                                0x08,               // Length
2324                                _Y04)
2325                            IRQNoFlags (_Y05)
2326                                {4}
2327                        })
2328                        CreateByteField (BUF2, \_SB.PCI0.PX40.UAR2._CRS._Y04._MIN, IOLO)
2329                        CreateByteField (BUF2, 0x03, IOHI)
2330                        CreateByteField (BUF2, \_SB.PCI0.PX40.UAR2._CRS._Y04._MAX, IORL)
2331                        CreateByteField (BUF2, 0x05, IORH)
2332                        CreateWordField (BUF2, \_SB.PCI0.PX40.UAR2._CRS._Y05._INT, IRQW)
2333                        ENFG ()
2334                        Store (0x03, LDN)
2335                        Store (IOAL, IOLO)
2336                        Store (IOAL, IORL)
2337                        Store (IOAH, IOHI)
2338                        Store (IOAH, IORH)
2339                        Store (One, Local0)
2340                        ShiftLeft (Local0, INTR, IRQW)
2341                        EXFG ()
2342                        Return (BUF2)
2343                    }
2344
2345                    Name (_PRS, ResourceTemplate ()
2346                    {
2347                        StartDependentFnNoPri ()
2348                        {
2349                            IO (Decode16,
2350                                0x03F8,             // Range Minimum
2351                                0x03F8,             // Range Maximum
2352                                0x01,               // Alignment
2353                                0x08,               // Length
2354                                )
2355                            IRQNoFlags ()
2356                                {4,10,11}
2357                        }
2358                        StartDependentFnNoPri ()
2359                        {
2360                            IO (Decode16,
2361                                0x02F8,             // Range Minimum
2362                                0x02F8,             // Range Maximum
2363                                0x01,               // Alignment
2364                                0x08,               // Length
2365                                )
2366                            IRQNoFlags ()
2367                                {3,10,11}
2368                        }
2369                        StartDependentFnNoPri ()
2370                        {
2371                            IO (Decode16,
2372                                0x03E8,             // Range Minimum
2373                                0x03E8,             // Range Maximum
2374                                0x01,               // Alignment
2375                                0x08,               // Length
2376                                )
2377                            IRQNoFlags ()
2378                                {3,4,5,7,9,10,11,12}
2379                        }
2380                        StartDependentFnNoPri ()
2381                        {
2382                            IO (Decode16,
2383                                0x02E8,             // Range Minimum
2384                                0x02E8,             // Range Maximum
2385                                0x01,               // Alignment
2386                                0x08,               // Length
2387                                )
2388                            IRQNoFlags ()
2389                                {3,4,5,7,9,10,11,12}
2390                        }
2391                        EndDependentFn ()
2392                    })
2393                    Method (_SRS, 1, NotSerialized)
2394                    {
2395                        CreateByteField (Arg0, 0x02, IOLO)
2396                        CreateByteField (Arg0, 0x03, IOHI)
2397                        CreateWordField (Arg0, 0x02, IOAD)
2398                        CreateWordField (Arg0, 0x09, IRQW)
2399                        ENFG ()
2400                        Store (0x03, LDN)
2401                        Store (One, ACTR)
2402                        Store (IOLO, IOAL)
2403                        Store (IOHI, IOAH)
2404                        FindSetRightBit (IRQW, Local0)
2405                        Subtract (Local0, 0x01, INTR)
2406                        EXFG ()
2407                        CKIO (IOAD, 0x01)
2408                    }
2409                }
2410
2411                Device (IRDA)
2412                {
2413                    Name (_HID, EisaId ("PNP0510"))
2414                    Method (_STA, 0, NotSerialized)
2415                    {
2416                        ENFG ()
2417                        Store (0x03, LDN)
2418                        And (OPT2, 0x30, Local0)
2419                        If (LEqual (Local0, 0x10))
2420                        {
2421                            If (ACTR)
2422                            {
2423                                EXFG ()
2424                                Return (0x0F)
2425                            }
2426                            Else
2427                            {
2428                                If (LOr (IOAH, IOAL))
2429                                {
2430                                    EXFG ()
2431                                    Return (0x0D)
2432                                }
2433                                Else
2434                                {
2435                                    EXFG ()
2436                                    Return (0x00)
2437                                }
2438                            }
2439                        }
2440                        Else
2441                        {
2442                            EXFG ()
2443                            Return (0x00)
2444                        }
2445                    }
2446
2447                    Method (_DIS, 0, NotSerialized)
2448                    {
2449                        If (LEqual (DISE, 0x01))
2450                        {
2451                            ENFG ()
2452                            Store (0x03, LDN)
2453                            And (OPT2, 0x38, Local0)
2454                            If (LNotEqual (Local0, 0x00))
2455                            {
2456                                Store (Zero, ACTR)
2457                            }
2458
2459                            EXFG ()
2460                            DISD (0x01)
2461                        }
2462
2463                        Store (Local0, Local0)
2464                    }
2465
2466                    Method (_CRS, 0, NotSerialized)
2467                    {
2468                        Name (BUF4, ResourceTemplate ()
2469                        {
2470                            IO (Decode16,
2471                                0x0000,             // Range Minimum
2472                                0x0000,             // Range Maximum
2473                                0x01,               // Alignment
2474                                0x08,               // Length
2475                                _Y06)
2476                            IRQNoFlags (_Y07)
2477                                {}
2478                        })
2479                        CreateByteField (BUF4, \_SB.PCI0.PX40.IRDA._CRS._Y06._MIN, IOLO)
2480                        CreateByteField (BUF4, 0x03, IOHI)
2481                        CreateByteField (BUF4, \_SB.PCI0.PX40.IRDA._CRS._Y06._MAX, IORL)
2482                        CreateByteField (BUF4, 0x05, IORH)
2483                        CreateWordField (BUF4, \_SB.PCI0.PX40.IRDA._CRS._Y07._INT, IRQW)
2484                        ENFG ()
2485                        Store (0x03, LDN)
2486                        Store (IOAL, IOLO)
2487                        Store (IOAL, IORL)
2488                        Store (IOAH, IOHI)
2489                        Store (IOAH, IORH)
2490                        ShiftLeft (0x01, INTR, IRQW)
2491                        EXFG ()
2492                        Return (BUF4)
2493                    }
2494
2495                    Name (_PRS, ResourceTemplate ()
2496                    {
2497                        StartDependentFnNoPri ()
2498                        {
2499                            IO (Decode16,
2500                                0x03F8,             // Range Minimum
2501                                0x03F8,             // Range Maximum
2502                                0x01,               // Alignment
2503                                0x08,               // Length
2504                                )
2505                            IRQNoFlags ()
2506                                {3,4,5,7,9,10,11,12}
2507                        }
2508                        StartDependentFnNoPri ()
2509                        {
2510                            IO (Decode16,
2511                                0x02F8,             // Range Minimum
2512                                0x02F8,             // Range Maximum
2513                                0x01,               // Alignment
2514                                0x08,               // Length
2515                                )
2516                            IRQNoFlags ()
2517                                {3,4,5,7,9,10,11,12}
2518                        }
2519                        StartDependentFnNoPri ()
2520                        {
2521                            IO (Decode16,
2522                                0x03E8,             // Range Minimum
2523                                0x03E8,             // Range Maximum
2524                                0x01,               // Alignment
2525                                0x08,               // Length
2526                                )
2527                            IRQNoFlags ()
2528                                {3,4,5,7,9,10,11,12}
2529                        }
2530                        StartDependentFnNoPri ()
2531                        {
2532                            IO (Decode16,
2533                                0x02E8,             // Range Minimum
2534                                0x02E8,             // Range Maximum
2535                                0x01,               // Alignment
2536                                0x08,               // Length
2537                                )
2538                            IRQNoFlags ()
2539                                {3,4,5,7,9,10,11,12}
2540                        }
2541                        EndDependentFn ()
2542                    })
2543                    Method (_SRS, 1, NotSerialized)
2544                    {
2545                        CreateByteField (Arg0, 0x02, IOLO)
2546                        CreateByteField (Arg0, 0x03, IOHI)
2547                        CreateWordField (Arg0, 0x02, IOAD)
2548                        CreateWordField (Arg0, 0x09, IRQW)
2549                        ENFG ()
2550                        Store (0x03, LDN)
2551                        Store (One, ACTR)
2552                        Store (IOLO, IOAL)
2553                        Store (IOHI, IOAH)
2554                        FindSetRightBit (IRQW, Local0)
2555                        Subtract (Local0, 0x01, INTR)
2556                        EXFG ()
2557                        CKIO (IOAD, 0x01)
2558                    }
2559                }
2560
2561                Device (LPT1)
2562                {
2563                    Name (_HID, EisaId ("PNP0400"))
2564                    Method (_STA, 0, NotSerialized)
2565                    {
2566                        ENFG ()
2567                        Store (0x01, LDN)
2568                        And (OPT1, 0x02, Local0)
2569                        If (LNotEqual (Local0, 0x02))
2570                        {
2571                            If (ACTR)
2572                            {
2573                                EXFG ()
2574                                Return (0x0F)
2575                            }
2576                            Else
2577                            {
2578                                If (LOr (IOAH, IOAL))
2579                                {
2580                                    EXFG ()
2581                                    Return (0x0D)
2582                                }
2583                                Else
2584                                {
2585                                    EXFG ()
2586                                    Return (0x00)
2587                                }
2588                            }
2589                        }
2590                        Else
2591                        {
2592                            EXFG ()
2593                            Return (0x00)
2594                        }
2595                    }
2596
2597                    Method (_DIS, 0, NotSerialized)
2598                    {
2599                        ENFG ()
2600                        Store (0x01, LDN)
2601                        Store (Zero, ACTR)
2602                        EXFG ()
2603                        DISD (0x02)
2604                    }
2605
2606                    Method (_CRS, 0, NotSerialized)
2607                    {
2608                        Name (BUF5, ResourceTemplate ()
2609                        {
2610                            IO (Decode16,
2611                                0x0000,             // Range Minimum
2612                                0x0000,             // Range Maximum
2613                                0x01,               // Alignment
2614                                0x08,               // Length
2615                                _Y08)
2616                            IO (Decode16,
2617                                0x0000,             // Range Minimum
2618                                0x0000,             // Range Maximum
2619                                0x01,               // Alignment
2620                                0x04,               // Length
2621                                _Y09)
2622                            IRQNoFlags (_Y0A)
2623                                {}
2624                        })
2625                        CreateByteField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y08._MIN, IOLO)
2626                        CreateByteField (BUF5, 0x03, IOHI)
2627                        CreateByteField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y08._MAX, IORL)
2628                        CreateByteField (BUF5, 0x05, IORH)
2629                        CreateByteField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y08._LEN, IOLE)
2630                        CreateByteField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y09._MIN, IO21)
2631                        CreateByteField (BUF5, 0x0B, IO22)
2632                        CreateByteField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y09._MAX, IO23)
2633                        CreateByteField (BUF5, 0x0D, IO24)
2634                        CreateWordField (BUF5, \_SB.PCI0.PX40.LPT1._CRS._Y0A._INT, IRQW)
2635                        ENFG ()
2636                        Store (0x01, LDN)
2637                        Store (IOAL, IOLO)
2638                        Store (IOLO, IORL)
2639                        Store (IOAH, IOHI)
2640                        Store (IOHI, IORH)
2641                        Store (IOAL, IO21)
2642                        Store (IOAL, IO23)
2643                        Add (IOAH, 0x04, IO22)
2644                        Add (IOAH, 0x04, IO24)
2645                        If (LEqual (IOLO, 0xBC))
2646                        {
2647                            Store (0x04, IOLE)
2648                        }
2649                        Else
2650                        {
2651                            Store (0x08, IOLE)
2652                        }
2653
2654                        Store (One, Local0)
2655                        Store (INTR, Local5)
2656                        ShiftLeft (Local0, Local5, IRQW)
2657                        Store (One, ACTR)
2658                        EXFG ()
2659                        Return (BUF5)
2660                    }
2661
2662                    Name (_PRS, ResourceTemplate ()
2663                    {
2664                        StartDependentFnNoPri ()
2665                        {
2666                            IO (Decode16,
2667                                0x0378,             // Range Minimum
2668                                0x0378,             // Range Maximum
2669                                0x01,               // Alignment
2670                                0x08,               // Length
2671                                )
2672                            IO (Decode16,
2673                                0x0778,             // Range Minimum
2674                                0x0778,             // Range Maximum
2675                                0x01,               // Alignment
2676                                0x04,               // Length
2677                                )
2678                            IRQNoFlags ()
2679                                {5,7}
2680                        }
2681                        StartDependentFnNoPri ()
2682                        {
2683                            IO (Decode16,
2684                                0x0278,             // Range Minimum
2685                                0x0278,             // Range Maximum
2686                                0x01,               // Alignment
2687                                0x08,               // Length
2688                                )
2689                            IO (Decode16,
2690                                0x0678,             // Range Minimum
2691                                0x0678,             // Range Maximum
2692                                0x01,               // Alignment
2693                                0x04,               // Length
2694                                )
2695                            IRQNoFlags ()
2696                                {5,7}
2697                        }
2698                        StartDependentFnNoPri ()
2699                        {
2700                            IO (Decode16,
2701                                0x03BC,             // Range Minimum
2702                                0x03BC,             // Range Maximum
2703                                0x01,               // Alignment
2704                                0x04,               // Length
2705                                )
2706                            IO (Decode16,
2707                                0x07BC,             // Range Minimum
2708                                0x07BC,             // Range Maximum
2709                                0x01,               // Alignment
2710                                0x04,               // Length
2711                                )
2712                            IRQNoFlags ()
2713                                {5,7}
2714                        }
2715                        EndDependentFn ()
2716                    })
2717                    Method (_SRS, 1, NotSerialized)
2718                    {
2719                        CreateByteField (Arg0, 0x02, IOLO)
2720                        CreateByteField (Arg0, 0x03, IOHI)
2721                        CreateWordField (Arg0, 0x02, IOAD)
2722                        CreateByteField (Arg0, 0x04, IORL)
2723                        CreateByteField (Arg0, 0x05, IORH)
2724                        CreateWordField (Arg0, 0x11, IRQW)
2725                        ENFG ()
2726                        Store (0x01, LDN)
2727                        Store (One, ACTR)
2728                        Store (IOLO, IOAL)
2729                        Store (IOHI, IOAH)
2730                        FindSetLeftBit (IRQW, Local0)
2731                        Subtract (Local0, 0x01, Local0)
2732                        Store (Local0, INTR)
2733                        EXFG ()
2734                        CKIO (IOAD, 0x02)
2735                    }
2736                }
2737
2738                Device (ECP1)
2739                {
2740                    Name (_HID, EisaId ("PNP0401"))
2741                    Method (_STA, 0, NotSerialized)
2742                    {
2743                        ENFG ()
2744                        Store (0x01, LDN)
2745                        And (OPT1, 0x02, Local0)
2746                        If (LEqual (Local0, 0x02))
2747                        {
2748                            If (ACTR)
2749                            {
2750                                EXFG ()
2751                                Return (0x0F)
2752                            }
2753                            Else
2754                            {
2755                                If (LOr (IOAH, IOAL))
2756                                {
2757                                    EXFG ()
2758                                    Return (0x0D)
2759                                }
2760                                Else
2761                                {
2762                                    EXFG ()
2763                                    Return (0x00)
2764                                }
2765                            }
2766                        }
2767                        Else
2768                        {
2769                            EXFG ()
2770                            Return (0x00)
2771                        }
2772                    }
2773
2774                    Method (_DIS, 0, NotSerialized)
2775                    {
2776                        ENFG ()
2777                        Store (0x01, LDN)
2778                        Store (Zero, ACTR)
2779                        SLDM (DMCH, 0x04)
2780                        EXFG ()
2781                        DISD (0x02)
2782                    }
2783
2784                    Method (_CRS, 0, NotSerialized)
2785                    {
2786                        Name (BUF6, ResourceTemplate ()
2787                        {
2788                            IO (Decode16,
2789                                0x0000,             // Range Minimum
2790                                0x0000,             // Range Maximum
2791                                0x01,               // Alignment
2792                                0x08,               // Length
2793                                _Y0B)
2794                            IO (Decode16,
2795                                0x0000,             // Range Minimum
2796                                0x0000,             // Range Maximum
2797                                0x01,               // Alignment
2798                                0x04,               // Length
2799                                _Y0C)
2800                            IRQNoFlags (_Y0D)
2801                                {}
2802                            DMA (Compatibility, NotBusMaster, Transfer8, _Y0E)
2803                                {}
2804                        })
2805                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0B._MIN, IOLO)
2806                        CreateByteField (BUF6, 0x03, IOHI)
2807                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0B._MAX, IORL)
2808                        CreateByteField (BUF6, 0x05, IORH)
2809                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0C._MIN, IOEL)
2810                        CreateByteField (BUF6, 0x0B, IOEH)
2811                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0C._MAX, IOML)
2812                        CreateByteField (BUF6, 0x0D, IOMH)
2813                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0B._LEN, IOLE)
2814                        CreateWordField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0D._INT, IRQW)
2815                        CreateByteField (BUF6, \_SB.PCI0.PX40.ECP1._CRS._Y0E._DMA, DMAC)
2816                        ENFG ()
2817                        Store (0x01, LDN)
2818                        Store (One, ACTR)
2819                        Store (IOAL, Local2)
2820                        Store (Local2, IOLO)
2821                        Store (IOAH, Local3)
2822                        Store (Local3, IOHI)
2823                        Or (Local3, 0x04, Local3)
2824                        Store (Local3, IOEH)
2825                        Store (Local3, IOMH)
2826                        Store (IOLO, IORL)
2827                        Store (IOLO, IOEL)
2828                        Store (IOLO, IOML)
2829                        Store (IOHI, IORH)
2830                        If (LEqual (IOLO, 0xBC))
2831                        {
2832                            Store (0x04, IOLE)
2833                        }
2834                        Else
2835                        {
2836                            Store (0x08, IOLE)
2837                        }
2838
2839                        Store (One, Local0)
2840                        Store (INTR, Local5)
2841                        ShiftLeft (Local0, Local5, IRQW)
2842                        Store (One, Local0)
2843                        Store (DMCH, Local5)
2844                        ShiftLeft (Local0, Local5, DMAC)
2845                        EXFG ()
2846                        Return (BUF6)
2847                    }
2848
2849                    Name (_PRS, ResourceTemplate ()
2850                    {
2851                        StartDependentFnNoPri ()
2852                        {
2853                            IO (Decode16,
2854                                0x0378,             // Range Minimum
2855                                0x0378,             // Range Maximum
2856                                0x01,               // Alignment
2857                                0x08,               // Length
2858                                )
2859                            IO (Decode16,
2860                                0x0778,             // Range Minimum
2861                                0x0778,             // Range Maximum
2862                                0x01,               // Alignment
2863                                0x04,               // Length
2864                                )
2865                            IRQNoFlags ()
2866                                {5,7}
2867                            DMA (Compatibility, NotBusMaster, Transfer8, )
2868                                {0,1,3}
2869                        }
2870                        StartDependentFnNoPri ()
2871                        {
2872                            IO (Decode16,
2873                                0x0278,             // Range Minimum
2874                                0x0278,             // Range Maximum
2875                                0x01,               // Alignment
2876                                0x08,               // Length
2877                                )
2878                            IO (Decode16,
2879                                0x0678,             // Range Minimum
2880                                0x0678,             // Range Maximum
2881                                0x01,               // Alignment
2882                                0x04,               // Length
2883                                )
2884                            IRQNoFlags ()
2885                                {5,7}
2886                            DMA (Compatibility, NotBusMaster, Transfer8, )
2887                                {0,1,3}
2888                        }
2889                        StartDependentFnNoPri ()
2890                        {
2891                            IO (Decode16,
2892                                0x03BC,             // Range Minimum
2893                                0x03BC,             // Range Maximum
2894                                0x01,               // Alignment
2895                                0x04,               // Length
2896                                )
2897                            IO (Decode16,
2898                                0x07BC,             // Range Minimum
2899                                0x07BC,             // Range Maximum
2900                                0x01,               // Alignment
2901                                0x04,               // Length
2902                                )
2903                            IRQNoFlags ()
2904                                {5,7}
2905                            DMA (Compatibility, NotBusMaster, Transfer8, )
2906                                {0,1,3}
2907                        }
2908                        EndDependentFn ()
2909                    })
2910                    Method (_SRS, 1, NotSerialized)
2911                    {
2912                        CreateByteField (Arg0, 0x02, IOLO)
2913                        CreateByteField (Arg0, 0x03, IOHI)
2914                        CreateWordField (Arg0, 0x02, IOAD)
2915                        CreateWordField (Arg0, 0x11, IRQW)
2916                        CreateByteField (Arg0, 0x14, DMAC)
2917                        ENFG ()
2918                        Store (0x01, LDN)
2919                        Store (One, ACTR)
2920                        Store (IOLO, IOAL)
2921                        Store (IOHI, IOAH)
2922                        FindSetLeftBit (IRQW, Local0)
2923                        Subtract (Local0, 0x01, Local0)
2924                        Store (Local0, INTR)
2925                        FindSetLeftBit (DMAC, Local1)
2926                        Store (DMCH, Local0)
2927                        Subtract (Local1, 0x01, DMCH)
2928                        SLDM (Local0, DMCH)
2929                        EXFG ()
2930                        CKIO (IOAD, 0x02)
2931                    }
2932                }
2933
2934                OperationRegion (KBCT, SystemIO, 0x60, 0x05)
2935                Field (KBCT, ByteAcc, NoLock, Preserve)
2936                {
2937                    P060,   8,
2938                            Offset (0x04),
2939                    P064,   8
2940                }
2941
2942                Device (PS2M)
2943                {
2944                    Name (_HID, EisaId ("PNP0F13"))
2945                    Method (_STA, 0, NotSerialized)
2946                    {
2947                        If (LEqual (PS2F, 0x00))
2948                        {
2949                            Return (0x0F)
2950                        }
2951                        Else
2952                        {
2953                            Return (0x00)
2954                        }
2955                    }
2956
2957                    Method (_CRS, 0, NotSerialized)
2958                    {
2959                        Name (BUF1, ResourceTemplate ()
2960                        {
2961                            IRQNoFlags ()
2962                                {12}
2963                        })
2964                        Name (BUF2, ResourceTemplate ()
2965                        {
2966                            IO (Decode16,
2967                                0x0060,             // Range Minimum
2968                                0x0060,             // Range Maximum
2969                                0x01,               // Alignment
2970                                0x01,               // Length
2971                                )
2972                            IO (Decode16,
2973                                0x0064,             // Range Minimum
2974                                0x0064,             // Range Maximum
2975                                0x01,               // Alignment
2976                                0x01,               // Length
2977                                )
2978                            IRQNoFlags ()
2979                                {12}
2980                        })
2981                        If (LEqual (KBDI, 0x01))
2982                        {
2983                            If (LEqual (OSFL, 0x02))
2984                            {
2985                                Return (BUF1)
2986                            }
2987
2988                            If (LEqual (OSFL, 0x01))
2989                            {
2990                                Return (BUF1)
2991                            }
2992                            Else
2993                            {
2994                                Return (BUF2)
2995                            }
2996                        }
2997                        Else
2998                        {
2999                            Return (BUF1)
3000                        }
3001                    }
3002                }
3003
3004                Device (PS2K)
3005                {
3006                    Name (_HID, EisaId ("PNP0303"))
3007                    Name (_CID, 0x0B03D041)
3008                    Method (_STA, 0, NotSerialized)
3009                    {
3010                        If (LEqual (KBDI, 0x01))
3011                        {
3012                            Return (0x00)
3013                        }
3014                        Else
3015                        {
3016                            Return (0x0F)
3017                        }
3018                    }
3019
3020                    Name (_CRS, ResourceTemplate ()
3021                    {
3022                        IO (Decode16,
3023                            0x0060,             // Range Minimum
3024                            0x0060,             // Range Maximum
3025                            0x01,               // Alignment
3026                            0x01,               // Length
3027                            )
3028                        IO (Decode16,
3029                            0x0064,             // Range Minimum
3030                            0x0064,             // Range Maximum
3031                            0x01,               // Alignment
3032                            0x01,               // Length
3033                            )
3034                        IRQNoFlags ()
3035                            {1}
3036                    })
3037                }
3038
3039                Device (PSMR)
3040                {
3041                    Name (_HID, EisaId ("PNP0C02"))
3042                    Name (_UID, 0x03)
3043                    Method (_STA, 0, NotSerialized)
3044                    {
3045                        If (LEqual (KBDI, 0x00))
3046                        {
3047                            Return (0x00)
3048                        }
3049
3050                        If (LEqual (PS2F, 0x00))
3051                        {
3052                            If (LEqual (OSFL, 0x02))
3053                            {
3054                                Return (0x0F)
3055                            }
3056
3057                            If (LEqual (OSFL, 0x01))
3058                            {
3059                                Return (0x0F)
3060                            }
3061
3062                            Return (0x00)
3063                        }
3064
3065                        Return (0x00)
3066                    }
3067
3068                    Name (_CRS, ResourceTemplate ()
3069                    {
3070                        IO (Decode16,
3071                            0x0060,             // Range Minimum
3072                            0x0060,             // Range Maximum
3073                            0x01,               // Alignment
3074                            0x01,               // Length
3075                            )
3076                        IO (Decode16,
3077                            0x0064,             // Range Minimum
3078                            0x0064,             // Range Maximum
3079                            0x01,               // Alignment
3080                            0x01,               // Length
3081                            )
3082                    })
3083                }
3084
3085                Device (GAME)
3086                {
3087                    Name (_HID, EisaId ("PNPB02F"))
3088                    Method (_STA, 0, NotSerialized)
3089                    {
3090                        ENFG ()
3091                        Store (0x07, LDN)
3092                        If (LOr (IOAH, IOAL))
3093                        {
3094                            EXFG ()
3095                            Return (0x0F)
3096                        }
3097                        Else
3098                        {
3099                            And (ACTR, 0x02, Local0)
3100                            If (LEqual (Local0, 0x02))
3101                            {
3102                                EXFG ()
3103                                Return (0x0D)
3104                            }
3105                            Else
3106                            {
3107                                EXFG ()
3108                                Return (0x00)
3109                            }
3110                        }
3111                    }
3112
3113                    Method (_DIS, 0, NotSerialized)
3114                    {
3115                        ENFG ()
3116                        Store (0x07, LDN)
3117                        Store (Zero, IOAH)
3118                        Store (Zero, IOAL)
3119                        EXFG ()
3120                        DISD (0x04)
3121                    }
3122
3123                    Method (_CRS, 0, NotSerialized)
3124                    {
3125                        Name (BUF1, ResourceTemplate ()
3126                        {
3127                            IO (Decode16,
3128                                0x0000,             // Range Minimum
3129                                0x0000,             // Range Maximum
3130                                0x01,               // Alignment
3131                                0x08,               // Length
3132                                _Y0F)
3133                        })
3134                        CreateByteField (BUF1, \_SB.PCI0.PX40.GAME._CRS._Y0F._MIN, IOLO)
3135                        CreateByteField (BUF1, 0x03, IOHI)
3136                        CreateByteField (BUF1, \_SB.PCI0.PX40.GAME._CRS._Y0F._MAX, IORL)
3137                        CreateByteField (BUF1, 0x05, IORH)
3138                        ENFG ()
3139                        Store (0x07, LDN)
3140                        Store (IOAL, IOLO)
3141                        Store (IOAL, IORL)
3142                        Store (IOAH, IOHI)
3143                        Store (IOAH, IORH)
3144                        EXFG ()
3145                        Return (BUF1)
3146                    }
3147
3148                    Name (_PRS, ResourceTemplate ()
3149                    {
3150                        StartDependentFnNoPri ()
3151                        {
3152                            IO (Decode16,
3153                                0x0200,             // Range Minimum
3154                                0x0200,             // Range Maximum
3155                                0x01,               // Alignment
3156                                0x08,               // Length
3157                                )
3158                        }
3159                        StartDependentFnNoPri ()
3160                        {
3161                            IO (Decode16,
3162                                0x0208,             // Range Minimum
3163                                0x0208,             // Range Maximum
3164                                0x01,               // Alignment
3165                                0x08,               // Length
3166                                )
3167                        }
3168                        EndDependentFn ()
3169                    })
3170                    Method (_SRS, 1, NotSerialized)
3171                    {
3172                        CreateByteField (Arg0, 0x02, IOLO)
3173                        CreateByteField (Arg0, 0x03, IOHI)
3174                        CreateWordField (Arg0, 0x02, IOAD)
3175                        ENFG ()
3176                        Store (0x07, LDN)
3177                        Or (ACTR, 0x02, ACTR)
3178                        Store (IOLO, IOAL)
3179                        Store (IOHI, IOAH)
3180                        EXFG ()
3181                        CKIO (IOAD, 0x04)
3182                    }
3183                }
3184
3185                Device (MIDI)
3186                {
3187                    Name (_HID, EisaId ("PNPB006"))
3188                    OperationRegion (MID1, SystemIO, 0x0290, 0x02)
3189                    Field (MID1, ByteAcc, NoLock, Preserve)
3190                    {
3191                        MD1,    8,
3192                        ST1,    8
3193                    }
3194
3195                    OperationRegion (MID2, SystemIO, 0x0300, 0x02)
3196                    Field (MID2, ByteAcc, NoLock, Preserve)
3197                    {
3198                        MD2,    8,
3199                        ST2,    8
3200                    }
3201
3202                    OperationRegion (MID3, SystemIO, 0x0330, 0x02)
3203                    Field (MID3, ByteAcc, NoLock, Preserve)
3204                    {
3205                        MD3,    8,
3206                        ST3,    8
3207                    }
3208
3209                    Method (_STA, 0, NotSerialized)
3210                    {
3211                        ENFG ()
3212                        Store (0x07, LDN)
3213                        If (LOr (IO2H, IO2L))
3214                        {
3215                            EXFG ()
3216                            Return (0x0F)
3217                        }
3218                        Else
3219                        {
3220                            And (ACTR, 0x04, Local0)
3221                            If (LEqual (Local0, 0x04))
3222                            {
3223                                EXFG ()
3224                                Return (0x0D)
3225                            }
3226                            Else
3227                            {
3228                                EXFG ()
3229                                Return (0x00)
3230                            }
3231                        }
3232                    }
3233
3234                    Method (_DIS, 0, NotSerialized)
3235                    {
3236                        ENFG ()
3237                        Store (0x07, LDN)
3238                        Store (Zero, IO2H)
3239                        Store (Zero, IO2L)
3240                        Store (Zero, INTR)
3241                        EXFG ()
3242                        DISD (0x05)
3243                    }
3244
3245                    Method (_CRS, 0, NotSerialized)
3246                    {
3247                        Name (BUF1, ResourceTemplate ()
3248                        {
3249                            IO (Decode16,
3250                                0x0000,             // Range Minimum
3251                                0x0000,             // Range Maximum
3252                                0x01,               // Alignment
3253                                0x02,               // Length
3254                                _Y10)
3255                            IRQNoFlags (_Y11)
3256                                {}
3257                        })
3258                        CreateByteField (BUF1, \_SB.PCI0.PX40.MIDI._CRS._Y10._MIN, IOLO)
3259                        CreateByteField (BUF1, 0x03, IOHI)
3260                        CreateByteField (BUF1, \_SB.PCI0.PX40.MIDI._CRS._Y10._MAX, IORL)
3261                        CreateByteField (BUF1, 0x05, IORH)
3262                        CreateWordField (BUF1, \_SB.PCI0.PX40.MIDI._CRS._Y11._INT, IRQW)
3263                        ENFG ()
3264                        Store (0x07, LDN)
3265                        Store (IO2L, IOLO)
3266                        Store (IO2L, IORL)
3267                        Store (IO2H, IOHI)
3268                        Store (IO2H, IORH)
3269                        Store (One, Local0)
3270                        ShiftLeft (Local0, INTR, IRQW)
3271                        EXFG ()
3272                        Return (BUF1)
3273                    }
3274
3275                    Name (_PRS, ResourceTemplate ()
3276                    {
3277                        StartDependentFnNoPri ()
3278                        {
3279                            IO (Decode16,
3280                                0x0330,             // Range Minimum
3281                                0x0330,             // Range Maximum
3282                                0x01,               // Alignment
3283                                0x02,               // Length
3284                                )
3285                            IRQNoFlags ()
3286                                {3,4,5,7,9,10,11,12}
3287                        }
3288                        StartDependentFnNoPri ()
3289                        {
3290                            IO (Decode16,
3291                                0x0300,             // Range Minimum
3292                                0x0300,             // Range Maximum
3293                                0x01,               // Alignment
3294                                0x02,               // Length
3295                                )
3296                            IRQNoFlags ()
3297                                {3,4,5,7,9,10,11,12}
3298                        }
3299                        StartDependentFnNoPri ()
3300                        {
3301                            IO (Decode16,
3302                                0x0290,             // Range Minimum
3303                                0x0290,             // Range Maximum
3304                                0x01,               // Alignment
3305                                0x02,               // Length
3306                                )
3307                            IRQNoFlags ()
3308                                {3,4,5,7,9,10,11,12}
3309                        }
3310                        StartDependentFnNoPri ()
3311                        {
3312                            IO (Decode16,
3313                                0x0292,             // Range Minimum
3314                                0x0292,             // Range Maximum
3315                                0x02,               // Alignment
3316                                0x02,               // Length
3317                                )
3318                            IRQNoFlags ()
3319                                {3,4,5,7,9,10,11,12}
3320                        }
3321                        EndDependentFn ()
3322                    })
3323                    Method (_SRS, 1, NotSerialized)
3324                    {
3325                        CreateByteField (Arg0, 0x02, IOLO)
3326                        CreateByteField (Arg0, 0x03, IOHI)
3327                        CreateWordField (Arg0, 0x02, IOAD)
3328                        CreateWordField (Arg0, 0x09, IRQW)
3329                        ENFG ()
3330                        Store (0x07, LDN)
3331                        Or (ACTR, 0x04, ACTR)
3332                        Store (IOLO, IO2L)
3333                        Store (IOHI, IO2H)
3334                        FindSetLeftBit (IRQW, Local0)
3335                        Subtract (Local0, 0x01, Local0)
3336                        Store (Local0, INTR)
3337                        EXFG ()
3338                        CKIO (IOAD, 0x05)
3339                        If (LEqual (IOAD, 0x0290))
3340                        {
3341                            And (ST1, 0x40, Local0)
3342                            While (LEqual (Local0, 0x40))
3343                            {
3344                                Store (MD1, Local0)
3345                                And (ST1, 0x40, Local0)
3346                            }
3347                        }
3348                        Else
3349                        {
3350                            If (LEqual (IOAD, 0x0300))
3351                            {
3352                                And (ST2, 0x40, Local0)
3353                                While (LEqual (Local0, 0x40))
3354                                {
3355                                    Store (MD2, Local0)
3356                                    And (ST2, 0x40, Local0)
3357                                }
3358                            }
3359                            Else
3360                            {
3361                                And (ST3, 0x40, Local0)
3362                                While (LEqual (Local0, 0x40))
3363                                {
3364                                    Store (MD3, Local0)
3365                                    And (ST3, 0x40, Local0)
3366                                }
3367                            }
3368                        }
3369
3370                        Store (IOLO, Local0)
3371                        Store (IOHI, Local1)
3372                        ShiftLeft (Local1, 0x08, Local1)
3373                        Add (Local0, Local1, Local2)
3374                        OperationRegion (MDPA, SystemIO, Local2, 0x02)
3375                        Field (MDPA, ByteAcc, NoLock, Preserve)
3376                        {
3377                            MDP0,   8,
3378                            MDP1,   8
3379                        }
3380
3381                        Store (0x2000, Local0)
3382                        While (Local0)
3383                        {
3384                            Store (MDP0, Local1)
3385                            Store (MDP1, Local1)
3386                            And (Local1, 0x80, Local1)
3387                            If (LEqual (Local1, 0x80))
3388                            {
3389                                Store (0x00, Local0)
3390                            }
3391                            Else
3392                            {
3393                                Subtract (Local0, 0x01, Local0)
3394                            }
3395                        }
3396                    }
3397                }
3398
3399                Scope (\)
3400                {
3401                    OperationRegion (MSI, SystemMemory, 0x000FF81B, 0x01)
3402                    Field (MSI, ByteAcc, NoLock, Preserve)
3403                    {
3404                        MSIF,   8
3405                    }
3406
3407                    OperationRegion (WIN2, SystemIO, 0x70, 0x02)
3408                    Field (WIN2, ByteAcc, NoLock, Preserve)
3409                    {
3410                        IND2,   8,
3411                        DAT2,   8
3412                    }
3413
3414                    Method (RCMS, 0, NotSerialized)
3415                    {
3416                        Store (MSIF, Local0)
3417                        ShiftRight (Local0, 0x06, Local1)
3418                        Return (Local1)
3419                    }
3420
3421                    Method (SALD, 1, NotSerialized)
3422                    {
3423                        Store (0x00, Local1)
3424                        If (LEqual (Arg0, 0x01))
3425                        {
3426                            Store (0x01, Local1)
3427                        }
3428
3429                        If (LEqual (Arg0, 0x03))
3430                        {
3431                            Store (0x01, Local1)
3432                        }
3433
3434                        If (LEqual (Arg0, 0x00))
3435                        {
3436                            Store (0x00, Local0)
3437                        }
3438
3439                        If (LEqual (Local1, 0x01))
3440                        {
3441                            Store (RCMS (), Local0)
3442                            If (LEqual (Local0, 0x00))
3443                            {
3444                                Store (0x00, Local0)
3445                            }
3446                            Else
3447                            {
3448                                If (LEqual (Local0, 0x01))
3449                                {
3450                                    XOr (0x00, 0x40, Local0)
3451                                }
3452                                Else
3453                                {
3454                                    Store (0x80, Local0)
3455                                }
3456                            }
3457                        }
3458
3459                        If (LEqual (Arg0, 0x04))
3460                        {
3461                            Store (0x00, Local0)
3462                        }
3463
3464                        If (LEqual (Arg0, 0x05))
3465                        {
3466                            Store (0x00, Local0)
3467                        }
3468
3469                        SLED (Local0)
3470                    }
3471                }
3472
3473                Scope (\)
3474                {
3475                    Method (PLED, 1, NotSerialized)
3476                    {
3477                        ENFG ()
3478                        Store (0x08, LDN)
3479                        And (OPT6, 0x3F, Local0)
3480                        Or (Local0, Arg0, OPT6)
3481                        EXFG ()
3482                    }
3483                }
3484
3485                Scope (\)
3486                {
3487                    Method (SLED, 1, NotSerialized)
3488                    {
3489                        ENFG ()
3490                        Store (0x09, LDN)
3491                        And (OPT4, 0x3F, Local0)
3492                        Or (Local0, Arg0, OPT4)
3493                        EXFG ()
3494                    }
3495                }
3496
3497                Device (PMIO)
3498                {
3499                    Name (_HID, EisaId ("PNP0C02"))
3500                    Name (_UID, 0x02)
3501                    Method (_CRS, 0, NotSerialized)
3502                    {
3503                        Name (BUF0, ResourceTemplate ()
3504                        {
3505                            IO (Decode16,
3506                                0x4000,             // Range Minimum
3507                                0x4000,             // Range Maximum
3508                                0x01,               // Alignment
3509                                0xC0,               // Length
3510                                )
3511                        })
3512                        Return (BUF0)
3513                    }
3514                }
3515            }
3516
3517            Device (USB0)
3518            {
3519                Name (_ADR, 0x001D0000)
3520                Method (SS3D, 0, NotSerialized)
3521                {
3522                    If (LEqual (OSFL, 0x02))
3523                    {
3524                        Return (0x02)
3525                    }
3526
3527                    Return (0x03)
3528                }
3529
3530                Method (_PRW, 0, NotSerialized)
3531                {
3532                    Return (Package (0x02)
3533                    {
3534                        0x03,
3535                        0x04
3536                    })
3537                }
3538            }
3539
3540            Device (USB1)
3541            {
3542                Name (_ADR, 0x001D0001)
3543                Method (SS3D, 0, NotSerialized)
3544                {
3545                    If (LEqual (OSFL, 0x02))
3546                    {
3547                        Return (0x02)
3548                    }
3549
3550                    Return (0x03)
3551                }
3552
3553                Method (_PRW, 0, NotSerialized)
3554                {
3555                    Return (Package (0x02)
3556                    {
3557                        0x04,
3558                        0x04
3559                    })
3560                }
3561            }
3562
3563            Device (USB2)
3564            {
3565                Name (_ADR, 0x001D0002)
3566                Method (SS3D, 0, NotSerialized)
3567                {
3568                    If (LEqual (OSFL, 0x02))
3569                    {
3570                        Return (0x02)
3571                    }
3572
3573                    Return (0x03)
3574                }
3575
3576                Method (_PRW, 0, NotSerialized)
3577                {
3578                    Return (Package (0x02)
3579                    {
3580                        0x0C,
3581                        0x04
3582                    })
3583                }
3584            }
3585
3586            Device (USBE)
3587            {
3588                Name (_ADR, 0x001D0007)
3589                Method (SS3D, 0, NotSerialized)
3590                {
3591                    If (LEqual (OSFL, 0x02))
3592                    {
3593                        Return (0x02)
3594                    }
3595
3596                    Return (0x03)
3597                }
3598
3599                Method (_PRW, 0, NotSerialized)
3600                {
3601                    Return (Package (0x02)
3602                    {
3603                        0x0D,
3604                        0x04
3605                    })
3606                }
3607            }
3608
3609            Device (ICHX)
3610            {
3611                Name (_ADR, 0x001F0001)
3612                OperationRegion (PCI, PCI_Config, 0x40, 0x20)
3613                Field (PCI, DWordAcc, NoLock, Preserve)
3614                {
3615                    ITM0,   16,
3616                    ITM1,   16,
3617                    SIT0,   4,
3618                    SIT1,   4,
3619                            Offset (0x08),
3620                    UDC0,   2,
3621                    UDC1,   2,
3622                            Offset (0x0A),
3623                    UDT0,   8,
3624                    UDT1,   8,
3625                            Offset (0x14),
3626                    ICF0,   2,
3627                    ICF1,   2,
3628                        ,   6,
3629                    WPPE,   1,
3630                        ,   1,
3631                    FAS0,   2,
3632                    FAS1,   2
3633                }
3634
3635                Method (GTM, 6, NotSerialized)
3636                {
3637                    Store (Buffer (0x14) {}, Local0)
3638                    CreateDWordField (Local0, 0x00, PIO0)
3639                    CreateDWordField (Local0, 0x04, DMA0)
3640                    CreateDWordField (Local0, 0x08, PIO1)
3641                    CreateDWordField (Local0, 0x0C, DMA1)
3642                    CreateDWordField (Local0, 0x10, FLAG)
3643                    Store (0x10, FLAG)
3644                    If (LOr (And (Arg0, 0x08), LNot (And (Arg0, 0x01
3645                        ))))
3646                    {
3647                        Store (0x0384, PIO0)
3648                    }
3649                    Else
3650                    {
3651                        Add (ShiftRight (And (Arg0, 0x0300), 0x08), ShiftRight (And (
3652                            Arg0, 0x3000), 0x0C), Local1)
3653                        Multiply (Subtract (0x09, Local1), 0x1E, PIO0)
3654                    }
3655
3656                    If (LOr (LAnd (Arg0, 0x4000), LAnd (Arg2, 0x01)))
3657                    {
3658                        If (LOr (And (Arg0, 0x80), LNot (And (Arg0, 0x10
3659                            ))))
3660                        {
3661                            Store (0x0384, PIO1)
3662                        }
3663                        Else
3664                        {
3665                            Add (And (Arg1, 0x03), ShiftRight (And (Arg1, 0x0C),
3666                                0x02), Local1)
3667                            Multiply (Subtract (0x09, Local1), 0x1E, PIO1)
3668                        }
3669                    }
3670                    Else
3671                    {
3672                        Store (PIO0, PIO1)
3673                    }
3674
3675                    If (And (Arg2, 0x01))
3676                    {
3677                        Subtract (0x04, And (Arg3, 0x03), Local1)
3678                        If (And (Arg5, 0x01))
3679                        {
3680                            Store (0x14, DMA0)
3681                        }
3682                        Else
3683                        {
3684                            If (And (Arg4, 0x01))
3685                            {
3686                                Multiply (Local1, 0x0F, DMA0)
3687                            }
3688                            Else
3689                            {
3690                                Multiply (Local1, 0x1E, DMA0)
3691                            }
3692                        }
3693                    }
3694                    Else
3695                    {
3696                        Store (PIO0, DMA0)
3697                    }
3698
3699                    If (LOr (LAnd (Arg0, 0x4000), LAnd (Arg2, 0x01)))
3700                    {
3701                        If (And (Arg2, 0x02))
3702                        {
3703                            Subtract (0x04, ShiftRight (And (Arg3, 0x30), 0x04), Local1)
3704                            If (And (Arg5, 0x02))
3705                            {
3706                                Store (0x14, DMA1)
3707                            }
3708                            Else
3709                            {
3710                                If (And (Arg4, 0x02))
3711                                {
3712                                    Multiply (Local1, 0x0F, DMA1)
3713                                }
3714                                Else
3715                                {
3716                                    Multiply (Local1, 0x1E, DMA1)
3717                                }
3718                            }
3719                        }
3720                        Else
3721                        {
3722                            Store (PIO1, DMA1)
3723                        }
3724                    }
3725                    Else
3726                    {
3727                        Store (DMA0, DMA1)
3728                    }
3729
3730                    Store (Zero, FLAG)
3731                    If (And (Arg0, 0x01))
3732                    {
3733                        Or (FLAG, 0x10, FLAG)
3734                    }
3735
3736                    If (And (Arg2, 0x01))
3737                    {
3738                        Or (FLAG, 0x01, FLAG)
3739                    }
3740
3741                    If (And (Arg0, 0x02))
3742                    {
3743                        Or (FLAG, 0x02, FLAG)
3744                    }
3745
3746                    If (And (Arg2, 0x02))
3747                    {
3748                        Or (FLAG, 0x04, FLAG)
3749                    }
3750
3751                    If (And (Arg0, 0x20))
3752                    {
3753                        Or (FLAG, 0x08, FLAG)
3754                    }
3755
3756                    Return (Local0)
3757                }
3758
3759                Method (STM, 3, NotSerialized)
3760                {
3761                    Store (Buffer (0x18) {}, Local7)
3762                    CreateDWordField (Local7, 0x00, ITM)
3763                    CreateDWordField (Local7, 0x04, SIT)
3764                    CreateDWordField (Local7, 0x08, UDC)
3765                    CreateDWordField (Local7, 0x0C, UDT)
3766                    CreateDWordField (Local7, 0x10, ICF)
3767                    CreateDWordField (Local7, 0x14, FAS)
3768                    CreateDWordField (Arg0, 0x00, PIO0)
3769                    CreateDWordField (Arg0, 0x04, DMA0)
3770                    CreateDWordField (Arg0, 0x08, PIO1)
3771                    CreateDWordField (Arg0, 0x0C, DMA1)
3772                    CreateDWordField (Arg0, 0x10, FLAG)
3773                    Store (FLAG, Local4)
3774                    Store (0x8000, Local0)
3775                    If (And (Local4, 0x02))
3776                    {
3777                        Or (Local0, 0x07, Local0)
3778                    }
3779
3780                    If (And (Local4, 0x08))
3781                    {
3782                        Or (Local0, 0x4000, Local0)
3783                        Or (Local0, 0x70, Local0)
3784                    }
3785
3786                    If (LAnd (LLess (DMA0, PIO0), LNot (And (Local4, 0x01))))
3787                    {
3788                        Or (Local0, 0x08, Local0)
3789                    }
3790
3791                    If (LAnd (LLess (DMA1, PIO1), LNot (And (Local4, 0x04))))
3792                    {
3793                        Or (Local0, 0x80, Local0)
3794                    }
3795
3796                    If (PIO0)
3797                    {
3798                        If (LLess (PIO0, 0x0384))
3799                        {
3800                            Or (Local0, 0x01, Local0)
3801                        }
3802                    }
3803
3804                    If (PIO1)
3805                    {
3806                        If (LLess (PIO1, 0x0384))
3807                        {
3808                            Or (Local0, 0x10, Local0)
3809                        }
3810                    }
3811
3812                    If (And (Local4, 0x01))
3813                    {
3814                        Store (PIO0, Local1)
3815                    }
3816                    Else
3817                    {
3818                        Store (DMA0, Local1)
3819                    }
3820
3821                    If (Local1)
3822                    {
3823                        If (LLessEqual (Local1, 0x78))
3824                        {
3825                            Or (Local0, 0x2300, Local0)
3826                        }
3827                        Else
3828                        {
3829                            If (LLessEqual (Local1, 0xB4))
3830                            {
3831                                Or (Local0, 0x2100, Local0)
3832                            }
3833                            Else
3834                            {
3835                                If (LLessEqual (Local1, 0xF0))
3836                                {
3837                                    Or (Local0, 0x1000, Local0)
3838                                }
3839                            }
3840                        }
3841                    }
3842
3843                    Store (Local0, ITM)
3844                    Store (Zero, Local0)
3845                    If (And (Local4, 0x04))
3846                    {
3847                        Store (PIO1, Local1)
3848                    }
3849                    Else
3850                    {
3851                        Store (DMA1, Local1)
3852                    }
3853
3854                    If (Local1)
3855                    {
3856                        If (LLessEqual (Local1, 0x78))
3857                        {
3858                            Store (0x0B, Local0)
3859                        }
3860                        Else
3861                        {
3862                            If (LLessEqual (Local1, 0xB4))
3863                            {
3864                                Store (0x09, Local0)
3865                            }
3866                            Else
3867                            {
3868                                If (LLessEqual (Local1, 0xF0))
3869                                {
3870                                    Store (0x04, Local0)
3871                                }
3872                            }
3873                        }
3874                    }
3875
3876                    Store (Local0, SIT)
3877                    Store (0x00, Local0)
3878                    If (And (Local4, 0x01))
3879                    {
3880                        Or (Local0, 0x01, Local0)
3881                    }
3882
3883                    If (And (Local4, 0x04))
3884                    {
3885                        Or (Local0, 0x02, Local0)
3886                    }
3887
3888                    Store (Local0, UDC)
3889                    Store (0x00, Local0)
3890                    If (And (Local4, 0x01))
3891                    {
3892                        If (LEqual (DMA0, 0x14))
3893                        {
3894                            Store (0x01, Local0)
3895                        }
3896                        Else
3897                        {
3898                            If (LLess (DMA0, 0x3C))
3899                            {
3900                                Divide (DMA0, 0x0F, , Local1)
3901                            }
3902                            Else
3903                            {
3904                                Divide (DMA0, 0x1E, , Local1)
3905                            }
3906
3907                            Subtract (0x04, Local1, Local0)
3908                        }
3909                    }
3910
3911                    If (And (Local4, 0x04))
3912                    {
3913                        If (LEqual (DMA1, 0x14))
3914                        {
3915                            Store (0x01, Local1)
3916                        }
3917                        Else
3918                        {
3919                            If (LLess (DMA1, 0x3C))
3920                            {
3921                                Divide (DMA1, 0x0F, , Local1)
3922                            }
3923                            Else
3924                            {
3925                                Divide (DMA1, 0x1E, , Local1)
3926                            }
3927
3928                            Subtract (0x04, Local1, Local1)
3929                        }
3930
3931                        ShiftLeft (Local1, 0x04, Local1)
3932                        Or (Local0, Local1, Local0)
3933                    }
3934
3935                    Store (Local0, UDT)
3936                    Store (0x00, Local0)
3937                    If (DMA0)
3938                    {
3939                        If (LGreater (DMA0, 0x14))
3940                        {
3941                            If (LLess (DMA0, 0x3C))
3942                            {
3943                                Or (Local0, 0x01, Local0)
3944                            }
3945                        }
3946                    }
3947
3948                    If (DMA1)
3949                    {
3950                        If (LGreater (DMA1, 0x14))
3951                        {
3952                            If (LLess (DMA1, 0x3C))
3953                            {
3954                                Or (Local0, 0x02, Local0)
3955                            }
3956                        }
3957                    }
3958
3959                    Store (Local0, ICF)
3960                    Store (0x00, Local0)
3961                    If (LEqual (DMA0, 0x14))
3962                    {
3963                        Or (Local0, 0x01, Local0)
3964                    }
3965
3966                    If (LEqual (DMA1, 0x14))
3967                    {
3968                        Or (Local0, 0x02, Local0)
3969                    }
3970
3971                    Store (Local0, FAS)
3972                    Return (Local7)
3973                }
3974
3975                Method (H15P, 1, NotSerialized)
3976                {
3977                    Name (BUFF, Buffer (0x08)
3978                    {
3979                        /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
3980                    })
3981                    Store (Arg0, Local0)
3982                    Store (BUFF, Local1)
3983                    Concatenate (Local0, Local1, Local7)
3984                    CreateWordField (Local7, 0x02, CYL)
3985                    CreateWordField (Local7, 0x06, HEAD)
3986                    CreateWordField (Local7, 0x0C, SPT)
3987                    If (LAnd (LGreaterEqual (HEAD, 0x10), LGreaterEqual (CYL, 0x2000)))
3988                    {
3989                        Return (SPT)
3990                    }
3991                    Else
3992                    {
3993                        Return (Zero)
3994                    }
3995                }
3996
3997                Method (GTF0, 7, NotSerialized)
3998                {
3999                    Store (Buffer (0x07)
4000                        {
4001                            /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF
4002                        }, Local7)
4003                    CreateByteField (Local7, 0x01, MODE)
4004                    If (And (Arg2, 0x01))
4005                    {
4006                        And (Arg3, 0x03, Local0)
4007                        If (And (Arg6, 0x01))
4008                        {
4009                            Add (Local0, 0x04, Local0)
4010                        }
4011                        Else
4012                        {
4013                            If (And (Arg4, 0x01))
4014                            {
4015                                Add (Local0, 0x02, Local0)
4016                            }
4017                        }
4018
4019                        Or (Local0, 0x40, MODE)
4020                    }
4021                    Else
4022                    {
4023                        Add (ShiftRight (And (Arg0, 0x0300), 0x08), ShiftRight (And (
4024                            Arg0, 0x3000), 0x0C), Local0)
4025                        If (LGreaterEqual (Local0, 0x05))
4026                        {
4027                            Store (0x22, MODE)
4028                        }
4029                        Else
4030                        {
4031                            If (LGreaterEqual (Local0, 0x03))
4032                            {
4033                                Store (0x21, MODE)
4034                            }
4035                            Else
4036                            {
4037                                Store (0x20, MODE)
4038                            }
4039                        }
4040                    }
4041
4042                    Concatenate (Local7, Local7, Local6)
4043                    If (LOr (And (Arg0, 0x08), LNot (And (Arg0, 0x01
4044                        ))))
4045                    {
4046                        If (And (Arg0, 0x02))
4047                        {
4048                            Store (0x00, MODE)
4049                        }
4050                        Else
4051                        {
4052                            Store (0x01, MODE)
4053                        }
4054                    }
4055                    Else
4056                    {
4057                        Add (ShiftRight (And (Arg0, 0x0300), 0x08), ShiftRight (And (
4058                            Arg0, 0x3000), 0x0C), Local0)
4059                        If (LGreaterEqual (Local0, 0x05))
4060                        {
4061                            Store (0x0C, MODE)
4062                        }
4063                        Else
4064                        {
4065                            If (LGreaterEqual (Local0, 0x03))
4066                            {
4067                                Store (0x0B, MODE)
4068                            }
4069                            Else
4070                            {
4071                                Store (0x0A, MODE)
4072                            }
4073                        }
4074                    }
4075
4076                    Concatenate (Local6, Local7, Local5)
4077                    If (Arg5)
4078                    {
4079                        Store (Buffer (0x07)
4080                            {
4081                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x91
4082                            }, Local4)
4083                        CreateByteField (Local4, 0x01, SPT)
4084                        Store (Arg5, SPT)
4085                        Concatenate (Local5, Local4, Local6)
4086                        Return (Local6)
4087                    }
4088                    Else
4089                    {
4090                        Return (Local5)
4091                    }
4092                }
4093
4094                Method (GTF1, 7, NotSerialized)
4095                {
4096                    Store (Buffer (0x07)
4097                        {
4098                            /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF
4099                        }, Local7)
4100                    CreateByteField (Local7, 0x01, MODE)
4101                    If (And (Arg2, 0x02))
4102                    {
4103                        ShiftRight (And (Arg3, 0x30), 0x04, Local0)
4104                        If (And (Arg6, 0x02))
4105                        {
4106                            Add (Local0, 0x04, Local0)
4107                        }
4108                        Else
4109                        {
4110                            If (And (Arg4, 0x02))
4111                            {
4112                                Add (Local0, 0x02, Local0)
4113                            }
4114                        }
4115
4116                        Or (Local0, 0x40, MODE)
4117                    }
4118                    Else
4119                    {
4120                        Add (ShiftRight (And (Arg1, 0x03), 0x02), And (Arg1,
4121                            0x0C), Local0)
4122                        If (LGreaterEqual (Local0, 0x05))
4123                        {
4124                            Store (0x22, MODE)
4125                        }
4126                        Else
4127                        {
4128                            If (LGreaterEqual (Local0, 0x03))
4129                            {
4130                                Store (0x21, MODE)
4131                            }
4132                            Else
4133                            {
4134                                Store (0x20, MODE)
4135                            }
4136                        }
4137                    }
4138
4139                    Concatenate (Local7, Local7, Local6)
4140                    If (LOr (And (Arg0, 0x80), LNot (And (Arg0, 0x10
4141                        ))))
4142                    {
4143                        If (And (Arg0, 0x20))
4144                        {
4145                            Store (0x00, MODE)
4146                        }
4147                        Else
4148                        {
4149                            Store (0x01, MODE)
4150                        }
4151                    }
4152                    Else
4153                    {
4154                        Add (ShiftRight (And (Arg1, 0x03), 0x02), And (Arg1,
4155                            0x0C), Local0)
4156                        If (LGreaterEqual (Local0, 0x05))
4157                        {
4158                            Store (0x0C, MODE)
4159                        }
4160                        Else
4161                        {
4162                            If (LGreaterEqual (Local0, 0x03))
4163                            {
4164                                Store (0x0B, MODE)
4165                            }
4166                            Else
4167                            {
4168                                Store (0x0A, MODE)
4169                            }
4170                        }
4171                    }
4172
4173                    Concatenate (Local6, Local7, Local5)
4174                    If (Arg5)
4175                    {
4176                        Store (Buffer (0x07)
4177                            {
4178                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x91
4179                            }, Local4)
4180                        CreateByteField (Local4, 0x01, SPT)
4181                        Store (Arg5, SPT)
4182                        Concatenate (Local5, Local4, Local6)
4183                        Return (Local6)
4184                    }
4185                    Else
4186                    {
4187                        Return (Local5)
4188                    }
4189                }
4190
4191                Device (PRIM)
4192                {
4193                    Name (_ADR, 0x00)
4194                    Method (_GTM, 0, NotSerialized)
4195                    {
4196                        Store (GTM (ITM0, SIT0, UDC0, UDT0, ICF0, FAS0), Local0)
4197                        Return (Local0)
4198                    }
4199
4200                    Method (_STM, 3, NotSerialized)
4201                    {
4202                        Store (STM (Arg0, Arg1, Arg2), Local0)
4203                        CreateDWordField (Local0, 0x00, ITM)
4204                        CreateDWordField (Local0, 0x04, SIT)
4205                        CreateDWordField (Local0, 0x08, UDC)
4206                        CreateDWordField (Local0, 0x0C, UDT)
4207                        CreateDWordField (Local0, 0x10, ICF)
4208                        CreateDWordField (Local0, 0x14, FAS)
4209                        Store (UDC, UDC0)
4210                        Store (UDT, UDT0)
4211                        Store (ICF, ICF0)
4212                        Store (FAS, FAS0)
4213                    }
4214
4215                    Device (MAST)
4216                    {
4217                        Name (_ADR, 0x00)
4218                        Name (H15F, Zero)
4219                        Method (_GTF, 0, NotSerialized)
4220                        {
4221                            Store (GTF0 (ITM0, SIT0, UDC0, UDT0, ICF0, H15F, FAS0), Local0)
4222                            Return (Local0)
4223                        }
4224                    }
4225
4226                    Device (SLAV)
4227                    {
4228                        Name (_ADR, 0x01)
4229                        Name (H15F, Zero)
4230                        Method (_GTF, 0, NotSerialized)
4231                        {
4232                            Store (GTF1 (ITM0, SIT0, UDC0, UDT0, ICF0, H15F, FAS0), Local0)
4233                            Return (Local0)
4234                        }
4235                    }
4236                }
4237
4238                Device (SECN)
4239                {
4240                    Name (_ADR, 0x01)
4241                    Method (_GTM, 0, NotSerialized)
4242                    {
4243                        Store (GTM (ITM1, SIT1, UDC1, UDT1, ICF1, FAS1), Local0)
4244                        Return (Local0)
4245                    }
4246
4247                    Method (_STM, 3, NotSerialized)
4248                    {
4249                        Store (STM (Arg0, Arg1, Arg2), Local0)
4250                        CreateDWordField (Local0, 0x00, ITM)
4251                        CreateDWordField (Local0, 0x04, SIT)
4252                        CreateDWordField (Local0, 0x08, UDC)
4253                        CreateDWordField (Local0, 0x0C, UDT)
4254                        CreateDWordField (Local0, 0x10, ICF)
4255                        CreateDWordField (Local0, 0x14, FAS)
4256                        Store (UDC, UDC1)
4257                        Store (UDT, UDT1)
4258                        Store (ICF, ICF1)
4259                        Store (FAS, FAS1)
4260                    }
4261
4262                    Device (MAST)
4263                    {
4264                        Name (_ADR, 0x00)
4265                        Name (H15F, Zero)
4266                        Method (_GTF, 0, NotSerialized)
4267                        {
4268                            Store (GTF0 (ITM1, SIT1, UDC1, UDT1, ICF1, H15F, FAS1), Local0)
4269                            Return (Local0)
4270                        }
4271                    }
4272
4273                    Device (SLAV)
4274                    {
4275                        Name (_ADR, 0x01)
4276                        Name (H15F, Zero)
4277                        Method (_GTF, 0, NotSerialized)
4278                        {
4279                            Store (GTF1 (ITM1, SIT1, UDC1, UDT1, ICF1, H15F, FAS1), Local0)
4280                            Return (Local0)
4281                        }
4282                    }
4283                }
4284            }
4285
4286            Device (PX43)
4287            {
4288                Name (_ADR, 0x001F0003)
4289                OperationRegion (PBAS, PCI_Config, 0x20, 0x02)
4290                Field (PBAS, ByteAcc, NoLock, Preserve)
4291                {
4292                    BAS0,   16
4293                }
4294
4295                Method (SMBB, 0, NotSerialized)
4296                {
4297                    And (BAS0, 0xFFFE, Local0)
4298                    Return (Local0)
4299                }
4300            }
4301
4302            Device (MODM)
4303            {
4304                Name (_ADR, 0x001F0006)
4305                Method (_PRW, 0, NotSerialized)
4306                {
4307                    Return (Package (0x02)
4308                    {
4309                        0x05,
4310                        0x05
4311                    })
4312                }
4313            }
4314
4315            Name (BUFA, ResourceTemplate ()
4316            {
4317                IRQ (Level, ActiveLow, Shared, )
4318                    {3,4,5,7,9,10,11,12,14,15}
4319            })
4320            Name (BUFB, ResourceTemplate ()
4321            {
4322                IRQ (Level, ActiveLow, Shared, _Y12)
4323                    {}
4324            })
4325            CreateWordField (BUFB, \_SB.PCI0._Y12._INT, IRQV)
4326            Device (LNKA)
4327            {
4328                Name (_HID, EisaId ("PNP0C0F"))
4329                Name (_UID, 0x01)
4330                Method (_STA, 0, NotSerialized)
4331                {
4332                    And (PIRA, 0x80, Local0)
4333                    If (LEqual (Local0, 0x80))
4334                    {
4335                        Return (0x09)
4336                    }
4337                    Else
4338                    {
4339                        Return (0x0B)
4340                    }
4341                }
4342
4343                Method (_PRS, 0, NotSerialized)
4344                {
4345                    Return (BUFA)
4346                }
4347
4348                Method (_DIS, 0, NotSerialized)
4349                {
4350                    Or (PIRA, 0x80, PIRA)
4351                }
4352
4353                Method (_CRS, 0, NotSerialized)
4354                {
4355                    And (PIRA, 0x0F, Local0)
4356                    ShiftLeft (0x01, Local0, IRQV)
4357                    Return (BUFB)
4358                }
4359
4360                Method (_SRS, 1, NotSerialized)
4361                {
4362                    CreateWordField (Arg0, 0x01, IRQ1)
4363                    FindSetRightBit (IRQ1, Local0)
4364                    Decrement (Local0)
4365                    Store (Local0, PIRA)
4366                }
4367            }
4368
4369            Device (LNKB)
4370            {
4371                Name (_HID, EisaId ("PNP0C0F"))
4372                Name (_UID, 0x02)
4373                Method (_STA, 0, NotSerialized)
4374                {
4375                    And (PIRB, 0x80, Local0)
4376                    If (LEqual (Local0, 0x80))
4377                    {
4378                        Return (0x09)
4379                    }
4380                    Else
4381                    {
4382                        Return (0x0B)
4383                    }
4384                }
4385
4386                Method (_PRS, 0, NotSerialized)
4387                {
4388                    Return (BUFA)
4389                }
4390
4391                Method (_DIS, 0, NotSerialized)
4392                {
4393                    Or (PIRB, 0x80, PIRB)
4394                }
4395
4396                Method (_CRS, 0, NotSerialized)
4397                {
4398                    And (PIRB, 0x0F, Local0)
4399                    ShiftLeft (0x01, Local0, IRQV)
4400                    Return (BUFB)
4401                }
4402
4403                Method (_SRS, 1, NotSerialized)
4404                {
4405                    CreateWordField (Arg0, 0x01, IRQ1)
4406                    FindSetRightBit (IRQ1, Local0)
4407                    Decrement (Local0)
4408                    Store (Local0, PIRB)
4409                }
4410            }
4411
4412            Device (LNKC)
4413            {
4414                Name (_HID, EisaId ("PNP0C0F"))
4415                Name (_UID, 0x03)
4416                Method (_STA, 0, NotSerialized)
4417                {
4418                    And (PIRC, 0x80, Local0)
4419                    If (LEqual (Local0, 0x80))
4420                    {
4421                        Return (0x09)
4422                    }
4423                    Else
4424                    {
4425                        Return (0x0B)
4426                    }
4427                }
4428
4429                Method (_PRS, 0, NotSerialized)
4430                {
4431                    Return (BUFA)
4432                }
4433
4434                Method (_DIS, 0, NotSerialized)
4435                {
4436                    Or (PIRC, 0x80, PIRC)
4437                }
4438
4439                Method (_CRS, 0, NotSerialized)
4440                {
4441                    And (PIRC, 0x0F, Local0)
4442                    ShiftLeft (0x01, Local0, IRQV)
4443                    Return (BUFB)
4444                }
4445
4446                Method (_SRS, 1, NotSerialized)
4447                {
4448                    CreateWordField (Arg0, 0x01, IRQ1)
4449                    FindSetRightBit (IRQ1, Local0)
4450                    Decrement (Local0)
4451                    Store (Local0, PIRC)
4452                }
4453            }
4454
4455            Device (LNKD)
4456            {
4457                Name (_HID, EisaId ("PNP0C0F"))
4458                Name (_UID, 0x04)
4459                Method (_STA, 0, NotSerialized)
4460                {
4461                    And (PIRD, 0x80, Local0)
4462                    If (LEqual (Local0, 0x80))
4463                    {
4464                        Return (0x09)
4465                    }
4466                    Else
4467                    {
4468                        Return (0x0B)
4469                    }
4470                }
4471
4472                Method (_PRS, 0, NotSerialized)
4473                {
4474                    Return (BUFA)
4475                }
4476
4477                Method (_DIS, 0, NotSerialized)
4478                {
4479                    Or (PIRD, 0x80, PIRD)
4480                }
4481
4482                Method (_CRS, 0, NotSerialized)
4483                {
4484                    And (PIRD, 0x0F, Local0)
4485                    ShiftLeft (0x01, Local0, IRQV)
4486                    Return (BUFB)
4487                }
4488
4489                Method (_SRS, 1, NotSerialized)
4490                {
4491                    CreateWordField (Arg0, 0x01, IRQ1)
4492                    FindSetRightBit (IRQ1, Local0)
4493                    Decrement (Local0)
4494                    Store (Local0, PIRD)
4495                }
4496            }
4497
4498            Device (LNKE)
4499            {
4500                Name (_HID, EisaId ("PNP0C0F"))
4501                Name (_UID, 0x05)
4502                Method (_STA, 0, NotSerialized)
4503                {
4504                    And (PIRE, 0x80, Local0)
4505                    If (LEqual (Local0, 0x80))
4506                    {
4507                        Return (0x09)
4508                    }
4509                    Else
4510                    {
4511                        Return (0x0B)
4512                    }
4513                }
4514
4515                Method (_PRS, 0, NotSerialized)
4516                {
4517                    Return (BUFA)
4518                }
4519
4520                Method (_DIS, 0, NotSerialized)
4521                {
4522                    Or (PIRE, 0x80, PIRE)
4523                }
4524
4525                Method (_CRS, 0, NotSerialized)
4526                {
4527                    And (PIRE, 0x0F, Local0)
4528                    ShiftLeft (0x01, Local0, IRQV)
4529                    Return (BUFB)
4530                }
4531
4532                Method (_SRS, 1, NotSerialized)
4533                {
4534                    CreateWordField (Arg0, 0x01, IRQ1)
4535                    FindSetRightBit (IRQ1, Local0)
4536                    Decrement (Local0)
4537                    Store (Local0, PIRE)
4538                }
4539            }
4540
4541            Device (LNKF)
4542            {
4543                Name (_HID, EisaId ("PNP0C0F"))
4544                Name (_UID, 0x06)
4545                Method (_STA, 0, NotSerialized)
4546                {
4547                    And (PIRF, 0x80, Local0)
4548                    If (LEqual (Local0, 0x80))
4549                    {
4550                        Return (0x09)
4551                    }
4552                    Else
4553                    {
4554                        Return (0x0B)
4555                    }
4556                }
4557
4558                Method (_PRS, 0, NotSerialized)
4559                {
4560                    Return (BUFA)
4561                }
4562
4563                Method (_DIS, 0, NotSerialized)
4564                {
4565                    Or (PIRF, 0x80, PIRF)
4566                }
4567
4568                Method (_CRS, 0, NotSerialized)
4569                {
4570                    And (PIRF, 0x0F, Local0)
4571                    ShiftLeft (0x01, Local0, IRQV)
4572                    Return (BUFB)
4573                }
4574
4575                Method (_SRS, 1, NotSerialized)
4576                {
4577                    CreateWordField (Arg0, 0x01, IRQ1)
4578                    FindSetRightBit (IRQ1, Local0)
4579                    Decrement (Local0)
4580                    Store (Local0, PIRF)
4581                }
4582            }
4583
4584            Device (LNK0)
4585            {
4586                Name (_HID, EisaId ("PNP0C0F"))
4587                Name (_UID, 0x07)
4588                Method (_STA, 0, NotSerialized)
4589                {
4590                    And (PIRG, 0x80, Local0)
4591                    If (LEqual (Local0, 0x80))
4592                    {
4593                        Return (0x09)
4594                    }
4595                    Else
4596                    {
4597                        Return (0x0B)
4598                    }
4599                }
4600
4601                Method (_PRS, 0, NotSerialized)
4602                {
4603                    Return (BUFA)
4604                }
4605
4606                Method (_DIS, 0, NotSerialized)
4607                {
4608                    Or (PIRG, 0x80, PIRG)
4609                }
4610
4611                Method (_CRS, 0, NotSerialized)
4612                {
4613                    And (PIRG, 0x0F, Local0)
4614                    ShiftLeft (0x01, Local0, IRQV)
4615                    Return (BUFB)
4616                }
4617
4618                Method (_SRS, 1, NotSerialized)
4619                {
4620                    CreateWordField (Arg0, 0x01, IRQ1)
4621                    FindSetRightBit (IRQ1, Local0)
4622                    Decrement (Local0)
4623                    Store (Local0, PIRG)
4624                }
4625            }
4626
4627            Device (LNK1)
4628            {
4629                Name (_HID, EisaId ("PNP0C0F"))
4630                Name (_UID, 0x08)
4631                Method (_STA, 0, NotSerialized)
4632                {
4633                    And (PIRH, 0x80, Local0)
4634                    If (LEqual (Local0, 0x80))
4635                    {
4636                        Return (0x09)
4637                    }
4638                    Else
4639                    {
4640                        Return (0x0B)
4641                    }
4642                }
4643
4644                Method (_PRS, 0, NotSerialized)
4645                {
4646                    Return (BUFA)
4647                }
4648
4649                Method (_DIS, 0, NotSerialized)
4650                {
4651                    Or (PIRH, 0x80, PIRH)
4652                }
4653
4654                Method (_CRS, 0, NotSerialized)
4655                {
4656                    And (PIRH, 0x0F, Local0)
4657                    ShiftLeft (0x01, Local0, IRQV)
4658                    Return (BUFB)
4659                }
4660
4661                Method (_SRS, 1, NotSerialized)
4662                {
4663                    CreateWordField (Arg0, 0x01, IRQ1)
4664                    FindSetRightBit (IRQ1, Local0)
4665                    Decrement (Local0)
4666                    Store (Local0, PIRH)
4667                }
4668            }
4669
4670            Method (_PRW, 0, NotSerialized)
4671            {
4672                Return (Package (0x02)
4673                {
4674                    0x0B,
4675                    0x05
4676                })
4677            }
4678
4679            Method (\_SB.PCI0.PX40.UAR1._PRW, 0, NotSerialized)
4680            {
4681                Return (Package (0x02)
4682                {
4683                    0x08,
4684                    0x05
4685                })
4686            }
4687
4688            Method (\_SB.PCI0.PX40.UAR2._PRW, 0, NotSerialized)
4689            {
4690                Return (Package (0x02)
4691                {
4692                    0x08,
4693                    0x05
4694                })
4695            }
4696        }
4697
4698        Device (MEM)
4699        {
4700            Name (_HID, EisaId ("PNP0C01"))
4701            Method (_CRS, 0, NotSerialized)
4702            {
4703                Name (BUF0, ResourceTemplate ()
4704                {
4705                    Memory32Fixed (ReadWrite,
4706                        0x000F0000,         // Address Base
4707                        0x00004000,         // Address Length
4708                        _Y13)
4709                    Memory32Fixed (ReadWrite,
4710                        0x000F4000,         // Address Base
4711                        0x00004000,         // Address Length
4712                        _Y14)
4713                    Memory32Fixed (ReadWrite,
4714                        0x000F8000,         // Address Base
4715                        0x00004000,         // Address Length
4716                        _Y15)
4717                    Memory32Fixed (ReadWrite,
4718                        0x000FC000,         // Address Base
4719                        0x00004000,         // Address Length
4720                        _Y16)
4721                    Memory32Fixed (ReadWrite,
4722                        0xFEC00000,         // Address Base
4723                        0x00001000,         // Address Length
4724                        )
4725                    Memory32Fixed (ReadWrite,
4726                        0xFEE00000,         // Address Base
4727                        0x00001000,         // Address Length
4728                        )
4729                    Memory32Fixed (ReadWrite,
4730                        0xFFB00000,         // Address Base
4731                        0x00080000,         // Address Length
4732                        )
4733                    Memory32Fixed (ReadWrite,
4734                        0xFFF00000,         // Address Base
4735                        0x00100000,         // Address Length
4736                        )
4737                    Memory32Fixed (ReadWrite,
4738                        0x000E8000,         // Address Base
4739                        0x00008000,         // Address Length
4740                        )
4741                })
4742                CreateDWordField (BUF0, \_SB.MEM._CRS._Y13._BAS, RMA1)
4743                CreateDWordField (BUF0, \_SB.MEM._CRS._Y13._LEN, RSS1)
4744                CreateDWordField (BUF0, \_SB.MEM._CRS._Y14._BAS, RMA2)
4745                CreateDWordField (BUF0, \_SB.MEM._CRS._Y14._LEN, RSS2)
4746                CreateDWordField (BUF0, \_SB.MEM._CRS._Y15._BAS, RMA3)
4747                CreateDWordField (BUF0, \_SB.MEM._CRS._Y15._LEN, RSS3)
4748                CreateDWordField (BUF0, \_SB.MEM._CRS._Y16._BAS, RMA4)
4749                CreateDWordField (BUF0, \_SB.MEM._CRS._Y16._LEN, RSS4)
4750                If (LNotEqual (ROM1, Zero))
4751                {
4752                    Store (RMA1, RMA2)
4753                    ShiftLeft (ROM1, 0x08, Local0)
4754                    Store (Local0, RMA1)
4755                    ShiftLeft (RMS1, 0x08, Local0)
4756                    Store (Local0, RSS1)
4757                    Store (0x8000, RSS2)
4758                }
4759
4760                If (LNotEqual (ROM2, Zero))
4761                {
4762                    Store (RMA2, RMA3)
4763                    ShiftLeft (ROM2, 0x08, Local0)
4764                    Store (Local0, RMA2)
4765                    ShiftLeft (RMS2, 0x08, Local0)
4766                    Store (Local0, RSS2)
4767                    Store (0xC000, RSS3)
4768                }
4769
4770                If (LNotEqual (ROM3, Zero))
4771                {
4772                    Store (RMA3, RMA4)
4773                    ShiftLeft (ROM3, 0x08, Local0)
4774                    Store (Local0, RMA3)
4775                    ShiftLeft (RMS3, 0x08, Local0)
4776                    Store (Local0, RSS3)
4777                    Store (0x00010000, RSS4)
4778                }
4779
4780                Return (BUF0)
4781            }
4782        }
4783
4784        Device (\_SB.PCI0.PX40.FWH)
4785        {
4786            Name (_HID, EisaId ("INT0800"))
4787            Method (_CRS, 0, NotSerialized)
4788            {
4789                Name (FWH0, ResourceTemplate ()
4790                {
4791                    Memory32Fixed (ReadWrite,
4792                        0xFFB80000,         // Address Base
4793                        0x00080000,         // Address Length
4794                        )
4795                })
4796                Return (FWH0)
4797            }
4798        }
4799    }
4800
4801    OperationRegion (TEMM, SystemMemory, 0x000FF810, 0x0C)
4802    Field (TEMM, WordAcc, NoLock, Preserve)
4803    {
4804        TP1H,   16,
4805        TP1L,   16,
4806        TP2H,   16,
4807        TP2L,   16,
4808        TRPC,   16,
4809        SENF,   16
4810    }
4811
4812    Name (TVAR, Buffer (0x05)
4813    {
4814        /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00
4815    })
4816    CreateByteField (TVAR, 0x00, PLCY)
4817    CreateWordField (TVAR, 0x01, CTOS)
4818    CreateWordField (TVAR, 0x03, CTHY)
4819    Name (TBUF, Buffer (0x04)
4820    {
4821        /* 0000 */    0x00, 0x00, 0x00, 0x00
4822    })
4823    CreateByteField (TBUF, 0x00, DB00)
4824    CreateByteField (TBUF, 0x01, DB01)
4825    CreateWordField (TBUF, 0x00, DW00)
4826    CreateWordField (TBUF, 0x02, DW01)
4827    CreateDWordField (TBUF, 0x00, DATD)
4828    OperationRegion (IP, SystemIO, 0x0295, 0x02)
4829    Field (IP, ByteAcc, NoLock, Preserve)
4830    {
4831        INDS,   8,
4832        DATS,   8
4833    }
4834
4835    Method (SCFG, 1, NotSerialized)
4836    {
4837        SBYT (0x40, Arg0)
4838    }
4839
4840    Method (STOS, 3, NotSerialized)
4841    {
4842        Store (GBYT (0x4E), Local0)
4843        Or (Local0, 0x01, Local1)
4844        SBYT (0x4E, Local1)
4845        SBYT (0x55, Arg1)
4846        SBYT (0x56, Arg0)
4847        SBYT (0x4E, Local0)
4848    }
4849
4850    Method (STHY, 3, NotSerialized)
4851    {
4852        Store (GBYT (0x4E), Local0)
4853        Or (Local0, 0x01, Local1)
4854        SBYT (0x4E, Local1)
4855        SBYT (0x53, Arg1)
4856        SBYT (0x54, Arg0)
4857        SBYT (0x4E, Local0)
4858    }
4859
4860    Method (RTMP, 0, NotSerialized)
4861    {
4862        Store (GBYT (0x4E), Local0)
4863        Or (Local0, 0x01, Local1)
4864        SBYT (0x4E, Local1)
4865        Store (GBYT (0x50), Local1)
4866        Store (GBYT (0x51), Local2)
4867        ShiftLeft (Local1, 0x08, Local1)
4868        Or (Local1, Local2, Local3)
4869        ShiftRight (Local3, 0x07, Local3)
4870        ShiftLeft (Local3, 0x02, Local1)
4871        Add (Local3, Local1, Local3)
4872        Add (Local3, 0x0AAC, Local3)
4873        If (LGreater (Local3, 0x0E8A))
4874        {
4875            Store (0x0AAC, Local3)
4876        }
4877
4878        If (LEqual (TRPC, 0x0E95))
4879        {
4880            Store (0x0AAC, Local3)
4881        }
4882
4883        If (LEqual (Local3, 0x0AAC))
4884        {
4885            Store (0x0B86, Local3)
4886        }
4887
4888        SBYT (0x4E, Local0)
4889        Return (Local3)
4890    }
4891
4892    Method (SBYT, 2, NotSerialized)
4893    {
4894        Store (Arg0, INDS)
4895        Store (Arg1, DATS)
4896    }
4897
4898    Method (GBYT, 1, NotSerialized)
4899    {
4900        Store (Arg0, INDS)
4901        Store (DATS, Local7)
4902        Return (Local7)
4903    }
4904
4905    Method (SFAN, 1, NotSerialized)
4906    {
4907        SBYT (0x5A, Arg0)
4908        SBYT (0x5B, Arg0)
4909    }
4910
4911    Scope (\_TZ)
4912    {
4913        Device (FAN)
4914        {
4915            Name (_HID, EisaId ("PNP0C0B"))
4916            Method (_INI, 0, NotSerialized)
4917            {
4918                Store (TP1H, CTOS)
4919                Store (TP1L, CTHY)
4920            }
4921        }
4922
4923        ThermalZone (THRM)
4924        {
4925            Name (_AL0, Package (0x01)
4926            {
4927                FAN
4928            })
4929            Method (_AC0, 0, NotSerialized)
4930            {
4931                If (Or (PLCY, PLCY, Local7))
4932                {
4933                    Return (TP2H)
4934                }
4935                Else
4936                {
4937                    Return (TP1H)
4938                }
4939            }
4940
4941            Name (_PSL, Package (0x01)
4942            {
4943                \_PR.CPU0
4944            })
4945            Name (_TSP, 0x3C)
4946            Name (_TC1, 0x04)
4947            Name (_TC2, 0x03)
4948            Method (_PSV, 0, NotSerialized)
4949            {
4950                If (Or (PLCY, PLCY, Local7))
4951                {
4952                    Return (TP1H)
4953                }
4954                Else
4955                {
4956                    Return (TP2H)
4957                }
4958            }
4959
4960            Method (_CRT, 0, NotSerialized)
4961            {
4962                Return (TRPC)
4963            }
4964
4965            Method (_TMP, 0, NotSerialized)
4966            {
4967                And (SENF, 0x01, Local6)
4968                If (LEqual (Local6, 0x01))
4969                {
4970                    Return (RTMP ())
4971                }
4972                Else
4973                {
4974                    Return (0x0B86)
4975                }
4976            }
4977
4978            Method (_SCP, 1, NotSerialized)
4979            {
4980                If (Arg0)
4981                {
4982                    Store (One, PLCY)
4983                }
4984                Else
4985                {
4986                    Store (Zero, PLCY)
4987                }
4988
4989                Notify (\_TZ.THRM, 0x81)
4990            }
4991
4992            Method (STMP, 2, NotSerialized)
4993            {
4994                Store (Arg1, DW00)
4995                If (Arg0)
4996                {
4997                    STHY (DB00, DB01, DW00)
4998                }
4999                Else
5000                {
5001                    STOS (DB00, DB01, DW00)
5002                }
5003            }
5004        }
5005    }
5006}
5007