S420DSDT: dsdt.asl

File dsdt.asl, 124.0 kB (added by dimitri, 5 years ago)

DSDT file for the S420 to fix temperature reading.

Line 
1/*
2 * Intel ACPI Component Architecture
3 * AML Disassembler version 20060912
4 *
5 * Disassembly of s420.dsdt, Sat Oct 21 03:23:46 2006
6 *
7 *
8 * Original Table Header:
9 *     Signature        "DSDT"
10 *     Length           0x00003DBC (15804)
11 *     Revision         0x01
12 *     OEM ID           "MSI"
13 *     OEM Table ID     "1412X"
14 *     OEM Revision     0x09062006 (151396358)
15 *     Creator ID       "INTL"
16 *     Creator Revision 0x02002026 (33562662)
17 */
18DefinitionBlock ("s420.aml", "DSDT", 1, "MSI", "1412X", 0x09062006)
19{
20    Scope (\_PR)
21    {
22        Processor (CPU1, 0x01, 0x00000810, 0x06)
23        {
24            OperationRegion (STBL, SystemMemory, 0x3DFD41F0, 0x0496)
25            Name (NCPU, 0x02)
26            Name (TYPE, 0x80000000)
27            Name (HNDL, 0x80000000)
28            Name (CFGD, 0x010041F1)
29            Name (TBLD, 0x00)
30            Method (_PDC, 1, NotSerialized)
31            {
32                CreateDWordField (Arg0, 0x08, DAT0)
33                Store (DAT0, TYPE)
34                If (LEqual (TBLD, 0x00))
35                {
36                    If (LAnd (LGreaterEqual (NCPU, 0x02), LEqual (And (TYPE, 0x0A
37                        ), 0x0A)))
38                    {
39                        Load (STBL, HNDL)
40                        Store (0x01, TBLD)
41                    }
42
43                    If (LAnd (LEqual (NCPU, 0x01), LEqual (And (TYPE, 0x01),
44                        0x01)))
45                    {
46                        If (And (TYPE, 0x01))
47                        {
48                            Load (STBL, HNDL)
49                            Store (0x01, TBLD)
50                        }
51                    }
52                }
53            }
54        }
55    }
56
57    Scope (\_PR)
58    {
59        Processor (CPU2, 0x02, 0x00000000, 0x00)
60        {
61            OperationRegion (STBL, SystemMemory, 0x3DFD4690, 0x0496)
62            Name (NCPU, 0x02)
63            Name (TYPE, 0x80000000)
64            Name (HNDL, 0x80000000)
65            Name (CFGD, 0x010041F1)
66            Name (TBLD, 0x00)
67            Method (_PDC, 1, NotSerialized)
68            {
69                CreateDWordField (Arg0, 0x08, DAT0)
70                Store (DAT0, TYPE)
71                If (LEqual (TBLD, 0x00))
72                {
73                    If (LAnd (LGreaterEqual (NCPU, 0x02), LEqual (And (TYPE, 0x01
74                        ), 0x01)))
75                    {
76                        Load (STBL, HNDL)
77                        Store (0x02, TBLD)
78                    }
79
80                    If (LAnd (LEqual (NCPU, 0x01), LEqual (And (TYPE, 0x01),
81                        0x01)))
82                    {
83                        If (LNot (And (TYPE, 0x10)))
84                        {
85                            Load (STBL, HNDL)
86                            Store (0x01, TBLD)
87                        }
88                    }
89                }
90            }
91        }
92    }
93
94    Method (NPTS, 1, NotSerialized)
95    {
96    }
97
98    Method (NWAK, 1, NotSerialized)
99    {
100    }
101
102    Method (SPTS, 1, NotSerialized)
103    {
104        If (LGreater (Arg0, 0x01))
105        {
106            TRMD ()
107        }
108
109        If (LEqual (Arg0, 0x04))
110        {
111            Store (Zero, RSTU)
112        }
113
114        Store (One, CLPS)
115        Store (One, SLPS)
116    }
117
118    OperationRegion (PMS1, SystemIO, 0x0820, 0x08)
119    Field (PMS1, ByteAcc, NoLock, Preserve)
120    {
121            ,   27,
122        AZST,   1
123    }
124
125    Method (SWAK, 1, NotSerialized)
126    {
127        If (LEqual (\_SB.PCI0.SMBS.REV, 0x80))
128        {
129            Notify (\_SB.PCI0.SBAZ, 0x02)
130            Store (0x80, \_SB.PCI0.SBAZ.PMEE)
131            Store (One, \AZST)
132        }
133
134        If (PICM)
135        {
136            \_SB.IRQC ()
137        }
138    }
139
140    OperationRegion (PMIO, SystemIO, 0x0CD6, 0x02)
141    Field (PMIO, ByteAcc, NoLock, Preserve)
142    {
143        INPM,   8,
144        DAPM,   8
145    }
146
147    IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve)
148    {
149            ,   1,
150        TM1E,   1,
151        TM2E,   1,
152                Offset (0x01),
153            ,   1,
154        TM1S,   1,
155        TM2S,   1,
156                Offset (0x04),
157            ,   7,
158        SLPS,   1,
159                Offset (0x07),
160            ,   7,
161        CLPS,   1,
162                Offset (0x1C),
163            ,   3,
164        MKME,   1,
165        PI3E,   1,
166        PI2E,   1,
167        PI1E,   1,
168        PI0E,   1,
169            ,   3,
170        MKMS,   1,
171        PI3S,   1,
172        PI2S,   1,
173        PI1S,   1,
174        PI0S,   1,
175                Offset (0x36),
176            ,   7,
177        GV7P,   1,
178                Offset (0x38),
179        XXX4,   4,
180        G0LC,   1,
181                Offset (0x3B),
182        GPX0,   1,
183        GPX4,   1,
184        GPX5,   1,
185        GPX1,   1,
186        GPX6,   1,
187        GPX7,   1,
188        GPX2,   1,
189        GPX3,   1,
190                Offset (0x55),
191        SPRE,   1,
192                Offset (0x65),
193            ,   5,
194        RSTU,   1,
195                Offset (0x66),
196                Offset (0x67),
197            ,   5,
198        EXHP,   1,
199                Offset (0x68),
200            ,   3,
201        TPDE,   1,
202            ,   1,
203                Offset (0x92),
204            ,   7,
205        GV7S,   1,
206                Offset (0xA8),
207        TPE0,   1,
208        TPE1,   1,
209        TPE2,   1,
210        TPE3,   1
211    }
212
213    Method (TRMD, 0, NotSerialized)
214    {
215        Store (Zero, SPRE)
216        Store (Zero, TPDE)
217    }
218
219    Method (HTCD, 0, NotSerialized)
220    {
221        Store (Zero, PI2E)
222        Store (Zero, TM2E)
223        Store (PI2S, PI2S)
224        Store (TM2S, TM2S)
225    }
226
227    Name (DP80, 0x80)
228    Name (DP90, 0x90)
229    Name (PMBS, 0x0800)
230    Name (PMLN, 0xA0)
231    Name (GPBS, 0x00)
232    Name (GPLN, 0x00)
233    Name (SMBS, 0x00)
234    Name (SMBL, 0x00)
235    Name (APIC, 0x01)
236    Name (SMIP, 0xB0)
237    Name (PCIB, 0xE0000000)
238    Name (PCIL, 0x10000000)
239    Name (HTTC, 0x00)
240    Name (SHR0, 0x01)
241    Name (STHP, 0x00)
242    OperationRegion (BIOS, SystemMemory, 0x3DFDE064, 0xFF)
243    Field (BIOS, ByteAcc, NoLock, Preserve)
244    {
245        SS1,    1,
246        SS2,    1,
247        SS3,    1,
248        SS4,    1,
249                Offset (0x01),
250        IOST,   16,
251        TOPM,   32,
252        ROMS,   32,
253        MG1B,   32,
254        MG1L,   32,
255        MG2B,   32,
256        MG2L,   32,
257                Offset (0x1C),
258        CPB0,   32,
259        CPB1,   32,
260        CPB2,   32,
261        CPB3,   32,
262        ASSB,   8,
263        AOTB,   8,
264        AAXB,   32
265    }
266
267    Method (RRIO, 4, NotSerialized)
268    {
269        Store ("RRIO", Debug)
270    }
271
272    Method (RDMA, 3, NotSerialized)
273    {
274        Store ("rDMA", Debug)
275    }
276
277    Name (PICM, 0x00)
278    Method (_PIC, 1, NotSerialized)
279    {
280        If (Arg0)
281        {
282            Store (0xAA, DBG8)
283            \_SB.IRQC ()
284        }
285        Else
286        {
287            Store (0xAC, DBG8)
288        }
289
290        Store (Arg0, PICM)
291    }
292
293    Name (OSVR, Ones)
294    Method (OSFL, 0, NotSerialized)
295    {
296        If (LNotEqual (OSVR, Ones))
297        {
298            Return (OSVR)
299        }
300
301        If (LEqual (PICM, 0x00))
302        {
303            Store (0xAC, DBG8)
304        }
305
306        Store (0x01, OSVR)
307        If (CondRefOf (\_OSI, Local1))
308        {
309            If (\_OSI ("Windows 2001"))
310            {
311                Store (0x00, OSVR)
312            }
313        }
314        Else
315        {
316            If (MCTH (\_OS, "Microsoft Windows NT"))
317            {
318                Store (0x04, OSVR)
319            }
320            Else
321            {
322                If (MCTH (\_OS, "Microsoft WindowsME: Millennium Edition"))
323                {
324                    Store (0x02, OSVR)
325                }
326
327                If (MCTH (\_OS, "Linux"))
328                {
329                    Store (0x03, OSVR)
330                }
331            }
332        }
333
334        Return (OSVR)
335    }
336
337    Method (MCTH, 2, NotSerialized)
338    {
339        If (LLess (SizeOf (Arg0), SizeOf (Arg1)))
340        {
341            Return (Zero)
342        }
343
344        Add (SizeOf (Arg0), 0x01, Local0)
345        Name (BUF0, Buffer (Local0) {})
346        Name (BUF1, Buffer (Local0) {})
347        Store (Arg0, BUF0)
348        Store (Arg1, BUF1)
349        While (Local0)
350        {
351            Decrement (Local0)
352            If (LNotEqual (DerefOf (Index (BUF0, Local0)), DerefOf (Index (
353                BUF1, Local0))))
354            {
355                Return (Zero)
356            }
357        }
358
359        Return (One)
360    }
361
362    Name (PRWP, Package (0x02)
363    {
364        Zero,
365        Zero
366    })
367    Method (GPRW, 2, NotSerialized)
368    {
369        Store (Arg0, Index (PRWP, 0x00))
370        Store (ShiftLeft (SS1, 0x01), Local0)
371        Or (Local0, ShiftLeft (SS2, 0x02), Local0)
372        Or (Local0, ShiftLeft (SS3, 0x03), Local0)
373        Or (Local0, ShiftLeft (SS4, 0x04), Local0)
374        If (And (ShiftLeft (0x01, Arg1), Local0))
375        {
376            Store (Arg1, Index (PRWP, 0x01))
377        }
378        Else
379        {
380            ShiftRight (Local0, 0x01, Local0)
381            If (LOr (LEqual (OSFL (), 0x01), LEqual (OSFL (), 0x02)))
382            {
383                FindSetLeftBit (Local0, Index (PRWP, 0x01))
384            }
385            Else
386            {
387                FindSetRightBit (Local0, Index (PRWP, 0x01))
388            }
389        }
390
391        Return (PRWP)
392    }
393
394    Name (WAKP, Package (0x02)
395    {
396        Zero,
397        Zero
398    })
399    OperationRegion (DEB0, SystemIO, DP80, 0x01)
400    Field (DEB0, ByteAcc, NoLock, Preserve)
401    {
402        DBG8,   8
403    }
404
405    OperationRegion (DEB1, SystemIO, DP90, 0x02)
406    Field (DEB1, WordAcc, NoLock, Preserve)
407    {
408        DBG9,   16
409    }
410
411    Scope (\_SB)
412    {
413        Name (PR00, Package (0x07)
414        {
415            Package (0x04)
416            {
417                0x0014FFFF,
418                0x00,
419                LNKA,
420                0x00
421            },
422
423            Package (0x04)
424            {
425                0x0014FFFF,
426                0x01,
427                LNKB,
428                0x00
429            },
430
431            Package (0x04)
432            {
433                0x0014FFFF,
434                0x02,
435                LNKC,
436                0x00
437            },
438
439            Package (0x04)
440            {
441                0x0014FFFF,
442                0x03,
443                LNKD,
444                0x00
445            },
446
447            Package (0x04)
448            {
449                0x0013FFFF,
450                0x00,
451                LNKD,
452                0x00
453            },
454
455            Package (0x04)
456            {
457                0x0013FFFF,
458                0x01,
459                LNKB,
460                0x00
461            },
462
463            Package (0x04)
464            {
465                0x0013FFFF,
466                0x02,
467                LNKC,
468                0x00
469            }
470        })
471        Name (AR00, Package (0x07)
472        {
473            Package (0x04)
474            {
475                0x0014FFFF,
476                0x00,
477                0x00,
478                0x10
479            },
480
481            Package (0x04)
482            {
483                0x0014FFFF,
484                0x01,
485                0x00,
486                0x11
487            },
488
489            Package (0x04)
490            {
491                0x0014FFFF,
492                0x02,
493                0x00,
494                0x12
495            },
496
497            Package (0x04)
498            {
499                0x0014FFFF,
500                0x03,
501                0x00,
502                0x13
503            },
504
505            Package (0x04)
506            {
507                0x0013FFFF,
508                0x00,
509                0x00,
510                0x13
511            },
512
513            Package (0x04)
514            {
515                0x0013FFFF,
516                0x01,
517                0x00,
518                0x11
519            },
520
521            Package (0x04)
522            {
523                0x0013FFFF,
524                0x02,
525                0x00,
526                0x12
527            }
528        })
529        Name (PR02, Package (0x04)
530        {
531            Package (0x04)
532            {
533                0xFFFF,
534                0x00,
535                LNKC,
536                0x00
537            },
538
539            Package (0x04)
540            {
541                0xFFFF,
542                0x01,
543                LNKD,
544                0x00
545            },
546
547            Package (0x04)
548            {
549                0xFFFF,
550                0x02,
551                LNKA,
552                0x00
553            },
554
555            Package (0x04)
556            {
557                0xFFFF,
558                0x03,
559                LNKB,
560                0x00
561            }
562        })
563        Name (AR02, Package (0x04)
564        {
565            Package (0x04)
566            {
567                0xFFFF,
568                0x00,
569                0x00,
570                0x12
571            },
572
573            Package (0x04)
574            {
575                0xFFFF,
576                0x01,
577                0x00,
578                0x13
579            },
580
581            Package (0x04)
582            {
583                0xFFFF,
584                0x02,
585                0x00,
586                0x10
587            },
588
589            Package (0x04)
590            {
591                0xFFFF,
592                0x03,
593                0x00,
594                0x11
595            }
596        })
597        Name (PR03, Package (0x04)
598        {
599            Package (0x04)
600            {
601                0xFFFF,
602                0x00,
603                LNKD,
604                0x00
605            },
606
607            Package (0x04)
608            {
609                0xFFFF,
610                0x01,
611                LNKA,
612                0x00
613            },
614
615            Package (0x04)
616            {
617                0xFFFF,
618                0x02,
619                LNKB,
620                0x00
621            },
622
623            Package (0x04)
624            {
625                0xFFFF,
626                0x03,
627                LNKC,
628                0x00
629            }
630        })
631        Name (AR03, Package (0x04)
632        {
633            Package (0x04)
634            {
635                0xFFFF,
636                0x00,
637                0x00,
638                0x13
639            },
640
641            Package (0x04)
642            {
643                0xFFFF,
644                0x01,
645                0x00,
646                0x10
647            },
648
649            Package (0x04)
650            {
651                0xFFFF,
652                0x02,
653                0x00,
654                0x11
655            },
656
657            Package (0x04)
658            {
659                0xFFFF,
660                0x03,
661                0x00,
662                0x12
663            }
664        })
665        Name (PR04, Package (0x04)
666        {
667            Package (0x04)
668            {
669                0xFFFF,
670                0x00,
671                LNKA,
672                0x00
673            },
674
675            Package (0x04)
676            {
677                0xFFFF,
678                0x01,
679                LNKB,
680                0x00
681            },
682
683            Package (0x04)
684            {
685                0xFFFF,
686                0x02,
687                LNKC,
688                0x00
689            },
690
691            Package (0x04)
692            {
693                0xFFFF,
694                0x03,
695                LNKD,
696                0x00
697            }
698        })
699        Name (AR04, Package (0x04)
700        {
701            Package (0x04)
702            {
703                0xFFFF,
704                0x00,
705                0x00,
706                0x10
707            },
708
709            Package (0x04)
710            {
711                0xFFFF,
712                0x01,
713                0x00,
714                0x11
715            },
716
717            Package (0x04)
718            {
719                0xFFFF,
720                0x02,
721                0x00,
722                0x12
723            },
724
725            Package (0x04)
726            {
727                0xFFFF,
728                0x03,
729                0x00,
730                0x13
731            }
732        })
733        Name (PR05, Package (0x04)
734        {
735            Package (0x04)
736            {
737                0xFFFF,
738                0x00,
739                LNKB,
740                0x00
741            },
742
743            Package (0x04)
744            {
745                0xFFFF,
746                0x01,
747                LNKD,
748                0x00
749            },
750
751            Package (0x04)
752            {
753                0xFFFF,
754                0x02,
755                LNKD,
756                0x00
757            },
758
759            Package (0x04)
760            {
761                0xFFFF,
762                0x03,
763                LNKA,
764                0x00
765            }
766        })
767        Name (AR05, Package (0x04)
768        {
769            Package (0x04)
770            {
771                0xFFFF,
772                0x00,
773                0x00,
774                0x11
775            },
776
777            Package (0x04)
778            {
779                0xFFFF,
780                0x01,
781                0x00,
782                0x12
783            },
784
785            Package (0x04)
786            {
787                0xFFFF,
788                0x02,
789                0x00,
790                0x13
791            },
792
793            Package (0x04)
794            {
795                0xFFFF,
796                0x03,
797                0x00,
798                0x10
799            }
800        })
801        Name (PR06, Package (0x04)
802        {
803            Package (0x04)
804            {
805                0xFFFF,
806                0x00,
807                LNKC,
808                0x00
809            },
810
811            Package (0x04)
812            {
813                0xFFFF,
814                0x01,
815                LNKD,
816                0x00
817            },
818
819            Package (0x04)
820            {
821                0xFFFF,
822                0x02,
823                LNKA,
824                0x00
825            },
826
827            Package (0x04)
828            {
829                0xFFFF,
830                0x03,
831                LNKB,
832                0x00
833            }
834        })
835        Name (AR06, Package (0x04)
836        {
837            Package (0x04)
838            {
839                0xFFFF,
840                0x00,
841                0x00,
842                0x12
843            },
844
845            Package (0x04)
846            {
847                0xFFFF,
848                0x01,
849                0x00,
850                0x13
851            },
852
853            Package (0x04)
854            {
855                0xFFFF,
856                0x02,
857                0x00,
858                0x10
859            },
860
861            Package (0x04)
862            {
863                0xFFFF,
864                0x03,
865                0x00,
866                0x11
867            }
868        })
869        Name (PR07, Package (0x04)
870        {
871            Package (0x04)
872            {
873                0xFFFF,
874                0x00,
875                LNKD,
876                0x00
877            },
878
879            Package (0x04)
880            {
881                0xFFFF,
882                0x01,
883                LNKA,
884                0x00
885            },
886
887            Package (0x04)
888            {
889                0xFFFF,
890                0x02,
891                LNKB,
892                0x00
893            },
894
895            Package (0x04)
896            {
897                0xFFFF,
898                0x03,
899                LNKC,
900                0x00
901            }
902        })
903        Name (AR07, Package (0x04)
904        {
905            Package (0x04)
906            {
907                0xFFFF,
908                0x00,
909                0x00,
910                0x13
911            },
912
913            Package (0x04)
914            {
915                0xFFFF,
916                0x01,
917                0x00,
918                0x10
919            },
920
921            Package (0x04)
922            {
923                0xFFFF,
924                0x02,
925                0x00,
926                0x11
927            },
928
929            Package (0x04)
930            {
931                0xFFFF,
932                0x03,
933                0x00,
934                0x12
935            }
936        })
937        Name (PR01, Package (0x04)
938        {
939            Package (0x04)
940            {
941                0x0005FFFF,
942                0x00,
943                LNKB,
944                0x00
945            },
946
947            Package (0x04)
948            {
949                0x0005FFFF,
950                0x01,
951                LNKC,
952                0x00
953            },
954
955            Package (0x04)
956            {
957                0x0005FFFF,
958                0x02,
959                LNKD,
960                0x00
961            },
962
963            Package (0x04)
964            {
965                0x0005FFFF,
966                0x03,
967                LNKA,
968                0x00
969            }
970        })
971        Name (AR01, Package (0x04)
972        {
973            Package (0x04)
974            {
975                0x0005FFFF,
976                0x00,
977                0x00,
978                0x11
979            },
980
981            Package (0x04)
982            {
983                0x0005FFFF,
984                0x01,
985                0x00,
986                0x12
987            },
988
989            Package (0x04)
990            {
991                0x0005FFFF,
992                0x02,
993                0x00,
994                0x13
995            },
996
997            Package (0x04)
998            {
999                0x0005FFFF,
1000                0x03,
1001                0x00,
1002                0x10
1003            }
1004        })
1005        Name (PR09, Package (0x04)
1006        {
1007            Package (0x04)
1008            {
1009                0x0009FFFF,
1010                0x00,
1011                LNKA,
1012                0x00
1013            },
1014
1015            Package (0x04)
1016            {
1017                0x0009FFFF,
1018                0x01,
1019                LNKB,
1020                0x00
1021            },
1022
1023            Package (0x04)
1024            {
1025                0x0004FFFF,
1026                0x00,
1027                LNKD,
1028                0x00
1029            },
1030
1031            Package (0x04)
1032            {
1033                0x0003FFFF,
1034                0x00,
1035                LNKC,
1036                0x00
1037            }
1038        })
1039        Name (AR09, Package (0x04)
1040        {
1041            Package (0x04)
1042            {
1043                0x0009FFFF,
1044                0x00,
1045                0x00,
1046                0x10
1047            },
1048
1049            Package (0x04)
1050            {
1051                0x0009FFFF,
1052                0x01,
1053                0x00,
1054                0x11
1055            },
1056
1057            Package (0x04)
1058            {
1059                0x0004FFFF,
1060                0x00,
1061                0x00,
1062                0x13
1063            },
1064
1065            Package (0x04)
1066            {
1067                0x0003FFFF,
1068                0x00,
1069                0x00,
1070                0x12
1071            }
1072        })
1073        Name (PRSA, ResourceTemplate ()
1074        {
1075            IRQ (Level, ActiveLow, Shared, )
1076                {3,4,5,7,10,11,12,14,15}
1077        })
1078        Alias (PRSA, PRSB)
1079        Alias (PRSA, PRSC)
1080        Alias (PRSA, PRSD)
1081        Alias (PRSA, PRSE)
1082        Name (PRSF, ResourceTemplate ()
1083        {
1084            IRQ (Level, ActiveLow, Shared, )
1085                {9}
1086        })
1087        Alias (PRSA, PRSG)
1088        Alias (PRSA, PRSH)
1089        Device (PCI0)
1090        {
1091            Name (_HID, EisaId ("PNP0A03"))
1092            Name (_ADR, 0x00)
1093            Method (^BN00, 0, NotSerialized)
1094            {
1095                Return (0x00)
1096            }
1097
1098            Method (_BBN, 0, NotSerialized)
1099            {
1100                Return (BN00 ())
1101            }
1102
1103            Name (_UID, 0x00)
1104            Method (_PRT, 0, NotSerialized)
1105            {
1106                If (PICM)
1107                {
1108                    Return (AR00)
1109                }
1110
1111                Return (PR00)
1112            }
1113
1114            Device (AGP)
1115            {
1116                Name (_ADR, 0x00010000)
1117                Device (VGA)
1118                {
1119                    Name (_ADR, 0x00050000)
1120                    Method (_DOS, 1, NotSerialized)
1121                    {
1122                        Store (Arg0, SWIT)
1123                    }
1124
1125                    Name (_DOD, Package (0x03)
1126                    {
1127                        0x00010100,
1128                        0x00010110,
1129                        0x0200
1130                    })
1131                    Device (CRT)
1132                    {
1133                        Name (_ADR, 0x0100)
1134                        Name (_DCS, 0x1F)
1135                        Name (_DGS, 0x01)
1136                        Method (_DSS, 1, NotSerialized)
1137                        {
1138                        }
1139                    }
1140
1141                    Device (TV)
1142                    {
1143                        Name (_ADR, 0x0200)
1144                        Name (_DCS, 0x1F)
1145                        Name (_DGS, 0x01)
1146                        Method (_DSS, 1, NotSerialized)
1147                        {
1148                        }
1149                    }
1150
1151                    Device (LCD)
1152                    {
1153                        Name (_ADR, 0x0110)
1154                        Name (_DCS, 0x1F)
1155                        Name (_DGS, 0x01)
1156                        Method (_DSS, 1, NotSerialized)
1157                        {
1158                        }
1159
1160                        Method (_BCM, 1, NotSerialized)
1161                        {
1162                        }
1163
1164                        Name (PBCL, Package (0x07)
1165                        {
1166                            0x50,
1167                            0x32,
1168                            0x14,
1169                            0x28,
1170                            0x3C,
1171                            0x50,
1172                            0x64
1173                        })
1174                        Method (_BCL, 0, NotSerialized)
1175                        {
1176                            Return (PBCL)
1177                        }
1178                    }
1179
1180                    Name (SWIT, 0x00)
1181                    Name (GDCS, 0x02)
1182                    Name (GDGS, 0x01)
1183                    Name (GDTS, 0x00)
1184                    Name (GDFG, 0x01)
1185                }
1186
1187                Method (_PRT, 0, NotSerialized)
1188                {
1189                    If (PICM)
1190                    {
1191                        Return (AR01)
1192                    }
1193
1194                    Return (PR01)
1195                }
1196            }
1197
1198            Device (PCE2)
1199            {
1200                Name (_ADR, 0x00020000)
1201                Method (_PRW, 0, NotSerialized)
1202                {
1203                    Return (GPRW (0x12, 0x04))
1204                }
1205
1206                Method (_PRT, 0, NotSerialized)
1207                {
1208                    If (PICM)
1209                    {
1210                        Return (AR02)
1211                    }
1212
1213                    Return (PR02)
1214                }
1215            }
1216
1217            Device (PCE3)
1218            {
1219                Name (_ADR, 0x00030000)
1220                Method (_PRW, 0, NotSerialized)
1221                {
1222                    Return (GPRW (0x12, 0x04))
1223                }
1224
1225                Method (_PRT, 0, NotSerialized)
1226                {
1227                    If (PICM)
1228                    {
1229                        Return (AR03)
1230                    }
1231
1232                    Return (PR03)
1233                }
1234            }
1235
1236            Device (PCE4)
1237            {
1238                Name (_ADR, 0x00040000)
1239                Method (_PRW, 0, NotSerialized)
1240                {
1241                    Return (GPRW (0x12, 0x04))
1242                }
1243
1244                Method (_PRT, 0, NotSerialized)
1245                {
1246                    If (PICM)
1247                    {
1248                        Return (AR04)
1249                    }
1250
1251                    Return (PR04)
1252                }
1253            }
1254
1255            Device (PCE5)
1256            {
1257                Name (_ADR, 0x00050000)
1258                Method (_PRW, 0, NotSerialized)
1259                {
1260                    Return (GPRW (0x12, 0x04))
1261                }
1262
1263                Method (_PRT, 0, NotSerialized)
1264                {
1265                    If (PICM)
1266                    {
1267                        Return (AR05)
1268                    }
1269
1270                    Return (PR05)
1271                }
1272            }
1273
1274            Device (PCE6)
1275            {
1276                Name (_ADR, 0x00060000)
1277                Method (_PRW, 0, NotSerialized)
1278                {
1279                    Return (GPRW (0x18, 0x04))
1280                }
1281
1282                Method (_PRT, 0, NotSerialized)
1283                {
1284                    If (PICM)
1285                    {
1286                        Return (AR06)
1287                    }
1288
1289                    Return (PR06)
1290                }
1291
1292                Device (NEWC)
1293                {
1294                    Name (_ADR, 0x00)
1295                    Scope (\_GPE)
1296                    {
1297                        Method (_L09, 0, NotSerialized)
1298                        {
1299                            Sleep (0x64)
1300                            Notify (\_SB.PCI0.PCE6, 0x00)
1301                            Store (\_SB.PCI0.PCE6.SLST, EXHP)
1302                        }
1303                    }
1304
1305                    Scope (\_SB.PCI0.PCE6.NEWC)
1306                    {
1307                        Method (_RMV, 0, NotSerialized)
1308                        {
1309                            Return (0x01)
1310                        }
1311                    }
1312
1313                    Scope (\_SB.PCI0.PCE6)
1314                    {
1315                        Method (_INI, 0, NotSerialized)
1316                        {
1317                            Store (\_SB.PCI0.PCE6.SLST, EXHP)
1318                        }
1319
1320                        OperationRegion (NESS, PCI_Config, 0x72, 0x01)
1321                        Field (NESS, AnyAcc, NoLock, Preserve)
1322                        {
1323                                ,   6,
1324                            SLST,   1,
1325                                    Offset (0x01)
1326                        }
1327                    }
1328                }
1329            }
1330
1331            Device (PCE7)
1332            {
1333                Name (_ADR, 0x00070000)
1334                Method (_PRW, 0, NotSerialized)
1335                {
1336                    Return (GPRW (0x12, 0x04))
1337                }
1338
1339                Method (_PRT, 0, NotSerialized)
1340                {
1341                    If (PICM)
1342                    {
1343                        Return (AR07)
1344                    }
1345
1346                    Return (PR07)
1347                }
1348            }
1349
1350            Device (SMBS)
1351            {
1352                Name (_ADR, 0x00140000)
1353                OperationRegion (SMBS, PCI_Config, 0x00, 0x0100)
1354                Field (SMBS, AnyAcc, NoLock, Preserve)
1355                {
1356                            Offset (0x08),
1357                    REV,    8
1358                }
1359            }
1360
1361            Device (IDEC)
1362            {
1363                Name (_ADR, 0x00140001)
1364                Name (UDMT, Package (0x08)
1365                {
1366                    0x78,
1367                    0x5A,
1368                    0x3C,
1369                    0x2D,
1370                    0x1E,
1371                    0x14,
1372                    0x0F,
1373                    0x00
1374                })
1375                Name (PIOT, Package (0x06)
1376                {
1377                    0x0258,
1378                    0x0186,
1379                    0x010E,
1380                    0xB4,
1381                    0x78,
1382                    0x00
1383                })
1384                Name (PITR, Package (0x06)
1385                {
1386                    0x99,
1387                    0x47,
1388                    0x34,
1389                    0x22,
1390                    0x20,
1391                    0x99
1392                })
1393                Name (MDMT, Package (0x04)
1394                {
1395                    0x01E0,
1396                    0x96,
1397                    0x78,
1398                    0x00
1399                })
1400                Name (MDTR, Package (0x04)
1401                {
1402                    0x77,
1403                    0x21,
1404                    0x20,
1405                    0xFF
1406                })
1407                OperationRegion (IDE, PCI_Config, 0x40, 0x20)
1408                Field (IDE, AnyAcc, NoLock, Preserve)
1409                {
1410                    PPIT,   16,
1411                    SPIT,   16,
1412                    PMDT,   16,
1413                    SMDT,   16,
1414                    PPIC,   8,
1415                    SPIC,   8,
1416                    PPIM,   8,
1417                    SPIM,   8,
1418                            Offset (0x14),
1419                    PUDC,   2,
1420                    SUDC,   2,
1421                            Offset (0x16),
1422                    PUDM,   8,
1423                    SUDM,   8
1424                }
1425
1426                Method (GETT, 1, NotSerialized)
1427                {
1428                    Store (And (Arg0, 0x0F), Local0)
1429                    Store (ShiftRight (Arg0, 0x04), Local1)
1430                    Return (Multiply (0x1E, Add (Add (Local0, 0x01), Add (Local1,
1431                        0x01))))
1432                }
1433
1434                Method (GTM, 1, NotSerialized)
1435                {
1436                    CreateByteField (Arg0, 0x00, PIT1)
1437                    CreateByteField (Arg0, 0x01, PIT0)
1438                    CreateByteField (Arg0, 0x02, MDT1)
1439                    CreateByteField (Arg0, 0x03, MDT0)
1440                    CreateByteField (Arg0, 0x04, PICX)
1441                    CreateByteField (Arg0, 0x05, UDCX)
1442                    CreateByteField (Arg0, 0x06, UDMX)
1443                    Name (BUF, Buffer (0x14)
1444                    {
1445                        /* 0000 */    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
1446                        /* 0008 */    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
1447                        /* 0010 */    0x00, 0x00, 0x00, 0x00
1448                    })
1449                    CreateDWordField (BUF, 0x00, PIO0)
1450                    CreateDWordField (BUF, 0x04, DMA0)
1451                    CreateDWordField (BUF, 0x08, PIO1)
1452                    CreateDWordField (BUF, 0x0C, DMA1)
1453                    CreateDWordField (BUF, 0x10, FLAG)
1454                    If (And (PICX, 0x01))
1455                    {
1456                        Return (BUF)
1457                    }
1458
1459                    Store (GETT (PIT0), PIO0)
1460                    Store (GETT (PIT1), PIO1)
1461                    If (And (UDCX, 0x01))
1462                    {
1463                        Or (FLAG, 0x01, FLAG)
1464                        Store (DerefOf (Index (^UDMT, And (UDMX, 0x0F))), DMA0)
1465                    }
1466                    Else
1467                    {
1468                        Store (GETT (MDT0), DMA0)
1469                    }
1470
1471                    If (And (UDCX, 0x02))
1472                    {
1473                        Or (FLAG, 0x04, FLAG)
1474                        Store (DerefOf (Index (^UDMT, ShiftRight (UDMX, 0x04))), DMA1)
1475                    }
1476                    Else
1477                    {
1478                        Store (GETT (MDT1), DMA1)
1479                    }
1480
1481                    Or (FLAG, 0x1A, FLAG)
1482                    Return (BUF)
1483                }
1484
1485                Method (STM, 3, NotSerialized)
1486                {
1487                    CreateDWordField (Arg0, 0x00, PIO0)
1488                    CreateDWordField (Arg0, 0x04, DMA0)
1489                    CreateDWordField (Arg0, 0x08, PIO1)
1490                    CreateDWordField (Arg0, 0x0C, DMA1)
1491                    CreateDWordField (Arg0, 0x10, FLAG)
1492                    Name (BUF, Buffer (0x07)
1493                    {
1494                        /* 0000 */    0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
1495                    })
1496                    CreateByteField (BUF, 0x00, PIT1)
1497                    CreateByteField (BUF, 0x01, PIT0)
1498                    CreateByteField (BUF, 0x02, MDT1)
1499                    CreateByteField (BUF, 0x03, MDT0)
1500                    CreateByteField (BUF, 0x04, PIMX)
1501                    CreateByteField (BUF, 0x05, UDCX)
1502                    CreateByteField (BUF, 0x06, UDMX)
1503                    Store (Match (^PIOT, MLE, PIO0, MTR, 0x00, 0x00), Local0)
1504                    Divide (Local0, 0x05, Local0)
1505                    Store (Match (^PIOT, MLE, PIO1, MTR, 0x00, 0x00), Local1)
1506                    Divide (Local1, 0x05, Local1)
1507                    Store (Or (ShiftLeft (Local1, 0x04), Local0), PIMX)
1508                    Store (DerefOf (Index (^PITR, Local0)), PIT0)
1509                    Store (DerefOf (Index (^PITR, Local1)), PIT1)
1510                    If (And (FLAG, 0x01))
1511                    {
1512                        Store (Match (^UDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0)
1513                        Divide (Local0, 0x07, Local0)
1514                        Or (UDMX, Local0, UDMX)
1515                        Or (UDCX, 0x01, UDCX)
1516                    }
1517                    Else
1518                    {
1519                        If (LNotEqual (DMA0, 0xFFFFFFFF))
1520                        {
1521                            Store (Match (^MDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0)
1522                            Store (DerefOf (Index (^MDTR, Local0)), MDT0)
1523                        }
1524                    }
1525
1526                    If (And (FLAG, 0x04))
1527                    {
1528                        Store (Match (^UDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0)
1529                        Divide (Local0, 0x07, Local0)
1530                        Or (UDMX, ShiftLeft (Local0, 0x04), UDMX)
1531                        Or (UDCX, 0x02, UDCX)
1532                    }
1533                    Else
1534                    {
1535                        If (LNotEqual (DMA1, 0xFFFFFFFF))
1536                        {
1537                            Store (Match (^MDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0)
1538                            Store (DerefOf (Index (^MDTR, Local0)), MDT1)
1539                        }
1540                    }
1541
1542                    Return (BUF)
1543                }
1544
1545                Method (GTF, 2, NotSerialized)
1546                {
1547                    CreateByteField (Arg1, 0x00, MDT1)
1548                    CreateByteField (Arg1, 0x01, MDT0)
1549                    CreateByteField (Arg1, 0x02, PIMX)
1550                    CreateByteField (Arg1, 0x03, UDCX)
1551                    CreateByteField (Arg1, 0x04, UDMX)
1552                    If (LEqual (Arg0, 0xA0))
1553                    {
1554                        Store (And (PIMX, 0x0F), Local0)
1555                        Store (MDT0, Local1)
1556                        And (UDCX, 0x01, Local2)
1557                        Store (And (UDMX, 0x0F), Local3)
1558                    }
1559                    Else
1560                    {
1561                        Store (ShiftRight (PIMX, 0x04), Local0)
1562                        Store (MDT1, Local1)
1563                        And (UDCX, 0x02, Local2)
1564                        Store (ShiftRight (UDMX, 0x04), Local3)
1565                    }
1566
1567                    Name (BUF, Buffer (0x0E)
1568                    {
1569                        /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x03,
1570                        /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF
1571                    })
1572                    CreateByteField (BUF, 0x01, PMOD)
1573                    CreateByteField (BUF, 0x08, DMOD)
1574                    CreateByteField (BUF, 0x05, CMDA)
1575                    CreateByteField (BUF, 0x0C, CMDB)
1576                    Store (Arg0, CMDA)
1577                    Store (Arg0, CMDB)
1578                    Or (Local0, 0x08, PMOD)
1579                    If (Local2)
1580                    {
1581                        Or (Local3, 0x40, DMOD)
1582                    }
1583                    Else
1584                    {
1585                        Store (Match (^MDMT, MLE, GETT (Local1), MTR, 0x00, 0x00), Local4)
1586                        If (LLess (Local4, 0x03))
1587                        {
1588                            Or (0x20, Local4, DMOD)
1589                        }
1590                    }
1591
1592                    Return (BUF)
1593                }
1594
1595                Device (PRID)
1596                {
1597                    Name (_ADR, 0x00)
1598                    Method (_GTM, 0, NotSerialized)
1599                    {
1600                        Name (BUF, Buffer (0x07)
1601                        {
1602                            /* 0000 */    0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
1603                        })
1604                        CreateWordField (BUF, 0x00, VPIT)
1605                        CreateWordField (BUF, 0x02, VMDT)
1606                        CreateByteField (BUF, 0x04, VPIC)
1607                        CreateByteField (BUF, 0x05, VUDC)
1608                        CreateByteField (BUF, 0x06, VUDM)
1609                        Store (^^PPIT, VPIT)
1610                        Store (^^PMDT, VMDT)
1611                        Store (^^PPIC, VPIC)
1612                        Store (^^PUDC, VUDC)
1613                        Store (^^PUDM, VUDM)
1614                        Return (GTM (BUF))
1615                    }
1616
1617                    Method (_STM, 3, NotSerialized)
1618                    {
1619                        Name (BUF, Buffer (0x07)
1620                        {
1621                            /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1622                        })
1623                        CreateWordField (BUF, 0x00, VPIT)
1624                        CreateWordField (BUF, 0x02, VMDT)
1625                        CreateByteField (BUF, 0x04, VPIM)
1626                        CreateByteField (BUF, 0x05, VUDC)
1627                        CreateByteField (BUF, 0x06, VUDM)
1628                        Store (STM (Arg0, Arg1, Arg2), BUF)
1629                        Store (VPIT, ^^PPIT)
1630                        Store (VMDT, ^^PMDT)
1631                        Store (VPIM, ^^PPIM)
1632                        Store (VUDC, ^^PUDC)
1633                        Store (VUDM, ^^PUDM)
1634                    }
1635
1636                    Device (P_D0)
1637                    {
1638                        Name (_ADR, 0x00)
1639                        Method (_GTF, 0, NotSerialized)
1640                        {
1641                            Name (BUF, Buffer (0x05)
1642                            {
1643                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00
1644                            })
1645                            CreateWordField (BUF, 0x00, VMDT)
1646                            CreateByteField (BUF, 0x02, VPIM)
1647                            CreateByteField (BUF, 0x03, VUDC)
1648                            CreateByteField (BUF, 0x04, VUDM)
1649                            Store (^^^PMDT, VMDT)
1650                            Store (^^^PPIM, VPIM)
1651                            Store (^^^PUDC, VUDC)
1652                            Store (^^^PUDM, VUDM)
1653                            Return (GTF (0xA0, BUF))
1654                        }
1655                    }
1656
1657                    Device (P_D1)
1658                    {
1659                        Name (_ADR, 0x01)
1660                        Method (_GTF, 0, NotSerialized)
1661                        {
1662                            Name (BUF, Buffer (0x05)
1663                            {
1664                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00
1665                            })
1666                            CreateWordField (BUF, 0x00, VMDT)
1667                            CreateByteField (BUF, 0x02, VPIM)
1668                            CreateByteField (BUF, 0x03, VUDC)
1669                            CreateByteField (BUF, 0x04, VUDM)
1670                            Store (^^^PMDT, VMDT)
1671                            Store (^^^PPIM, VPIM)
1672                            Store (^^^PUDC, VUDC)
1673                            Store (^^^PUDM, VUDM)
1674                            Return (GTF (0xB0, BUF))
1675                        }
1676                    }
1677                }
1678
1679                Device (SECD)
1680                {
1681                    Name (_ADR, 0x01)
1682                    Method (_GTM, 0, NotSerialized)
1683                    {
1684                        Name (BUF, Buffer (0x07)
1685                        {
1686                            /* 0000 */    0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
1687                        })
1688                        CreateWordField (BUF, 0x00, VPIT)
1689                        CreateWordField (BUF, 0x02, VMDT)
1690                        CreateByteField (BUF, 0x04, VPIC)
1691                        CreateByteField (BUF, 0x05, VUDC)
1692                        CreateByteField (BUF, 0x06, VUDM)
1693                        Store (^^SPIT, VPIT)
1694                        Store (^^SMDT, VMDT)
1695                        Store (^^SPIC, VPIC)
1696                        Store (^^SUDC, VUDC)
1697                        Store (^^SUDM, VUDM)
1698                        Return (GTM (BUF))
1699                    }
1700
1701                    Method (_STM, 3, NotSerialized)
1702                    {
1703                        Name (BUF, Buffer (0x07)
1704                        {
1705                            /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1706                        })
1707                        CreateWordField (BUF, 0x00, VPIT)
1708                        CreateWordField (BUF, 0x02, VMDT)
1709                        CreateByteField (BUF, 0x04, VPIM)
1710                        CreateByteField (BUF, 0x05, VUDC)
1711                        CreateByteField (BUF, 0x06, VUDM)
1712                        Store (STM (Arg0, Arg1, Arg2), BUF)
1713                        Store (VPIT, ^^SPIT)
1714                        Store (VMDT, ^^SMDT)
1715                        Store (VPIM, ^^SPIM)
1716                        Store (VUDC, ^^SUDC)
1717                        Store (VUDM, ^^SUDM)
1718                    }
1719
1720                    Device (S_D0)
1721                    {
1722                        Name (_ADR, 0x00)
1723                        Method (_GTF, 0, NotSerialized)
1724                        {
1725                            Name (BUF, Buffer (0x05)
1726                            {
1727                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00
1728                            })
1729                            CreateWordField (BUF, 0x00, VMDT)
1730                            CreateByteField (BUF, 0x02, VPIM)
1731                            CreateByteField (BUF, 0x03, VUDC)
1732                            CreateByteField (BUF, 0x04, VUDM)
1733                            Store (^^^SMDT, VMDT)
1734                            Store (^^^SPIM, VPIM)
1735                            Store (^^^SUDC, VUDC)
1736                            Store (^^^SUDM, VUDM)
1737                            Return (GTF (0xA0, BUF))
1738                        }
1739                    }
1740
1741                    Device (S_D1)
1742                    {
1743                        Name (_ADR, 0x01)
1744                        Method (_GTF, 0, NotSerialized)
1745                        {
1746                            Name (BUF, Buffer (0x05)
1747                            {
1748                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00
1749                            })
1750                            CreateWordField (BUF, 0x00, VMDT)
1751                            CreateByteField (BUF, 0x02, VPIM)
1752                            CreateByteField (BUF, 0x03, VUDC)
1753                            CreateByteField (BUF, 0x04, VUDM)
1754                            Store (^^^SMDT, VMDT)
1755                            Store (^^^SPIM, VPIM)
1756                            Store (^^^SUDC, VUDC)
1757                            Store (^^^SUDM, VUDM)
1758                            Return (GTF (0xB0, BUF))
1759                        }
1760                    }
1761                }
1762            }
1763
1764            Device (SBAZ)
1765            {
1766                Name (_ADR, 0x00140002)
1767                OperationRegion (PME, PCI_Config, 0x00, 0x0100)
1768                Field (PME, AnyAcc, NoLock, Preserve)
1769                {
1770                            Offset (0x55),
1771                    PMEE,   8
1772                }
1773
1774                OperationRegion (BAR0, SystemMemory, 0xFFF80000, 0x1000)
1775                Field (BAR0, AnyAcc, NoLock, Preserve)
1776                {
1777                            Offset (0x0C),
1778                    WKEN,   4,
1779                            Offset (0x0E),
1780                    WKST,   4
1781                }
1782
1783                Method (_PRW, 0, NotSerialized)
1784                {
1785                    Return (GPRW (0x1B, 0x04))
1786                }
1787            }
1788
1789            Device (SBRG)
1790            {
1791                Name (_ADR, 0x00140003)
1792                Device (PIC)
1793                {
1794                    Name (_HID, EisaId ("PNP0000"))
1795                    Name (_CRS, ResourceTemplate ()
1796                    {
1797                        IO (Decode16,
1798                            0x0020,             // Range Minimum
1799                            0x0020,             // Range Maximum
1800                            0x00,               // Alignment
1801                            0x02,               // Length
1802                            )
1803                        IO (Decode16,
1804                            0x00A0,             // Range Minimum
1805                            0x00A0,             // Range Maximum
1806                            0x00,               // Alignment
1807                            0x02,               // Length
1808                            )
1809                        IRQNoFlags ()
1810                            {2}
1811                    })
1812                }
1813
1814                Device (DMAD)
1815                {
1816                    Name (_HID, EisaId ("PNP0200"))
1817                    Name (_CRS, ResourceTemplate ()
1818                    {
1819                        DMA (Compatibility, BusMaster, Transfer8, )
1820                            {4}
1821                        IO (Decode16,
1822                            0x0000,             // Range Minimum
1823                            0x0000,             // Range Maximum
1824                            0x00,               // Alignment
1825                            0x10,               // Length
1826                            )
1827                        IO (Decode16,
1828                            0x0081,             // Range Minimum
1829                            0x0081,             // Range Maximum
1830                            0x00,               // Alignment
1831                            0x03,               // Length
1832                            )
1833                        IO (Decode16,
1834                            0x0087,             // Range Minimum
1835                            0x0087,             // Range Maximum
1836                            0x00,               // Alignment
1837                            0x01,               // Length
1838                            )
1839                        IO (Decode16,
1840                            0x0089,             // Range Minimum
1841                            0x0089,             // Range Maximum
1842                            0x00,               // Alignment
1843                            0x03,               // Length
1844                            )
1845                        IO (Decode16,
1846                            0x008F,             // Range Minimum
1847                            0x008F,             // Range Maximum
1848                            0x00,               // Alignment
1849                            0x01,               // Length
1850                            )
1851                        IO (Decode16,
1852                            0x00C0,             // Range Minimum
1853                            0x00C0,             // Range Maximum
1854                            0x00,               // Alignment
1855                            0x20,               // Length
1856                            )
1857                    })
1858                }
1859
1860                Device (TMR)
1861                {
1862                    Name (_HID, EisaId ("PNP0100"))
1863                    Name (_CRS, ResourceTemplate ()
1864                    {
1865                        IO (Decode16,
1866                            0x0040,             // Range Minimum
1867                            0x0040,             // Range Maximum
1868                            0x00,               // Alignment
1869                            0x04,               // Length
1870                            )
1871                        IRQNoFlags ()
1872                            {0}
1873                    })
1874                }
1875
1876                Device (RTC0)
1877                {
1878                    Name (_HID, EisaId ("PNP0B00"))
1879                    Name (_CRS, ResourceTemplate ()
1880                    {
1881                        IO (Decode16,
1882                            0x0070,             // Range Minimum
1883                            0x0070,             // Range Maximum
1884                            0x00,               // Alignment
1885                            0x02,               // Length
1886                            )
1887                        IRQNoFlags ()
1888                            {8}
1889                    })
1890                }
1891
1892                Device (SPKR)
1893                {
1894                    Name (_HID, EisaId ("PNP0800"))
1895                    Name (_CRS, ResourceTemplate ()
1896                    {
1897                        IO (Decode16,
1898                            0x0061,             // Range Minimum
1899                            0x0061,             // Range Maximum
1900                            0x00,               // Alignment
1901                            0x01,               // Length
1902                            )
1903                    })
1904                }
1905
1906                Device (COPR)
1907                {
1908                    Name (_HID, EisaId ("PNP0C04"))
1909                    Name (_CRS, ResourceTemplate ()
1910                    {
1911                        IO (Decode16,
1912                            0x00F0,             // Range Minimum
1913                            0x00F0,             // Range Maximum
1914                            0x00,               // Alignment
1915                            0x10,               // Length
1916                            )
1917                        IRQNoFlags ()
1918                            {13}
1919                    })
1920                }
1921
1922                Device (RMSC)
1923                {
1924                    Name (_HID, EisaId ("PNP0C02"))
1925                    Name (_UID, 0x10)
1926                    Name (CRS, ResourceTemplate ()
1927                    {
1928                        IO (Decode16,
1929                            0x0010,             // Range Minimum
1930                            0x0010,             // Range Maximum
1931                            0x00,               // Alignment
1932                            0x10,               // Length
1933                            )
1934                        IO (Decode16,
1935                            0x0022,             // Range Minimum
1936                            0x0022,             // Range Maximum
1937                            0x00,               // Alignment
1938                            0x1E,               // Length
1939                            )
1940                        IO (Decode16,
1941                            0x0044,             // Range Minimum
1942                            0x0044,             // Range Maximum
1943                            0x00,               // Alignment
1944                            0x1C,               // Length
1945                            )
1946                        IO (Decode16,
1947                            0x0063,             // Range Minimum
1948                            0x0063,             // Range Maximum
1949                            0x00,               // Alignment
1950                            0x01,               // Length
1951                            )
1952                        IO (Decode16,
1953                            0x0065,             // Range Minimum
1954                            0x0065,             // Range Maximum
1955                            0x00,               // Alignment
1956                            0x01,               // Length
1957                            )
1958                        IO (Decode16,
1959                            0x0067,             // Range Minimum
1960                            0x0067,             // Range Maximum
1961                            0x00,               // Alignment
1962                            0x09,               // Length
1963                            )
1964                        IO (Decode16,
1965                            0x0072,             // Range Minimum
1966                            0x0072,             // Range Maximum
1967                            0x00,               // Alignment
1968                            0x0E,               // Length
1969                            )
1970                        IO (Decode16,
1971                            0x0080,             // Range Minimum
1972                            0x0080,             // Range Maximum
1973                            0x00,               // Alignment
1974                            0x01,               // Length
1975                            )
1976                        IO (Decode16,
1977                            0x0084,             // Range Minimum
1978                            0x0084,             // Range Maximum
1979                            0x00,               // Alignment
1980                            0x03,               // Length
1981                            )
1982                        IO (Decode16,
1983                            0x0088,             // Range Minimum
1984                            0x0088,             // Range Maximum
1985                            0x00,               // Alignment
1986                            0x01,               // Length
1987                            )
1988                        IO (Decode16,
1989                            0x008C,             // Range Minimum
1990                            0x008C,             // Range Maximum
1991                            0x00,               // Alignment
1992                            0x03,               // Length
1993                            )
1994                        IO (Decode16,
1995                            0x0090,             // Range Minimum
1996                            0x0090,             // Range Maximum
1997                            0x00,               // Alignment
1998                            0x10,               // Length
1999                            )
2000                        IO (Decode16,
2001                            0x00A2,             // Range Minimum
2002                            0x00A2,             // Range Maximum
2003                            0x00,               // Alignment
2004                            0x1E,               // Length
2005                            )
2006                        IO (Decode16,
2007                            0x00B1,             // Range Minimum
2008                            0x00B1,             // Range Maximum
2009                            0x00,               // Alignment
2010                            0x01,               // Length
2011                            )
2012                        IO (Decode16,
2013                            0x00E0,             // Range Minimum
2014                            0x00E0,             // Range Maximum
2015                            0x00,               // Alignment
2016                            0x10,               // Length
2017                            )
2018                        IO (Decode16,
2019                            0x04D0,             // Range Minimum
2020                            0x04D0,             // Range Maximum
2021                            0x00,               // Alignment
2022                            0x02,               // Length
2023                            )
2024                        IO (Decode16,
2025                            0x040B,             // Range Minimum
2026                            0x040B,             // Range Maximum
2027                            0x00,               // Alignment
2028                            0x01,               // Length
2029                            )
2030                        IO (Decode16,
2031                            0x04D6,             // Range Minimum
2032                            0x04D6,             // Range Maximum
2033                            0x00,               // Alignment
2034                            0x01,               // Length
2035                            )
2036                        IO (Decode16,
2037                            0x0C00,             // Range Minimum
2038                            0x0C00,             // Range Maximum
2039                            0x00,               // Alignment
2040                            0x02,               // Length
2041                            )
2042                        IO (Decode16,
2043                            0x0C14,             // Range Minimum
2044                            0x0C14,             // Range Maximum
2045                            0x00,               // Alignment
2046                            0x01,               // Length
2047                            )
2048                        IO (Decode16,
2049                            0x0C50,             // Range Minimum
2050                            0x0C50,             // Range Maximum
2051                            0x00,               // Alignment
2052                            0x02,               // Length
2053                            )
2054                        IO (Decode16,
2055                            0x0C52,             // Range Minimum
2056                            0x0C52,             // Range Maximum
2057                            0x00,               // Alignment
2058                            0x01,               // Length
2059                            )
2060                        IO (Decode16,
2061                            0x0C6C,             // Range Minimum
2062                            0x0C6C,             // Range Maximum
2063                            0x00,               // Alignment
2064                            0x01,               // Length
2065                            )
2066                        IO (Decode16,
2067                            0x0C6F,             // Range Minimum
2068                            0x0C6F,             // Range Maximum
2069                            0x00,               // Alignment
2070                            0x01,               // Length
2071                            )
2072                        IO (Decode16,
2073                            0x0CD4,             // Range Minimum
2074                            0x0CD4,             // Range Maximum
2075                            0x00,               // Alignment
2076                            0x02,               // Length
2077                            )
2078                        IO (Decode16,
2079                            0x0CD6,             // Range Minimum
2080                            0x0CD6,             // Range Maximum
2081                            0x00,               // Alignment
2082                            0x02,               // Length
2083                            )
2084                        IO (Decode16,
2085                            0x0CD8,             // Range Minimum
2086                            0x0CD8,             // Range Maximum
2087                            0x00,               // Alignment
2088                            0x08,               // Length
2089                            )
2090                        IO (Decode16,
2091                            0x0000,             // Range Minimum
2092                            0x0000,             // Range Maximum
2093                            0x00,               // Alignment
2094                            0x00,               // Length
2095                            _Y00)
2096                        IO (Decode16,
2097                            0x0000,             // Range Minimum
2098                            0x0000,             // Range Maximum
2099                            0x00,               // Alignment
2100                            0x00,               // Length
2101                            _Y01)
2102                        IO (Decode16,
2103                            0x0900,             // Range Minimum
2104                            0x0900,             // Range Maximum
2105                            0x00,               // Alignment
2106                            0x10,               // Length
2107                            )
2108                        IO (Decode16,
2109                            0x0910,             // Range Minimum
2110                            0x0910,             // Range Maximum
2111                            0x00,               // Alignment
2112                            0x10,               // Length
2113                            )
2114                        IO (Decode16,
2115                            0x8200,             // Range Minimum
2116                            0x8200,             // Range Maximum
2117                            0x00,               // Alignment
2118                            0x20,               // Length
2119                            )
2120                        IO (Decode16,
2121                            0xFE00,             // Range Minimum
2122                            0xFE00,             // Range Maximum
2123                            0x00,               // Alignment
2124                            0xFF,               // Length
2125                            )
2126                        Memory32Fixed (ReadWrite,
2127                            0x00000000,         // Address Base
2128                            0x00000000,         // Address Length
2129                            _Y02)
2130                    })
2131                    Method (_CRS, 0, NotSerialized)
2132                    {
2133                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._MIN, GP00)
2134                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._MAX, GP01)
2135                        CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._LEN, GP0L)
2136                        Store (PMBS, GP00)
2137                        Store (PMBS, GP01)
2138                        Store (PMLN, GP0L)
2139                        If (GPBS)
2140                        {
2141                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._MIN, GP20)
2142                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._MAX, GP21)
2143                            CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._LEN, GP2L)
2144                            Store (GPBS, GP20)
2145                            Store (GPBS, GP21)
2146                            Store (GPLN, GP2L)
2147                        }
2148
2149                        CreateDWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y02._BAS, ROMB)
2150                        CreateDWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y02._LEN, ROML)
2151                        Store (ROMS, ROMB)
2152                        Subtract (0x00, ROMS, ROML)
2153                        Return (CRS)
2154                    }
2155                }
2156
2157                Scope (\_SB)
2158                {
2159                    Scope (PCI0)
2160                    {
2161                        Method (_INI, 0, NotSerialized)
2162                        {
2163                            OSBW (0x04)
2164                        }
2165
2166                        Method (OSBW, 1, NotSerialized)
2167                        {
2168                            OperationRegion (SSMI, SystemIO, SMIP, 0x01)
2169                            Field (SSMI, ByteAcc, NoLock, Preserve)
2170                            {
2171                                SMIC,   8
2172                            }
2173
2174                            If (LEqual (Arg0, 0x04))
2175                            {
2176                                If (LEqual (OSFL (), 0x00))
2177                                {
2178                                    Store (0x59, SMIC)
2179                                }
2180                                Else
2181                                {
2182                                    If (LEqual (OSFL (), 0x04))
2183                                    {
2184                                        Store (0x5A, SMIC)
2185                                    }
2186                                }
2187                            }
2188                        }
2189                    }
2190                }
2191
2192                Device (\_SB.PCI0.PCIE)
2193                {
2194                    Name (_HID, EisaId ("PNP0C02"))
2195                    Name (_UID, 0x11)
2196                    Name (CRS, ResourceTemplate ()
2197                    {
2198                        Memory32Fixed (ReadOnly,
2199                            0xE0000000,         // Address Base
2200                            0x10000000,         // Address Length
2201                            _Y03)
2202                    })
2203                    Method (_CRS, 0, NotSerialized)
2204                    {
2205                        CreateDWordField (CRS, \_SB.PCI0.PCIE._Y03._BAS, BAS1)
2206                        CreateDWordField (CRS, \_SB.PCI0.PCIE._Y03._LEN, LEN1)
2207                        Store (\PCIB, BAS1)
2208                        Store (\PCIL, LEN1)
2209                        Return (CRS)
2210                    }
2211                }
2212
2213                Device (OMSC)
2214                {
2215                    Name (_HID, EisaId ("PNP0C02"))
2216                    Name (_UID, 0x00)
2217                    Name (CRS, ResourceTemplate ()
2218                    {
2219                        Memory32Fixed (ReadOnly,
2220                            0x00000000,         // Address Base
2221                            0x00000000,         // Address Length
2222                            _Y04)
2223                        Memory32Fixed (ReadOnly,
2224                            0x00000000,         // Address Base
2225                            0x00000000,         // Address Length
2226                            _Y05)
2227                    })
2228                    Method (_CRS, 0, NotSerialized)
2229                    {
2230                        If (APIC)
2231                        {
2232                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y04._LEN, ML01)
2233                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y04._BAS, MB01)
2234                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y05._LEN, ML02)
2235                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y05._BAS, MB02)
2236                            Store (0xFEC00000, MB01)
2237                            Store (0x1000, ML01)
2238                            Store (0xFEE00000, MB02)
2239                            Store (0x1000, ML02)
2240                        }
2241
2242                        Return (CRS)
2243                    }
2244                }
2245
2246                Device (\_SB.RMEM)
2247                {
2248                    Name (_HID, EisaId ("PNP0C01"))
2249                    Name (_UID, 0x01)
2250                    Name (CRS, ResourceTemplate ()
2251                    {
2252                        Memory32Fixed (ReadWrite,
2253                            0x00000000,         // Address Base
2254                            0x000A0000,         // Address Length
2255                            )
2256                        Memory32Fixed (ReadOnly,
2257                            0x00000000,         // Address Base
2258                            0x00000000,         // Address Length
2259                            _Y06)
2260                        Memory32Fixed (ReadOnly,
2261                            0x000E0000,         // Address Base
2262                            0x00020000,         // Address Length
2263                            _Y07)
2264                        Memory32Fixed (ReadWrite,
2265                            0x00100000,         // Address Base
2266                            0x00000000,         // Address Length
2267                            _Y08)
2268                        Memory32Fixed (ReadOnly,
2269                            0x00000000,         // Address Base
2270                            0x00000000,         // Address Length
2271                            _Y09)
2272                    })
2273                    Method (_CRS, 0, NotSerialized)
2274                    {
2275                        CreateDWordField (CRS, \_SB.RMEM._Y06._BAS, BAS1)
2276                        CreateDWordField (CRS, \_SB.RMEM._Y06._LEN, LEN1)
2277                        CreateDWordField (CRS, \_SB.RMEM._Y07._BAS, BAS2)
2278                        CreateDWordField (CRS, \_SB.RMEM._Y07._LEN, LEN2)
2279                        CreateDWordField (CRS, \_SB.RMEM._Y08._LEN, LEN3)
2280                        CreateDWordField (CRS, \_SB.RMEM._Y09._BAS, BAS4)
2281                        CreateDWordField (CRS, \_SB.RMEM._Y09._LEN, LEN4)
2282                        If (OSFL ()) {}
2283                        Else
2284                        {
2285                            If (MG1B)
2286                            {
2287                                If (LGreater (MG1B, 0x000C0000))
2288                                {
2289                                    Store (0x000C0000, BAS1)
2290                                    Subtract (MG1B, BAS1, LEN1)
2291                                }
2292                            }
2293                            Else
2294                            {
2295                                Store (0x000C0000, BAS1)
2296                                Store (0x00020000, LEN1)
2297                            }
2298
2299                            If (Add (MG1B, MG1L, Local0))
2300                            {
2301                                Store (Local0, BAS2)
2302                                Subtract (0x00100000, BAS2, LEN2)
2303                            }
2304                        }
2305
2306                        Subtract (MG2B, 0x00100000, LEN3)
2307                        Add (MG2B, MG2L, BAS4)
2308                        Subtract (0x00, BAS4, LEN4)
2309                        Return (CRS)
2310                    }
2311                }
2312
2313                Device (PS2K)
2314                {
2315                    Name (_HID, EisaId ("PNP0303"))
2316                    Name (_CID, 0x0B03D041)
2317                    Method (_STA, 0, NotSerialized)
2318                    {
2319                        ShiftLeft (0x01, 0x0A, Local0)
2320                        If (And (IOST, Local0))
2321                        {
2322                            Return (0x0F)
2323                        }
2324
2325                        Return (0x00)
2326                    }
2327
2328                    Name (_CRS, ResourceTemplate ()
2329                    {
2330                        IO (Decode16,
2331                            0x0060,             // Range Minimum
2332                            0x0060,             // Range Maximum
2333                            0x00,               // Alignment
2334                            0x01,               // Length
2335                            )
2336                        IO (Decode16,
2337                            0x0064,             // Range Minimum
2338                            0x0064,             // Range Maximum
2339                            0x00,               // Alignment
2340                            0x01,               // Length
2341                            )
2342                        IRQNoFlags ()
2343                            {1}
2344                    })
2345                }
2346
2347                Device (PS2M)
2348                {
2349                    Name (_HID, EisaId ("PNP0F03"))
2350                    Name (_CID, 0x130FD041)
2351                    Method (_STA, 0, NotSerialized)
2352                    {
2353                        ShiftLeft (0x01, 0x0C, Local0)
2354                        If (And (IOST, Local0))
2355                        {
2356                            Return (0x0F)
2357                        }
2358
2359                        Return (0x00)
2360                    }
2361
2362                    Name (CRS1, ResourceTemplate ()
2363                    {
2364                        IRQNoFlags ()
2365                            {12}
2366                    })
2367                    Name (CRS2, ResourceTemplate ()
2368                    {
2369                        IO (Decode16,
2370                            0x0060,             // Range Minimum
2371                            0x0060,             // Range Maximum
2372                            0x00,               // Alignment
2373                            0x01,               // Length
2374                            )
2375                        IO (Decode16,
2376                            0x0064,             // Range Minimum
2377                            0x0064,             // Range Maximum
2378                            0x00,               // Alignment
2379                            0x01,               // Length
2380                            )
2381                        IRQNoFlags ()
2382                            {12}
2383                    })
2384                    Method (_CRS, 0, NotSerialized)
2385                    {
2386                        ShiftLeft (0x01, 0x0A, Local0)
2387                        If (And (IOST, Local0))
2388                        {
2389                            Return (CRS1)
2390                        }
2391                        Else
2392                        {
2393                            Return (CRS2)
2394                        }
2395                    }
2396                }
2397
2398                Device (EC)
2399                {
2400                    Name (_HID, EisaId ("PNP0C09"))
2401                    Name (_GPE, 0x06)
2402                    Name (CTID, 0x00)
2403                    Name (MYEC, 0x00)
2404                    Name (CTSD, 0x00)
2405                    Name (HTDM, 0x00)
2406                    Method (_REG, 2, NotSerialized)
2407                    {
2408                        If (LEqual (Arg0, 0x03))
2409                        {
2410                            Store (Arg1, MYEC)
2411                        }
2412
2413                        Store (0x00, HTDM)
2414                    }
2415
2416                    Name (_CRS, ResourceTemplate ()
2417                    {
2418                        IO (Decode16,
2419                            0x0062,             // Range Minimum
2420                            0x0062,             // Range Maximum
2421                            0x00,               // Alignment
2422                            0x01,               // Length
2423                            )
2424                        IO (Decode16,
2425                            0x0066,             // Range Minimum
2426                            0x0066,             // Range Maximum
2427                            0x00,               // Alignment
2428                            0x01,               // Length
2429                            )
2430                    })
2431                    OperationRegion (EC, EmbeddedControl, 0x00, 0xFF)
2432                    Field (EC, ByteAcc, NoLock, Preserve)
2433                    {
2434                        SMPR,   8,
2435                        SMST,   8,
2436                        SMAD,   8,
2437                        SMCM,   8,
2438                        SMD0,   264,
2439                        SMAA,   8,
2440                                Offset (0x30),
2441                        POWS,   1,
2442                        LIDS,   1,
2443                        KBCS,   1,
2444                                Offset (0x31),
2445                        MBTS,   1,
2446                        MBCS,   1,
2447                        MBDS,   1,
2448                        MBFS,   1,
2449                        MBWS,   1,
2450                        MBLS,   1,
2451                        MBCL,   1,
2452                        MBFL,   1,
2453                                Offset (0x38),
2454                        MDCL,   8,
2455                        MDCH,   8,
2456                        MDVL,   8,
2457                        MDVH,   8,
2458                        MCAL,   8,
2459                        MCAH,   8,
2460                        MSTL,   8,
2461                        MSTH,   8,
2462                        MCCL,   8,
2463                        MCCH,   8,
2464                        MPOL,   8,
2465                        MPOH,   8,
2466                        MFCL,   8,
2467                        MFCH,   8,
2468                        MCUL,   8,
2469                        MCUH,   8,
2470                        MRCL,   8,
2471                        MRCH,   8,
2472                        MVOL,   8,
2473                        MVOH,   8,
2474                        MTEL,   8,
2475                        MTEH,   8,
2476                        RSV1,   8,
2477                        RSV2,   8,
2478                        SDCL,   8,
2479                        SDCH,   8,
2480                        SDVL,   8,
2481                        SDVH,   8,
2482                        SCAL,   8,
2483                        SCAH,   8,
2484                        SSTL,   8,
2485                        SSTH,   8,
2486                        SCCL,   8,
2487                        SCCH,   8,
2488                        SPOL,   8,
2489                        SPOH,   8,
2490                        SFCL,   8,
2491                        SFCH,   8,
2492                        SCUL,   8,
2493                        SCUH,   8,
2494                        SRCL,   8,
2495                        SRCH,   8,
2496                        SVOL,   8,
2497                        SVOH,   8,
2498                        STEL,   8,
2499                        STEH,   8,
2500                                Offset (0x68),
2501                        CPUT,   8,
2502                                Offset (0x7E),
2503                            ,   3,
2504                        THFG,   1,
2505                                Offset (0x7F),
2506                                Offset (0x80),
2507                        SYST,   8
2508                    }
2509
2510                    OperationRegion (APMP, SystemIO, 0xB0, 0x02)
2511                    Field (APMP, ByteAcc, NoLock, Preserve)
2512                    {
2513                        APMC,   8,
2514                        APMS,   8
2515                    }
2516
2517                    Device (ADP1)
2518                    {
2519                        Name (_HID, "ACPI0003")
2520                        Name (BFLG, 0x01)
2521                        Name (ACP, 0x01)
2522                        Name (INIT, 0x01)
2523                        Method (_PSR, 0, NotSerialized)
2524                        {
2525                            If (\_SB.PCI0.SBRG.EC.ADP1.ACP)
2526                            {
2527                                Return (One)
2528                            }
2529                            Else
2530                            {
2531                                Return (Zero)
2532                            }
2533                        }
2534
2535                        Method (_STA, 0, NotSerialized)
2536                        {
2537                            If (\_SB.PCI0.SBRG.EC.MYEC)
2538                            {
2539                                If (\_SB.PCI0.SBRG.EC.ADP1.INIT)
2540                                {
2541                                    Store (MBTS, Local0)
2542                                    If (LEqual (Local0, 0x01))
2543                                    {
2544                                        Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
2545                                    }
2546                                    Else
2547                                    {
2548                                        Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
2549                                    }
2550
2551                                    Store (POWS, Local0)
2552                                    If (LEqual (Local0, 0x01))
2553                                    {
2554                                        Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.ACP)
2555                                    }
2556                                    Else
2557                                    {
2558                                        Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.ACP)
2559                                    }
2560                                }
2561
2562                                Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.INIT)
2563                            }
2564
2565                            Return (0x0F)
2566                        }
2567
2568                        Name (_PCL, Package (0x01)
2569                        {
2570                            \_SB
2571                        })
2572                    }
2573
2574                    Name (BIF0, Package (0x0D)
2575                    {
2576                        0x01,
2577                        0x1130,
2578                        0x1130,
2579                        0x01,
2580                        0x39D0,
2581                        0x00,
2582                        0x00,
2583                        0x01,
2584                        0x01,
2585                        "MS-1029",
2586                        "1",
2587                        "LION",
2588                        "MSI Corp."
2589                    })
2590                    Name (STAT, Package (0x04)
2591                    {
2592                        0x02,
2593                        0x0500,
2594                        0x0800,
2595                        0x03E8
2596                    })
2597                    Device (BAT1)
2598                    {
2599                        Name (_HID, EisaId ("PNP0C0A"))
2600                        Name (_UID, 0x01)
2601                        Name (_PCL, Package (0x01)
2602                        {
2603                            \_SB
2604                        })
2605                        Method (_STA, 0, NotSerialized)
2606                        {
2607                            If (\_SB.PCI0.SBRG.EC.ADP1.BFLG)
2608                            {
2609                                Return (0x1F)
2610                            }
2611                            Else
2612                            {
2613                                Return (0x0F)
2614                            }
2615                        }
2616
2617                        Method (_BIF, 0, NotSerialized)
2618                        {
2619                            If (\_SB.PCI0.SBRG.EC.MYEC)
2620                            {
2621                                UPBI ()
2622                            }
2623                            Else
2624                            {
2625                                IVBI ()
2626                            }
2627
2628                            Return (BIF0)
2629                        }
2630
2631                        Method (_BST, 0, NotSerialized)
2632                        {
2633                            If (\_SB.PCI0.SBRG.EC.MYEC)
2634                            {
2635                                UPBS ()
2636                            }
2637                            Else
2638                            {
2639                                IVBS ()
2640                            }
2641
2642                            Return (STAT)
2643                        }
2644
2645                        Method (IVBI, 0, NotSerialized)
2646                        {
2647                            Store (0xFFFFFFFF, Index (BIF0, 0x01))
2648                            Store (0xFFFFFFFF, Index (BIF0, 0x02))
2649                            Store (0xFFFFFFFF, Index (BIF0, 0x04))
2650                            Store ("Wrong", Index (BIF0, 0x09))
2651                            Store (" ", Index (BIF0, 0x0A))
2652                            Store ("Wrong", Index (BIF0, 0x0B))
2653                            Store ("Wrong", Index (BIF0, 0x0C))
2654                        }
2655
2656                        Method (IVBS, 0, NotSerialized)
2657                        {
2658                            Store (0x00, Index (STAT, 0x00))
2659                            Store (0xFFFFFFFF, Index (STAT, 0x01))
2660                            Store (0xFFFFFFFF, Index (STAT, 0x02))
2661                            Store (0x2710, Index (STAT, 0x03))
2662                        }
2663
2664                        Method (UPBI, 0, NotSerialized)
2665                        {
2666                            Store (0x00, Local0)
2667                            Store (0x00, Local1)
2668                            Store (0x00, Local2)
2669                            Store (0x00, Local3)
2670                            Store (MDCH, Local0)
2671                            Store (MDCL, Local1)
2672                            ShiftLeft (Local0, 0x08, Local0)
2673                            Or (Local0, Local1, Local0)
2674                            Store (Local0, Index (BIF0, 0x01))
2675                            Store (MFCH, Local0)
2676                            Store (MFCL, Local1)
2677                            ShiftLeft (Local0, 0x08, Local0)
2678                            Or (Local0, Local1, Local1)
2679                            Store (Local1, Index (BIF0, 0x02))
2680                            Store (MDVH, Local0)
2681                            Store (MDVL, Local2)
2682                            ShiftLeft (Local0, 0x08, Local0)
2683                            Or (Local0, Local2, Local2)
2684                            Store (Local2, Index (BIF0, 0x04))
2685                            Store ("1\n", Index (BIF0, 0x0A))
2686                            Store ("LION\n", Index (BIF0, 0x0B))
2687                            Store (CTID, Local0)
2688                            If (LEqual (Local0, 0x00))
2689                            {
2690                                Store ("MS-1024\n", Index (BIF0, 0x09))
2691                                Store ("MSI Corp.\n", Index (BIF0, 0x0C))
2692                            }
2693                            Else
2694                            {
2695                                Store ("?MODEL\n", Index (BIF0, 0x09))
2696                                Store ("?CUSTOMER\n", Index (BIF0, 0x0C))
2697                            }
2698                        }
2699
2700                        Method (UPBS, 0, NotSerialized)
2701                        {
2702                            Store (0x00, Local0)
2703                            Store (0x00, Local1)
2704                            Store (0x00, Local2)
2705                            Store (0x00, Local3)
2706                            Store (0x00, Local4)
2707                            Store (0x00, Local7)
2708                            Store (MBTS, Local0)
2709                            If (LEqual (Local0, 0x01))
2710                            {
2711                                Store (POWS, Local0)
2712                                If (LEqual (Local0, 0x01))
2713                                {
2714                                    Store (MBCS, Local1)
2715                                    If (LEqual (Local1, 0x01))
2716                                    {
2717                                        Or (Local4, 0x02, Local4)
2718                                    }
2719                                }
2720                                Else
2721                                {
2722                                    Or (Local4, 0x01, Local4)
2723                                    Store (MBCL, Local0)
2724                                    If (LEqual (Local0, 0x01))
2725                                    {
2726                                        Or (Local4, 0x04, Local4)
2727                                    }
2728                                }
2729
2730                                Store (POWS, Local0)
2731                                If (LEqual (Local0, 0x01))
2732                                {
2733                                    Store (MBCS, Local0)
2734                                    If (LEqual (Local0, 0x01))
2735                                    {
2736                                        Store (MCUH, Local0)
2737                                        Store (MCUL, Local1)
2738                                        ShiftLeft (Local0, 0x08, Local0)
2739                                        Or (Local0, Local1, Local1)
2740                                        If (LEqual (Local1, 0xFFFF))
2741                                        {
2742                                            Store (0xFFFFFFFF, Local1)
2743                                        }
2744
2745                                        Store (Local1, Index (STAT, 0x01))
2746                                    }
2747                                    Else
2748                                    {
2749                                        Store (0x00, Index (STAT, 0x01))
2750                                    }
2751                                }
2752                                Else
2753                                {
2754                                    Store (MCUH, Local0)
2755                                    Store (MCUL, Local1)
2756                                    ShiftLeft (Local0, 0x08, Local0)
2757                                    Or (Local0, Local1, Local1)
2758                                    XOr (Local1, 0xFFFF, Local1)
2759                                    If (LEqual (Local1, 0x00))
2760                                    {
2761                                        Store (0xFFFFFFFF, Local1)
2762                                    }
2763
2764                                    Store (Local1, Index (STAT, 0x01))
2765                                }
2766
2767                                Store (MRCH, Local0)
2768                                Store (MRCL, Local2)
2769                                ShiftLeft (Local0, 0x08, Local0)
2770                                Or (Local0, Local2, Local2)
2771                                Store (Local2, Index (STAT, 0x02))
2772                                Store (MVOH, Local0)
2773                                Store (MVOL, Local3)
2774                                ShiftLeft (Local0, 0x08, Local0)
2775                                Or (Local0, Local3, Local3)
2776                                Store (Local3, Index (STAT, 0x03))
2777                                Store (Local4, Index (STAT, 0x00))
2778                                Store (MDCH, Local0)
2779                                Store (MDCL, Local2)
2780                                ShiftLeft (Local0, 0x08, Local0)
2781                                Or (Local0, Local2, Local2)
2782                                If (LLessEqual (Local2, 0x0960))
2783                                {
2784                                    Store (0x01, DWSP)
2785                                    Notify (\_PR.CPU1, 0x80)
2786                                    Notify (\_PR.CPU2, 0x80)
2787                                    Store (0x01, BATT)
2788                                }
2789                            }
2790                            Else
2791                            {
2792                                IVBS ()
2793                            }
2794                        }
2795                    }
2796
2797                    Name (DWSP, 0x00)
2798                    Name (THOR, 0x00)
2799                    Name (BATT, 0x00)
2800                    Method (_Q80, 0, NotSerialized)
2801                    {
2802                        Store (0x80, DBG8)
2803                    }
2804
2805                    Method (_Q81, 0, NotSerialized)
2806                    {
2807                        Store (0x81, DBG8)
2808                        Store (0x01, DWSP)
2809                        Notify (\_PR.CPU1, 0x80)
2810                        Notify (\_PR.CPU2, 0x80)
2811                        Store (0x01, THOR)
2812                    }
2813
2814                    Method (_Q82, 0, NotSerialized)
2815                    {
2816                        Store (0x82, DBG8)
2817                        If (LEqual (BATT, 0x00))
2818                        {
2819                            Store (0x00, DWSP)
2820                            Notify (\_PR.CPU1, 0x80)
2821                            Notify (\_PR.CPU2, 0x80)
2822                        }
2823
2824                        Store (0x00, THOR)
2825                    }
2826
2827                    Method (_Q83, 0, NotSerialized)
2828                    {
2829                        Store (0x83, DBG8)
2830                        Store (0x00, Local0)
2831                        Store (POWS, Local0)
2832                        If (LEqual (Local0, 0x01))
2833                        {
2834                            Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.ACP)
2835                        }
2836                        Else
2837                        {
2838                            Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.ACP)
2839                        }
2840
2841                        Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
2842                    }
2843
2844                    Method (_Q84, 0, NotSerialized)
2845                    {
2846                        Store (0x84, DBG8)
2847                        Notify (\_SB.LID0, 0x80)
2848                    }
2849
2850                    Method (_Q85, 0, NotSerialized)
2851                    {
2852                        Store (0x85, DBG8)
2853                        Store (0x69, THPP)
2854                        Notify (\_TZ.THRM, 0x80)
2855                    }
2856
2857                    Method (_Q86, 0, NotSerialized)
2858                    {
2859                        Store (0x86, DBG8)
2860                    }
2861
2862                    Method (_Q87, 0, NotSerialized)
2863                    {
2864                        Store (0x87, DBG8)
2865                        Store (0x00, Local0)
2866                        Store (MBTS, Local0)
2867                        If (LEqual (Local0, 0x01))
2868                        {
2869                            Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
2870                            Notify (\_SB.PCI0.SBRG.EC.BAT1, 0x00)
2871                        }
2872                        Else
2873                        {
2874                            Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
2875                            Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
2876                            Notify (\_SB.PCI0.SBRG.EC.BAT1, 0x01)
2877                            If (LEqual (THOR, 0x00))
2878                            {
2879                                Store (0x00, DWSP)
2880                                Notify (\_PR.CPU1, 0x80)
2881                                Notify (\_PR.CPU2, 0x80)
2882                            }
2883
2884                            Store (0x00, BATT)
2885                        }
2886
2887                        Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
2888                    }
2889
2890                    Method (_Q88, 0, NotSerialized)
2891                    {
2892                        Store (0x88, DBG8)
2893                    }
2894
2895                    Method (_Q89, 0, NotSerialized)
2896                    {
2897                        Store (0x89, DBG8)
2898                    }
2899
2900                    Method (_Q8A, 0, NotSerialized)
2901                    {
2902                        Store (0x8A, DBG8)
2903                        Store (0x69, THPP)
2904                        Notify (\_TZ.THRM, 0x80)
2905                    }
2906
2907                    Method (_Q8B, 0, NotSerialized)
2908                    {
2909                        Store (0x8B, DBG8)
2910                    }
2911
2912                    Method (_Q8C, 0, NotSerialized)
2913                    {
2914                        Store (0x8C, DBG8)
2915                    }
2916
2917                    Method (_Q90, 0, NotSerialized)
2918                    {
2919                        Store (0x90, DBG8)
2920                    }
2921
2922                    Method (_QB4, 0, NotSerialized)
2923                    {
2924                        Store (0xB4, DBG8)
2925                        If (LEqual (\_SB.PCI0.AGP.VGA.SWIT, 0x00))
2926                        {
2927                            If (LEqual (\_SB.PCI0.AGP.VGA.GDFG, 0x01))
2928                            {
2929                                Notify (\_SB.PCI0.AGP.VGA, 0x80)
2930                                Store (0x00, \_SB.PCI0.AGP.VGA.GDFG)
2931                                Sleep (0x07D0)
2932                            }
2933
2934                            If (LEqual (\_SB.PCI0.AGP.VGA.GDTS, 0x00))
2935                            {
2936                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x01))
2937                                {
2938                                    Store (0x00, \_SB.PCI0.AGP.VGA.LCD._DGS)
2939                                    Store (0x01, \_SB.PCI0.AGP.VGA.CRT._DGS)
2940                                    Store (0x00, \_SB.PCI0.AGP.VGA.TV._DGS)
2941                                }
2942
2943                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x02))
2944                                {
2945                                    Store (0x00, \_SB.PCI0.AGP.VGA.LCD._DGS)
2946                                    Store (0x00, \_SB.PCI0.AGP.VGA.CRT._DGS)
2947                                    Store (0x01, \_SB.PCI0.AGP.VGA.TV._DGS)
2948                                }
2949
2950                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x03))
2951                                {
2952                                    Store (0x01, \_SB.PCI0.AGP.VGA.LCD._DGS)
2953                                    Store (0x00, \_SB.PCI0.AGP.VGA.CRT._DGS)
2954                                    Store (0x01, \_SB.PCI0.AGP.VGA.TV._DGS)
2955                                }
2956
2957                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x04))
2958                                {
2959                                    Store (0x01, \_SB.PCI0.AGP.VGA.LCD._DGS)
2960                                    Store (0x01, \_SB.PCI0.AGP.VGA.CRT._DGS)
2961                                    Store (0x00, \_SB.PCI0.AGP.VGA.TV._DGS)
2962                                }
2963
2964                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x05))
2965                                {
2966                                    Store (0x01, \_SB.PCI0.AGP.VGA.LCD._DGS)
2967                                    Store (0x00, \_SB.PCI0.AGP.VGA.CRT._DGS)
2968                                    Store (0x00, \_SB.PCI0.AGP.VGA.TV._DGS)
2969                                }
2970
2971                                Notify (\_SB.PCI0.AGP.VGA, 0x80)
2972                                If (LEqual (\_SB.PCI0.AGP.VGA.GDGS, 0x05))
2973                                {
2974                                    Store (0x01, \_SB.PCI0.AGP.VGA.GDGS)
2975                                }
2976                                Else
2977                                {
2978                                    Add (0x01, \_SB.PCI0.AGP.VGA.GDGS, \_SB.PCI0.AGP.VGA.GDGS)
2979                                }
2980                            }
2981                        }
2982                    }
2983
2984                    Method (_QB5, 0, NotSerialized)
2985                    {
2986                        Store (0xB5, DBG8)
2987                    }
2988
2989                    Method (_QB6, 0, NotSerialized)
2990                    {
2991                        Store (0xB6, DBG8)
2992                    }
2993
2994                    Method (_QB7, 0, NotSerialized)
2995                    {
2996                        Store (0xB7, DBG8)
2997                    }
2998
2999                    Method (_QB8, 0, NotSerialized)
3000                    {
3001                        Store (0xB8, DBG8)
3002                    }
3003
3004                    Method (_QB9, 0, NotSerialized)
3005                    {
3006                        Store (0xB9, DBG8)
3007                    }
3008
3009                    Scope (\_SB)
3010                    {
3011                        Device (LID0)
3012                        {
3013                            Name (_HID, EisaId ("PNP0C0D"))
3014                            Method (_LID, 0, NotSerialized)
3015                            {
3016                                If (\_SB.PCI0.SBRG.EC.MYEC)
3017                                {
3018                                    If (\_SB.PCI0.SBRG.EC.LIDS)
3019                                    {
3020                                        Return (0x01)
3021                                    }
3022                                    Else
3023                                    {
3024                                        Return (0x00)
3025                                    }
3026                                }
3027                                Else
3028                                {
3029                                    Return (0x01)
3030                                }
3031                            }
3032                        }
3033
3034                        Device (SLPB)
3035                        {
3036                            Name (_HID, EisaId ("PNP0C0E"))
3037                            Name (_STA, 0x0B)
3038                        }
3039                    }
3040                }
3041
3042                Scope (\)
3043                {
3044                    Name (THPP, 0x4B)
3045                }
3046
3047                Scope (\_TZ)
3048                {
3049                    ThermalZone (THRM)
3050                    {
3051                        Method (KELV, 1, NotSerialized)
3052                        {
3053                            If (LGreater (Arg0, 0x7F))
3054                            {
3055                                XOr (Arg0, 0xFF, Local0)
3056                                Add (Local0, 0x01, Local0)
3057                                Multiply (Local0, 0x0A, Local0)
3058                                Subtract (0x0AAC, Local0, Local1)
3059                            }
3060                            Else
3061                            {
3062                                Multiply (Arg0, 0x0A, Local0)
3063                                Add (Local0, 0x0AAC, Local1)
3064                            }
3065
3066                            Return (Local1)
3067                        }
3068
3069                        Method (_TMP, 0, NotSerialized)
3070                        {
3071                            If (\_SB.PCI0.SBRG.EC.MYEC)
3072                            {
3073                                Store (\_SB.PCI0.SBRG.EC.CPUT, Local0)
3074                                Add (Local0, 0x03, Local0)
3075                                If (\_SB.PCI0.SBRG.EC.CTSD)
3076                                {
3077                                    Store (0x00, \_SB.PCI0.SBRG.EC.CTSD)
3078                                    Return (KELV (0x65))
3079                                }
3080                                Else
3081                                {
3082                                    Return (KELV (Local0))
3083                                }
3084                            }
3085                            Else
3086                            {
3087                                Return (KELV (0x1E))
3088                            }
3089                        }
3090
3091                        Method (_CRT, 0, NotSerialized)
3092                        {
3093                            Return (KELV (0x5F))
3094                        }
3095
3096                        Method (_HOT, 0, NotSerialized)
3097                        {
3098                            Return (KELV (0x55))
3099                        }
3100                    }
3101                }
3102            }
3103
3104            Device (P0P9)
3105            {
3106                Name (_ADR, 0x00140004)
3107                Method (_PRW, 0, NotSerialized)
3108                {
3109                    Return (GPRW (0x04, 0x04))
3110                }
3111
3112                Method (_PRT, 0, NotSerialized)
3113                {
3114                    If (PICM)
3115                    {
3116                        Return (AR09)
3117                    }
3118
3119                    Return (PR09)
3120                }
3121
3122                Device (CBOZ)
3123                {
3124                    Name (_ADR, 0x00040000)
3125                    Method (_PRW, 0, NotSerialized)
3126                    {
3127                        Return (GPRW (0x04, 0x03))
3128                    }
3129                }
3130
3131                Device (RTL)
3132                {
3133                    Name (_ADR, 0x00030000)
3134                    Method (_PRW, 0, NotSerialized)
3135                    {
3136                        Return (GPRW (0x04, 0x04))
3137                    }
3138                }
3139            }
3140
3141            Device (AC97)
3142            {
3143                Name (_ADR, 0x00140005)
3144                Method (_PRW, 0, NotSerialized)
3145                {
3146                    Return (GPRW (0x0C, 0x04))
3147                }
3148            }
3149
3150            Device (MC97)
3151            {
3152                Name (_ADR, 0x00140006)
3153                Method (_PRW, 0, NotSerialized)
3154                {
3155                    Return (GPRW (0x0C, 0x04))
3156                }
3157            }
3158
3159            Device (USB1)
3160            {
3161                Name (_ADR, 0x00130000)
3162                Method (_S3D, 0, NotSerialized)
3163                {
3164                    If (LOr (LEqual (OSFL (), 0x01), LEqual (OSFL (), 0x02)))
3165                    {
3166                        Return (0x02)
3167                    }
3168                    Else
3169                    {
3170                        Return (0x03)
3171                    }
3172                }
3173            }
3174
3175            Device (USB2)
3176            {
3177                Name (_ADR, 0x00130001)
3178                Method (_S3D, 0, NotSerialized)
3179                {
3180                    If (LOr (LEqual (OSFL (), 0x01), LEqual (OSFL (), 0x02)))
3181                    {
3182                        Return (0x02)
3183                    }
3184                    Else
3185                    {
3186                        Return (0x03)
3187                    }
3188                }
3189            }
3190
3191            Device (EUSB)
3192            {
3193                Name (_ADR, 0x00130002)
3194                Method (_S3D, 0, NotSerialized)
3195                {
3196                    If (LOr (LEqual (OSFL (), 0x01), LEqual (OSFL (), 0x02)))
3197                    {
3198                        Return (0x02)
3199                    }
3200                    Else
3201                    {
3202                        Return (0x03)
3203                    }
3204                }
3205            }
3206        }
3207
3208        Scope (\_GPE)
3209        {
3210            Method (_L12, 0, NotSerialized)
3211            {
3212                Notify (\_SB.PCI0.PCE2, 0x02)
3213                Notify (\_SB.PCI0.PCE3, 0x02)
3214                Notify (\_SB.PCI0.PCE4, 0x02)
3215                Notify (\_SB.PCI0.PCE5, 0x02)
3216                Notify (\_SB.PCI0.PCE7, 0x02)
3217                Notify (\_SB.PWRB, 0x02)
3218            }
3219
3220            Method (_L18, 0, NotSerialized)
3221            {
3222                Notify (\_SB.PCI0.PCE6, 0x02)
3223                Notify (\_SB.PWRB, 0x02)
3224            }
3225
3226            Method (_L1B, 0, NotSerialized)
3227            {
3228                Notify (\_SB.PCI0.SBAZ, 0x02)
3229                Notify (\_SB.PWRB, 0x02)
3230            }
3231
3232            Method (_L04, 0, NotSerialized)
3233            {
3234                Notify (\_SB.PCI0.P0P9, 0x02)
3235                Notify (\_SB.PCI0.P0P9.CBOZ, 0x02)
3236                Notify (\_SB.PCI0.P0P9.RTL, 0x02)
3237                Notify (\_SB.PWRB, 0x02)
3238            }
3239
3240            Method (_L0C, 0, NotSerialized)
3241            {
3242                Notify (\_SB.PCI0.AC97, 0x02)
3243                Notify (\_SB.PCI0.MC97, 0x02)
3244                Notify (\_SB.PWRB, 0x02)
3245            }
3246        }
3247
3248        Device (PWRB)
3249        {
3250            Name (_HID, EisaId ("PNP0C0C"))
3251            Name (_UID, 0xAA)
3252            Name (_STA, 0x0B)
3253        }
3254    }
3255
3256    Scope (\_SB)
3257    {
3258        OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
3259        Field (PIRQ, ByteAcc, NoLock, Preserve)
3260        {
3261            PIDX,   8,
3262            PDAT,   8
3263        }
3264
3265        IndexField (PIDX, PDAT, ByteAcc, NoLock, Preserve)
3266        {
3267            PIRA,   8,
3268            PIRB,   8,
3269            PIRC,   8,
3270            PIRD,   8,
3271            PIRS,   8,
3272                    Offset (0x09),
3273            PIRE,   8,
3274            PIRF,   8,
3275            PIRG,   8,
3276            PIRH,   8
3277        }
3278
3279        Method (IRQC, 0, NotSerialized)
3280        {
3281            Store (0x00, PIRA)
3282            Store (0x00, PIRB)
3283            Store (0x00, PIRC)
3284            Store (0x00, PIRD)
3285            Store (0x00, PIRS)
3286            Store (0x00, PIRE)
3287            Store (0x00, PIRF)
3288            Store (0x00, PIRG)
3289            Store (0x00, PIRH)
3290        }
3291
3292        Name (BUFA, ResourceTemplate ()
3293        {
3294            IRQ (Level, ActiveLow, Shared, _Y0A)
3295                {15}
3296        })
3297        Name (IPRA, ResourceTemplate ()
3298        {
3299            IRQ (Level, ActiveLow, Shared, )
3300                {5,10,11}
3301        })
3302        Name (IPRB, ResourceTemplate ()
3303        {
3304            IRQ (Level, ActiveLow, Shared, )
3305                {5,10,11}
3306        })
3307        Name (IPRC, ResourceTemplate ()
3308        {
3309            IRQ (Level, ActiveLow, Shared, )
3310                {5,10,11}
3311        })
3312        Name (IPRD, ResourceTemplate ()
3313        {
3314            IRQ (Level, ActiveLow, Shared, )
3315                {5,10,11}
3316        })
3317        Device (LNKA)
3318        {
3319            Name (_HID, EisaId ("PNP0C0F"))
3320            Name (_UID, 0x01)
3321            Method (_STA, 0, NotSerialized)
3322            {
3323                If (PIRA)
3324                {
3325                    Return (0x0B)
3326                }
3327                Else
3328                {
3329                    Return (0x09)
3330                }
3331            }
3332
3333            Method (_PRS, 0, NotSerialized)
3334            {
3335                Return (PRSA)
3336            }
3337
3338            Method (_DIS, 0, NotSerialized)
3339            {
3340                Store (0x00, PIRA)
3341            }
3342
3343            Method (_CRS, 0, NotSerialized)
3344            {
3345                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3346                ShiftLeft (0x01, PIRA, IRQX)
3347                Return (BUFA)
3348            }
3349
3350            Method (_SRS, 1, NotSerialized)
3351            {
3352                CreateWordField (Arg0, 0x01, IRA)
3353                FindSetRightBit (IRA, Local0)
3354                Decrement (Local0)
3355                Store (Local0, PIRA)
3356            }
3357        }
3358
3359        Device (LNKB)
3360        {
3361            Name (_HID, EisaId ("PNP0C0F"))
3362            Name (_UID, 0x02)
3363            Method (_STA, 0, NotSerialized)
3364            {
3365                If (PIRB)
3366                {
3367                    Return (0x0B)
3368                }
3369                Else
3370                {
3371                    Return (0x09)
3372                }
3373            }
3374
3375            Method (_PRS, 0, NotSerialized)
3376            {
3377                Return (PRSB)
3378            }
3379
3380            Method (_DIS, 0, NotSerialized)
3381            {
3382                Store (0x00, PIRB)
3383            }
3384
3385            Method (_CRS, 0, NotSerialized)
3386            {
3387                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3388                ShiftLeft (0x01, PIRB, IRQX)
3389                Return (BUFA)
3390            }
3391
3392            Method (_SRS, 1, NotSerialized)
3393            {
3394                CreateWordField (Arg0, 0x01, IRA)
3395                FindSetRightBit (IRA, Local0)
3396                Decrement (Local0)
3397                Store (Local0, PIRB)
3398            }
3399        }
3400
3401        Device (LNKC)
3402        {
3403            Name (_HID, EisaId ("PNP0C0F"))
3404            Name (_UID, 0x03)
3405            Method (_STA, 0, NotSerialized)
3406            {
3407                If (PIRC)
3408                {
3409                    Return (0x0B)
3410                }
3411                Else
3412                {
3413                    Return (0x09)
3414                }
3415            }
3416
3417            Method (_PRS, 0, NotSerialized)
3418            {
3419                Return (PRSC)
3420            }
3421
3422            Method (_DIS, 0, NotSerialized)
3423            {
3424                Store (0x00, PIRC)
3425            }
3426
3427            Method (_CRS, 0, NotSerialized)
3428            {
3429                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3430                ShiftLeft (0x01, PIRC, IRQX)
3431                Return (BUFA)
3432            }
3433
3434            Method (_SRS, 1, NotSerialized)
3435            {
3436                CreateWordField (Arg0, 0x01, IRA)
3437                FindSetRightBit (IRA, Local0)
3438                Decrement (Local0)
3439                Store (Local0, PIRC)
3440            }
3441        }
3442
3443        Device (LNKD)
3444        {
3445            Name (_HID, EisaId ("PNP0C0F"))
3446            Name (_UID, 0x04)
3447            Method (_STA, 0, NotSerialized)
3448            {
3449                If (PIRD)
3450                {
3451                    Return (0x0B)
3452                }
3453                Else
3454                {
3455                    Return (0x09)
3456                }
3457            }
3458
3459            Method (_PRS, 0, NotSerialized)
3460            {
3461                Return (PRSD)
3462            }
3463
3464            Method (_DIS, 0, NotSerialized)
3465            {
3466                Store (0x00, PIRD)
3467            }
3468
3469            Method (_CRS, 0, NotSerialized)
3470            {
3471                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3472                ShiftLeft (0x01, PIRD, IRQX)
3473                Return (BUFA)
3474            }
3475
3476            Method (_SRS, 1, NotSerialized)
3477            {
3478                CreateWordField (Arg0, 0x01, IRA)
3479                FindSetRightBit (IRA, Local0)
3480                Decrement (Local0)
3481                Store (Local0, PIRD)
3482            }
3483        }
3484
3485        Device (LNKE)
3486        {
3487            Name (_HID, EisaId ("PNP0C0F"))
3488            Name (_UID, 0x05)
3489            Method (_STA, 0, NotSerialized)
3490            {
3491                If (PIRE)
3492                {
3493                    Return (0x0B)
3494                }
3495                Else
3496                {
3497                    Return (0x09)
3498                }
3499            }
3500
3501            Method (_PRS, 0, NotSerialized)
3502            {
3503                Return (PRSE)
3504            }
3505
3506            Method (_DIS, 0, NotSerialized)
3507            {
3508                Store (0x00, PIRE)
3509            }
3510
3511            Method (_CRS, 0, NotSerialized)
3512            {
3513                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3514                ShiftLeft (0x01, PIRE, IRQX)
3515                Return (BUFA)
3516            }
3517
3518            Method (_SRS, 1, NotSerialized)
3519            {
3520                CreateWordField (Arg0, 0x01, IRA)
3521                FindSetRightBit (PIRE, Local0)
3522                Decrement (Local0)
3523                Store (Local0, PIRE)
3524            }
3525        }
3526
3527        Device (LNKF)
3528        {
3529            Name (_HID, EisaId ("PNP0C0F"))
3530            Name (_UID, 0x02)
3531            Method (_STA, 0, NotSerialized)
3532            {
3533                If (PIRF)
3534                {
3535                    Return (0x0B)
3536                }
3537                Else
3538                {
3539                    Return (0x09)
3540                }
3541            }
3542
3543            Method (_PRS, 0, NotSerialized)
3544            {
3545                Return (PRSF)
3546            }
3547
3548            Method (_DIS, 0, NotSerialized)
3549            {
3550                Store (0x00, PIRF)
3551            }
3552
3553            Method (_CRS, 0, NotSerialized)
3554            {
3555                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3556                ShiftLeft (0x01, PIRF, IRQX)
3557                Return (BUFA)
3558            }
3559
3560            Method (_SRS, 1, NotSerialized)
3561            {
3562                CreateWordField (Arg0, 0x01, IRA)
3563                FindSetRightBit (IRA, Local0)
3564                Decrement (Local0)
3565                Store (Local0, PIRF)
3566            }
3567        }
3568
3569        Device (LNKG)
3570        {
3571            Name (_HID, EisaId ("PNP0C0F"))
3572            Name (_UID, 0x03)
3573            Method (_STA, 0, NotSerialized)
3574            {
3575                If (PIRG)
3576                {
3577                    Return (0x0B)
3578                }
3579                Else
3580                {
3581                    Return (0x09)
3582                }
3583            }
3584
3585            Method (_PRS, 0, NotSerialized)
3586            {
3587                Return (PRSG)
3588            }
3589
3590            Method (_DIS, 0, NotSerialized)
3591            {
3592                Store (0x00, PIRG)
3593            }
3594
3595            Method (_CRS, 0, NotSerialized)
3596            {
3597                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3598                ShiftLeft (0x01, PIRG, IRQX)
3599                Return (BUFA)
3600            }
3601
3602            Method (_SRS, 1, NotSerialized)
3603            {
3604                CreateWordField (Arg0, 0x01, IRA)
3605                FindSetRightBit (IRA, Local0)
3606                Decrement (Local0)
3607                Store (Local0, PIRG)
3608            }
3609        }
3610
3611        Device (LNKH)
3612        {
3613            Name (_HID, EisaId ("PNP0C0F"))
3614            Name (_UID, 0x04)
3615            Method (_STA, 0, NotSerialized)
3616            {
3617                If (PIRH)
3618                {
3619                    Return (0x0B)
3620                }
3621                Else
3622                {
3623                    Return (0x09)
3624                }
3625            }
3626
3627            Method (_PRS, 0, NotSerialized)
3628            {
3629                Return (PRSH)
3630            }
3631
3632            Method (_DIS, 0, NotSerialized)
3633            {
3634                Store (0x00, PIRH)
3635            }
3636
3637            Method (_CRS, 0, NotSerialized)
3638            {
3639                CreateWordField (BUFA, \_SB._Y0A._INT, IRQX)
3640                ShiftLeft (0x01, PIRH, IRQX)
3641                Return (BUFA)
3642            }
3643
3644            Method (_SRS, 1, NotSerialized)
3645            {
3646                CreateWordField (Arg0, 0x01, IRA)
3647                FindSetRightBit (IRA, Local0)
3648                Decrement (Local0)
3649                Store (Local0, PIRH)
3650            }
3651        }
3652    }
3653
3654    Scope (\_SB)
3655    {
3656        Name (XCPD, 0x00)
3657        Name (XNPT, 0x01)
3658        Name (XCAP, 0x02)
3659        Name (XDCP, 0x04)
3660        Name (XDCT, 0x08)
3661        Name (XDST, 0x0A)
3662        Name (XLCP, 0x0C)
3663        Name (XLCT, 0x10)
3664        Name (XLST, 0x12)
3665        Name (XSCP, 0x14)
3666        Name (XSCT, 0x18)
3667        Name (XSST, 0x1A)
3668        Name (XRCT, 0x1C)
3669        Mutex (MUTE, 0x00)
3670        Method (RBPE, 1, NotSerialized)
3671        {
3672            Acquire (MUTE, 0x03E8)
3673            Add (Arg0, \PCIB, Local0)
3674            OperationRegion (PCFG, SystemMemory, Local0, 0x01)
3675            Field (PCFG, ByteAcc, NoLock, Preserve)
3676            {
3677                XCFG,   8
3678            }
3679
3680            Release (MUTE)
3681            Return (XCFG)
3682        }
3683
3684        Method (RWPE, 1, NotSerialized)
3685        {
3686            Acquire (MUTE, 0x03E8)
3687            And (Arg0, 0xFFFFFFFE, Arg0)
3688            Add (Arg0, \PCIB, Local0)
3689            OperationRegion (PCFG, SystemMemory, Local0, 0x02)
3690            Field (PCFG, WordAcc, NoLock, Preserve)
3691            {
3692                XCFG,   16
3693            }
3694
3695            Release (MUTE)
3696            Return (XCFG)
3697        }
3698
3699        Method (RDPE, 1, NotSerialized)
3700        {
3701            Acquire (MUTE, 0x03E8)
3702            And (Arg0, 0xFFFFFFFC, Arg0)
3703            Add (Arg0, \PCIB, Local0)
3704            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
3705            Field (PCFG, DWordAcc, NoLock, Preserve)
3706            {
3707                XCFG,   32
3708            }
3709
3710            Release (MUTE)
3711            Return (XCFG)
3712        }
3713
3714        Method (WBPE, 2, NotSerialized)
3715        {
3716            Acquire (MUTE, 0x0FFF)
3717            Add (Arg0, \PCIB, Local0)
3718            OperationRegion (PCFG, SystemMemory, Local0, 0x01)
3719            Field (PCFG, ByteAcc, NoLock, Preserve)
3720            {
3721                XCFG,   8
3722            }
3723
3724            Store (Arg1, XCFG)
3725            Release (MUTE)
3726        }
3727
3728        Method (WWPE, 2, NotSerialized)
3729        {
3730            Acquire (MUTE, 0x03E8)
3731            And (Arg0, 0xFFFFFFFE, Arg0)
3732            Add (Arg0, \PCIB, Local0)
3733            OperationRegion (PCFG, SystemMemory, Local0, 0x02)
3734            Field (PCFG, WordAcc, NoLock, Preserve)
3735            {
3736                XCFG,   16
3737            }
3738
3739            Store (Arg1, XCFG)
3740            Release (MUTE)
3741        }
3742
3743        Method (WDPE, 2, NotSerialized)
3744        {
3745            Acquire (MUTE, 0x03E8)
3746            And (Arg0, 0xFFFFFFFC, Arg0)
3747            Add (Arg0, \PCIB, Local0)
3748            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
3749            Field (PCFG, DWordAcc, NoLock, Preserve)
3750            {
3751                XCFG,   32
3752            }
3753
3754            Store (Arg1, XCFG)
3755            Release (MUTE)
3756        }
3757
3758        Method (RWDP, 3, NotSerialized)
3759        {
3760            Acquire (MUTE, 0x03E8)
3761            And (Arg0, 0xFFFFFFFC, Arg0)
3762            Add (Arg0, \PCIB, Local0)
3763            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
3764            Field (PCFG, DWordAcc, NoLock, Preserve)
3765            {
3766                XCFG,   32
3767            }
3768
3769            And (XCFG, Arg2, Local1)
3770            Or (Local1, Arg1, XCFG)
3771            Release (MUTE)
3772        }
3773
3774        Method (RPME, 1, NotSerialized)
3775        {
3776            Add (Arg0, 0x84, Local0)
3777            Store (\_SB.RDPE (Local0), Local1)
3778            If (LEqual (Local1, 0xFFFFFFFF))
3779            {
3780                Return (0x00)
3781            }
3782            Else
3783            {
3784                If (LAnd (Local1, 0x00010000))
3785                {
3786                    \_SB.WDPE (Local0, And (Local1, 0x00010000))
3787                    Return (0x01)
3788                }
3789
3790                Return (0x00)
3791            }
3792        }
3793    }
3794
3795    Scope (\_SB)
3796    {
3797        Scope (PCI0)
3798        {
3799            Name (CRS, ResourceTemplate ()
3800            {
3801                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
3802                    0x0000,             // Granularity
3803                    0x0000,             // Range Minimum
3804                    0x00FF,             // Range Maximum
3805                    0x0000,             // Translation Offset
3806                    0x0100,             // Length
3807                    ,, )
3808                IO (Decode16,
3809                    0x0CF8,             // Range Minimum
3810                    0x0CF8,             // Range Maximum
3811                    0x01,               // Alignment
3812                    0x08,               // Length
3813                    )
3814                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
3815                    0x0000,             // Granularity
3816                    0x0000,             // Range Minimum
3817                    0x0CF7,             // Range Maximum
3818                    0x0000,             // Translation Offset
3819                    0x0CF8,             // Length
3820                    ,, , TypeStatic)
3821                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
3822                    0x0000,             // Granularity
3823                    0x0D00,             // Range Minimum
3824                    0xFFFF,             // Range Maximum
3825                    0x0000,             // Translation Offset
3826                    0xF300,             // Length
3827                    ,, , TypeStatic)
3828                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
3829                    0x00000000,         // Granularity
3830                    0x000A0000,         // Range Minimum
3831                    0x000BFFFF,         // Range Maximum
3832                    0x00000000,         // Translation Offset
3833                    0x00020000,         // Length
3834                    ,, , AddressRangeMemory, TypeStatic)
3835                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
3836                    0x00000000,         // Granularity
3837                    0x000C0000,         // Range Minimum
3838                    0x000DFFFF,         // Range Maximum
3839                    0x00000000,         // Translation Offset
3840                    0x00020000,         // Length
3841                    ,, _Y0B, AddressRangeMemory, TypeStatic)
3842                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
3843                    0x00000000,         // Granularity
3844                    0x00000000,         // Range Minimum
3845                    0x00000000,         // Range Maximum
3846                    0x00000000,         // Translation Offset
3847                    0x00000000,         // Length
3848                    ,, _Y0C, AddressRangeMemory, TypeStatic)
3849            })
3850            CreateDWordField (CRS, \_SB.PCI0._Y0B._MIN, MIN5)
3851            CreateDWordField (CRS, \_SB.PCI0._Y0B._MAX, MAX5)
3852            CreateDWordField (CRS, \_SB.PCI0._Y0B._LEN, LEN5)
3853            CreateDWordField (CRS, \_SB.PCI0._Y0C._MIN, MIN6)
3854            CreateDWordField (CRS, \_SB.PCI0._Y0C._MAX, MAX6)
3855            CreateDWordField (CRS, \_SB.PCI0._Y0C._LEN, LEN6)
3856            Method (_CRS, 0, NotSerialized)
3857            {
3858                Store (MG1L, Local0)
3859                If (Local0)
3860                {
3861                    Store (MG1B, MIN5)
3862                    Store (MG1L, LEN5)
3863                    Add (MIN5, Decrement (Local0), MAX5)
3864                }
3865
3866                Store (MG2B, MIN6)
3867                Store (MG2L, LEN6)
3868                Store (MG2L, Local0)
3869                Add (MIN6, Decrement (Local0), MAX6)
3870                Return (CRS)
3871            }
3872        }
3873    }
3874
3875    Name (WOTB, 0x00)
3876    Name (WSSB, 0x00)
3877    Name (WAXB, 0x00)
3878    Method (_PTS, 1, NotSerialized)
3879    {
3880        Store (Arg0, DBG8)
3881        PTS (Arg0)
3882        Store (0x00, Index (WAKP, 0x00))
3883        Store (0x00, Index (WAKP, 0x01))
3884        If (LAnd (LEqual (Arg0, 0x04), LEqual (OSFL (), 0x02)))
3885        {
3886            Sleep (0x0BB8)
3887        }
3888
3889        Store (ASSB, WSSB)
3890        Store (AOTB, WOTB)
3891        Store (AAXB, WAXB)
3892        Store (Arg0, ASSB)
3893        Store (OSFL (), AOTB)
3894        Store (Zero, AAXB)
3895    }
3896
3897    Method (WDC, 1, NotSerialized)
3898    {
3899        If (\_SB.PCI0.SBRG.EC.MYEC)
3900        {
3901            Store (\_SB.PCI0.SBRG.EC.MBTS, Local0)
3902            If (LEqual (Local0, 0x01))
3903            {
3904                Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
3905                Notify (\_SB.PCI0.SBRG.EC.BAT1, 0x00)
3906            }
3907            Else
3908            {
3909                Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.BFLG)
3910                Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
3911                Sleep (0x19)
3912                Notify (\_SB.PCI0.SBRG.EC.BAT1, 0x01)
3913            }
3914
3915            Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
3916            Store (\_SB.PCI0.SBRG.EC.POWS, Local0)
3917            If (LEqual (Local0, 0x01))
3918            {
3919                Store (0x01, \_SB.PCI0.SBRG.EC.ADP1.ACP)
3920            }
3921            Else
3922            {
3923                Store (0x00, \_SB.PCI0.SBRG.EC.ADP1.ACP)
3924            }
3925
3926            Notify (\_SB.PCI0.SBRG.EC.ADP1, 0x00)
3927        }
3928
3929        If (LEqual (Arg0, 0x03))
3930        {
3931            NCPD ()
3932        }
3933
3934        If (LEqual (Arg0, 0x04))
3935        {
3936            NCPD ()
3937        }
3938    }
3939
3940    Method (NCPD, 0, NotSerialized)
3941    {
3942        Store (\_SB.PCI0.PCE6.SLST, EXHP)
3943        Sleep (0x64)
3944        Notify (\_SB.PCI0.PCE6, 0x00)
3945    }
3946
3947    Method (_WAK, 1, NotSerialized)
3948    {
3949        \_SB.IRQC ()
3950        ShiftLeft (Arg0, 0x04, DBG8)
3951        WAK (Arg0)
3952        If (ASSB)
3953        {
3954            Store (WSSB, ASSB)
3955            Store (WOTB, AOTB)
3956            Store (WAXB, AAXB)
3957        }
3958
3959        If (DerefOf (Index (WAKP, 0x00)))
3960        {
3961            Store (0x00, Index (WAKP, 0x01))
3962        }
3963        Else
3964        {
3965            Store (Arg0, Index (WAKP, 0x01))
3966        }
3967
3968        Store (Arg0, Local0)
3969        WDC (Local0)
3970        Return (WAKP)
3971    }
3972
3973    Name (\_S0, Package (0x04)
3974    {
3975        0x00,
3976        0x00,
3977        0x00,
3978        0x00
3979    })
3980    If (SS3)
3981    {
3982        Name (\_S3, Package (0x04)
3983        {
3984            0x03,
3985            0x00,
3986            0x00,
3987            0x00
3988        })
3989    }
3990
3991    If (SS4)
3992    {
3993        Name (\_S4, Package (0x04)
3994        {
3995            0x04,
3996            0x00,
3997            0x00,
3998            0x00
3999        })
4000    }
4001
4002    Name (\_S5, Package (0x04)
4003    {
4004        0x05,
4005        0x00,
4006        0x00,
4007        0x00
4008    })
4009    Method (PTS, 1, NotSerialized)
4010    {
4011        If (Arg0)
4012        {
4013            NPTS (Arg0)
4014            SPTS (Arg0)
4015        }
4016    }
4017
4018    Method (WAK, 1, NotSerialized)
4019    {
4020        NWAK (Arg0)
4021        SWAK (Arg0)
4022        \_SB.PCI0.OSBW (Arg0)
4023    }
4024}
4025