acpi_bus_number: can't get _ADR issue on Intel D923XCV Motherboard.

Mateusz Jędrasik imachine at toya.net.pl
Thu Feb 24 02:30:10 PST 2005


Hi,

I have a D925XCV Intel motherboard, with if_sk on it as a builtin 
ethernet adapter. on bootup of 5.3-RELEASE i recieve some 
acpi_bus_number: can't get _ADR issues and errors /dmesg follows/.

I tried changing pnp os on/off, updated my bios to the most recent 
release, disabled all integrated devices but the ethernet, im pretty 
much out of ideas now.

If there is any suggestion on what i could perhaphs do, it would be more 
than welcome, and I gladly would supply any debug information required 
in the process of the eventual tracking down of the error.

I will plug a pci card in there for now, but this is not quite the 
solution i would be looking for. Also, I presume the audio card is not 
supported yet? It's to be some realtek chipset, also integrated, afaik.

Cheers,

//Mateusz
-------------- next part --------------
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 5.3-RELEASE #0: Fri Nov  5 04:19:18 UTC 2004
    root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (3000.10-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf34  Stepping = 4
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Hyperthreading: 2 logical CPUs
real memory  = 3353538560 (3198 MB)
avail memory = 3280838656 (3128 MB)
ACPI APIC Table: <INTEL  D925XCV >
ioapic0 <Version 2.0> irqs 0-23 on motherboard
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <INTEL D925XCV> on motherboard
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
acpi0: Power Button (fixed)
acpi_bus_number: can't get _ADR
acpi_bus_number: can't get _ADR
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pci0: <multimedia> at device 27.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci5: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 28.1 on pci0
pci4: <ACPI PCI bus> on pcib3
pci4: <network, ethernet> at device 0.0 (no driver attached)
pcib4: <ACPI PCI-PCI bridge> at device 28.2 on pci0
pci3: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> at device 28.3 on pci0
pcib5: could not get PCI interrupt routing table for \\_SB_.PCI0.PEX4 - AE_NOT_FOUND
pci2: <ACPI PCI bus> on pcib5
uhci0: <UHCI (generic) USB controller> port 0xcc00-0xcc1f irq 23 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <UHCI (generic) USB controller> port 0xd000-0xd01f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <UHCI (generic) USB controller> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <UHCI (generic) USB controller> port 0xd400-0xd41f irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <UHCI (generic) USB controller> on uhci2
usb2: USB revision 1.0
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <UHCI (generic) USB controller> port 0xd800-0xd81f irq 16 at device 29.3 on pci0
uhci3: [GIANT-LOCKED]
usb3: <UHCI (generic) USB controller> on uhci3
usb3: USB revision 1.0
uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pcib6: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci6: <ACPI PCI bus> on pcib6
atapci0: <Promise PDC20269 UDMA133 controller> port 0xac00-0xac0f,0xb000-0xb003,0xb400-0xb407,0xb800-0xb803,0xbc00-0xbc07 mem 0xfab10000-0xfab13fff irq 22 at device 1.0 on pci6
ata2: channel #0 on atapci0
ata3: channel #1 on atapci0
fwohci0: <Lucent FW322/323> mem 0xfab14000-0xfab14fff irq 17 at device 5.0 on pci6
fwohci0: OHCI version 1.0 (ROM=0)
fwohci0: No. of Isochronous channels is 8.
fwohci0: EUI64 00:11:11:00:00:58:d9:c8
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:11:11:58:d9:c8
fwe0: Ethernet address: 02:11:11:58:d9:c8
fwe0: if_start running deferred for Giant
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci1: <Intel ICH6 UDMA100 controller> port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
ata0: channel #0 on atapci1
ata1: channel #1 on atapci1
atapci2: <Intel ICH6 SATA150 controller> port 0xdc00-0xdc0f,0xe000-0xe003,0xe400-0xe407,0xe800-0xe803,0xec00-0xec07 mem 0xfaafbc00-0xfaafbfff irq 19 at device 31.2 on pci0
ata4: channel #0 on atapci2
ata5: channel #1 on atapci2
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Power Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse, device ID 3
fdc0: <floppy drive controller> port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
ppc0: <ECP parallel printer port> port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
orm0: <ISA Option ROMs> at iomem 0xd7800-0xd87ff,0xd5000-0xd77ff,0xd4000-0xd4fff,0xc0000-0xcf7ff on isa0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 3000097613 Hz quality 800
Timecounters tick every 10.000 msec
acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0%
acd0: DVDR <HL-DT-ST DVDRAM GSA-4120B/A102> at ata0-master UDMA33
afd0: REMOVABLE <IOMEGA ZIP 250 ATAPI/25.Q> at ata0-slave PIO3
ad4: 238418MB <Maxtor 7Y250P0/YAR41BW0> [484406/16/63] at ata2-master UDMA133
ad8: 152627MB <ST3160827AS/3.00> [310101/16/63] at ata4-master SATA150
Mounting root from ufs:/dev/ad8s2a
-------------- next part --------------
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20040527
 *
 * Disassembly of /tmp/acpidump.POZic0, Wed Feb 23 18:25:27 2005
 */
DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL ", "D925XCV ", 1)
{
    OperationRegion (BIOS, SystemMemory, 0xC7F40064, 0xFF)
    Field (BIOS, ByteAcc, NoLock, Preserve)
    {
        SS1,    1, 
        SS2,    1, 
        SS3,    1, 
        SS4,    1, 
        Offset (0x01), 
        IOST,   16, 
        TMP1,   16, 
        TMP2,   16, 
        TMP3,   8, 
        SMBS,   16, 
        SMLN,   8, 
        TMP4,   16, 
        TMP5,   8, 
        TMP6,   16, 
        TMP7,   8, 
        TOPM,   32, 
        ROMS,   32, 
        TMP8,   32, 
        TMP9,   16, 
        MG1B,   32, 
        MG1L,   32, 
        MG2B,   32, 
        MG2L,   32, 
        ANGE,   8, 
        VEBA,   32, 
        RMBA,   32, 
        VEXT,   1, 
        GCIC,   3, 
        CVPD,   2, 
        DVPD,   2, 
        MVPD,   1, 
        Offset (0x3A), 
        MAEN,   1, 
        MASL,   2, 
        SWAP,   1, 
        ASFF,   1, 
        TPMF,   3, 
        Offset (0x3C), 
        TM10,   8, 
        TM11,   8, 
        ASFA,   8, 
        Offset (0x48), 
        AZBA,   32, 
        AZLN,   32, 
        PXBA,   32, 
        PXLN,   32
    }

    Name (SPIO, 0x2E)
    Name (IO1B, 0x0680)
    Name (IO1L, 0x80)
    Name (PMBS, 0x0400)
    Name (PMLN, 0x80)
    Name (GPBS, 0x0500)
    Name (GPLN, 0x40)
    Name (APIC, 0x01)
    Method (RRIO, 4, NotSerialized)
    {
        Store ("RRIO", Debug)
    }

    Method (RDMA, 3, NotSerialized)
    {
        Store ("rDMA", Debug)
    }

    Name (PICM, 0x00)
    Method (_PIC, 1, NotSerialized)
    {
        If (Arg0)
        {
            Store (0xAA, DBG8)
        }
        Else
        {
            Store (0xAC, DBG8)
        }

        Store (Arg0, PICM)
    }

    Method (OSFL, 0, NotSerialized)
    {
        Store (0x00, Local0)
        If (MCTH (\_OS, "Microsoft Windows"))
        {
            Store (0x01, Local0)
        }

        If (MCTH (\_OS, "Microsoft WindowsME: Millennium Edition"))
        {
            Store (0x01, Local0)
        }

        Return (Local0)
    }

    Method (MCTH, 2, NotSerialized)
    {
        If (LLess (SizeOf (Arg0), SizeOf (Arg1)))
        {
            Return (Zero)
        }

        Add (SizeOf (Arg0), 0x01, Local0)
        Name (BUF0, Buffer (Local0) {})
        Name (BUF1, Buffer (Local0) {})
        Store (Arg0, BUF0)
        Store (Arg1, BUF1)
        While (Local0)
        {
            Decrement (Local0)
            If (LNot (LEqual (DerefOf (Index (BUF0, Local0)), DerefOf (Index (BUF1, Local0)))))
            {
                Return (Zero)
            }
        }

        Return (One)
    }

    Name (PRWP, Package (0x02)
    {
        Zero, 
        Zero
    })
    Method (GPRW, 2, NotSerialized)
    {
        Store (Arg0, Index (PRWP, 0x00))
        Store (ShiftLeft (SS1, 0x01), Local0)
        Or (Local0, ShiftLeft (SS2, 0x02), Local0)
        Or (Local0, ShiftLeft (SS3, 0x03), Local0)
        Or (Local0, ShiftLeft (SS4, 0x04), Local0)
        If (And (ShiftLeft (0x01, Arg1), Local0))
        {
            Store (Arg1, Index (PRWP, 0x01))
        }
        Else
        {
            ShiftRight (Local0, 0x01, Local0)
            FindSetLeftBit (Local0, Index (PRWP, 0x01))
        }

        Return (PRWP)
    }

    Name (WAKP, Package (0x02)
    {
        Zero, 
        Zero
    })
    OperationRegion (DEB0, SystemIO, 0x80, 0x01)
    Field (DEB0, ByteAcc, NoLock, Preserve)
    {
        DBG8,   8
    }

    OperationRegion (DEB1, SystemIO, 0x90, 0x02)
    Field (DEB1, WordAcc, NoLock, Preserve)
    {
        DBG9,   16
    }

    Scope (\_PR)
    {
        Processor (CPU1, 0x01, 0x00000410, 0x06) {}
        Processor (CPU2, 0x02, 0x00000410, 0x06) {}
    }

    Scope (\_SB)
    {
        Name (PR00, Package (0x10)
        {
            Package (0x04)
            {
                0x0001FFFF, 
                0x00, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x00, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x01, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0x001EFFFF, 
                0x00, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0x001EFFFF, 
                0x01, 
                LNKE, 
                0x00
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x00, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x00, 
                LNKH, 
                0x00
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x01, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x02, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x03, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x00, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x01, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x02, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x03, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0x001BFFFF, 
                0x00, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x03, 
                LNKA, 
                0x00
            }
        })
        Name (AR00, Package (0x10)
        {
            Package (0x04)
            {
                0x0001FFFF, 
                0x00, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x00, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x01, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0x001EFFFF, 
                0x00, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0x001EFFFF, 
                0x01, 
                0x00, 
                0x14
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x00, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x00, 
                0x00, 
                0x17
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x01, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x02, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0x001DFFFF, 
                0x03, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x00, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x01, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x02, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0x001CFFFF, 
                0x03, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0x001BFFFF, 
                0x00, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x03, 
                0x00, 
                0x10
            }
        })
        Name (PR02, Package (0x11)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                LNKF, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                LNKG, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                LNKH, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKE, 
                0x00
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x00, 
                LNKG, 
                0x00
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x01, 
                LNKF, 
                0x00
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x02, 
                LNKE, 
                0x00
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x03, 
                LNKH, 
                0x00
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x00, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x01, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x02, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x03, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x00, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x01, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x02, 
                LNKF, 
                0x00
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x03, 
                LNKG, 
                0x00
            }, 

            Package (0x04)
            {
                0x0005FFFF, 
                0x00, 
                LNKB, 
                0x00
            }
        })
        Name (AR02, Package (0x11)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                0x00, 
                0x15
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                0x00, 
                0x16
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                0x00, 
                0x17
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                0x00, 
                0x14
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x00, 
                0x00, 
                0x16
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x01, 
                0x00, 
                0x15
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x02, 
                0x00, 
                0x14
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x03, 
                0x00, 
                0x17
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x00, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x01, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x02, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x03, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x00, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x01, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x02, 
                0x00, 
                0x15
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x03, 
                0x00, 
                0x16
            }, 

            Package (0x04)
            {
                0x0005FFFF, 
                0x00, 
                0x00, 
                0x11
            }
        })
        Name (PR01, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKD, 
                0x00
            }
        })
        Name (AR01, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                0x00, 
                0x13
            }
        })
        Name (PR03, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKD, 
                0x00
            }
        })
        Name (AR03, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                0x00, 
                0x13
            }
        })
        Name (PR04, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                LNKB, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKA, 
                0x00
            }
        })
        Name (AR04, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                0x00, 
                0x11
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                0x00, 
                0x10
            }
        })
        Name (PR05, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                LNKC, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                LNKD, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                LNKA, 
                0x00
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKB, 
                0x00
            }
        })
        Name (AR05, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                0x00, 
                0x00, 
                0x12
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x01, 
                0x00, 
                0x13
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x02, 
                0x00, 
                0x10
            }, 

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                0x00, 
                0x11
            }
        })
        Name (PRSA, ResourceTemplate ()
        {
            IRQ (Level, ActiveLow, Shared) {3,4,5,6,7,9,10,11,12,14,15}
        })
        Alias (PRSA, PRSB)
        Alias (PRSA, PRSC)
        Alias (PRSA, PRSD)
        Alias (PRSA, PRSE)
        Alias (PRSA, PRSF)
        Alias (PRSA, PRSG)
        Alias (PRSA, PRSH)
        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A08"))
            Name (_CID, 0x030AD041)
            Name (_ADR, 0x00)
            Method (^BN00, 0, NotSerialized)
            {
                Return (0x00)
            }

            Method (_BBN, 0, NotSerialized)
            {
                Return (BN00 ())
            }

            Name (_UID, 0x00)
            Method (_PRT, 0, NotSerialized)
            {
                If (PICM)
                {
                    Return (AR00)
                }

                Return (PR00)
            }

            Device (PEGP)
            {
                Name (_ADR, 0x00010000)
                OperationRegion (ORP0, PCI_Config, 0x00, 0xFF)
                Field (ORP0, AnyAcc, NoLock, Preserve)
                {
                    RPID,   32, 
                    Offset (0x34), 
                    CPLT,   8, 
                    Offset (0x58), 
                    SSLC,   10, 
                    Offset (0x5A), 
                    SSLS,   7, 
                    Offset (0x5C), 
                    Offset (0x60), 
                    SQID,   16, 
                    SPME,   1, 
                    SPMP,   1, 
                    Offset (0x64), 
                    Offset (0xB8), 
                    NSLC,   10, 
                    Offset (0xBA), 
                    NSLS,   7, 
                    Offset (0xBC), 
                    Offset (0xC0), 
                    NQID,   16, 
                    NPME,   1, 
                    NPMP,   1, 
                    Offset (0xC4), 
                    Offset (0xDC), 
                        ,   31, 
                    RPSC,   1
                }

                Method (HDDN, 1, NotSerialized)
                {
                    If (LEqual (RPID, Ones))
                    {
                        Return (One)
                    }
                    Else
                    {
                        Return (Zero)
                    }
                }

                Method (XPMH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        Store (NPME, Local0)
                        While (NPME)
                        {
                            Store (0x01, NPME)
                        }
                    }
                    Else
                    {
                        Store (SPME, Local0)
                        While (SPME)
                        {
                            Store (0x01, SPME)
                        }

                        While (RPSC)
                        {
                            Store (0x01, RPSC)
                        }
                    }

                    Return (Local0)
                }

                Method (XHPH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        And (NSLC, NSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (NSLS, NSLS)
                    }
                    Else
                    {
                        And (SSLC, SSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (SSLS, SSLS)
                    }

                    Return (Local0)
                }

                Method (SCIC, 2, NotSerialized)
                {
                    OperationRegion (ORP7, PCI_Config, 0xD8, 0x04)
                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        HPCS,   1, 
                        PMCS,   1
                    }

                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        ICHC,   2
                    }

                    OperationRegion (ORP8, PCI_Config, 0xEC, 0x04)
                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                        GPCN,   1, 
                        HPCN,   1, 
                        PMCN,   1
                    }

                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                            ,   1, 
                        MCHC,   2
                    }

                    If (LNot (HDDN (Arg0)))
                    {
                        If (LNot (LGreater (Arg0, 0x03)))
                        {
                            And (Arg1, 0x03, ICHC)
                        }

                        If (LEqual (Arg0, 0x08))
                        {
                            And (Arg1, 0x03, MCHC)
                        }
                    }
                }

                Method (DP80, 1, NotSerialized)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x0BB8)
                    Store (0x00, DBG8)
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x09, 0x04))
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (PICM)
                    {
                        Return (AR01)
                    }

                    Return (PR01)
                }
            }

            Device (P0P2)
            {
                Name (_ADR, 0x001E0000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0B, 0x04))
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (PICM)
                    {
                        Return (AR02)
                    }

                    Return (PR02)
                }
            }

            Device (AC97)
            {
                Name (_ADR, 0x001E0003)
                OperationRegion (BAR0, PCI_Config, 0x55, 0x01)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    A97W,   1
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x01, A97W)
                    }
                    Else
                    {
                        Store (0x00, A97W)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x05, 0x04))
                }
            }

            Device (IDE0)
            {
                Name (_ADR, 0x001F0001)
                Scope (\_SB.PCI0)
                {
                    Name (NATA, Package (0x02)
                    {
                        0x001F0001, 
                        0x001F0002
                    })
                }

                Name (REGF, 0x01)
                Method (_REG, 2, NotSerialized)
                {
                    If (LEqual (Arg0, 0x02))
                    {
                        Store (Arg1, REGF)
                    }
                }

                OperationRegion (BAR0, PCI_Config, 0x00, 0x0100)
                Field (BAR0, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x40), 
                    TIMP,   16, 
                    TIMS,   16, 
                    STMP,   4, 
                    STMS,   4, 
                    Offset (0x48), 
                    UDMP,   2, 
                    UDMS,   2, 
                    Offset (0x4A), 
                    UDTP,   6, 
                    Offset (0x4B), 
                    UDTS,   6, 
                    Offset (0x54), 
                    PCB0,   2, 
                    SCB0,   2, 
                    PCA0,   2, 
                    SCA0,   2, 
                        ,   4, 
                    FPB0,   2, 
                    FSB0,   2
                }

                Name (TIM0, Package (0x09)
                {
                    Package (0x04)
                    {
                        0x78, 
                        0xB4, 
                        0xF0, 
                        0x0384
                    }, 

                    Package (0x04)
                    {
                        0x23, 
                        0x21, 
                        0x10, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0B, 
                        0x09, 
                        0x04, 
                        0x00
                    }, 

                    Package (0x06)
                    {
                        0x70, 
                        0x49, 
                        0x36, 
                        0x27, 
                        0x19, 
                        0x11
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x01, 
                        0x02, 
                        0x01, 
                        0x02, 
                        0x01
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x00, 
                        0x00, 
                        0x01, 
                        0x01, 
                        0x01
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x00, 
                        0x00, 
                        0x00, 
                        0x00, 
                        0x01
                    }, 

                    Package (0x04)
                    {
                        0x04, 
                        0x03, 
                        0x02, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x02, 
                        0x01, 
                        0x00, 
                        0x00
                    }
                })
                Name (TMD0, Buffer (0x14) {})
                CreateDWordField (TMD0, 0x00, PIO0)
                CreateDWordField (TMD0, 0x04, DMA0)
                CreateDWordField (TMD0, 0x08, PIO1)
                CreateDWordField (TMD0, 0x0C, DMA1)
                CreateDWordField (TMD0, 0x10, CHNF)
                Name (GTIM, 0x00)
                Name (GSTM, 0x00)
                Name (GUDM, 0x00)
                Name (GUDT, 0x00)
                Name (GCB0, 0x00)
                Name (GFB0, 0x00)
                Device (CHN0)
                {
                    Name (_ADR, 0x00)
                    OperationRegion (IDE0, SystemIO, 0x01F0, 0x08)
                    Field (IDE0, ByteAcc, NoLock, Preserve)
                    {
                        DATA,   8, 
                        FEAT,   8, 
                        SECC,   8, 
                        SECN,   8, 
                        CYLL,   8, 
                        CYLH,   8, 
                        DVHD,   8, 
                        STAT,   8
                    }

                    Name (ATP0, 0x01)
                    Name (ATP1, 0x01)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Return (GTM (TIMP, STMP, UDMP, UDTP, PCB0, FPB0))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        Store (Arg0, Debug)
                        Store (Arg0, TMD0)
                        Store (TIMP, GTIM)
                        Store (UDTP, GUDT)
                        If (STM ())
                        {
                            Store (GTIM, TIMP)
                            Store (GSTM, STMP)
                            Store (GUDM, UDMP)
                            Store (GUDT, UDTP)
                            Store (GCB0, PCB0)
                            Store (GFB0, FPB0)
                        }

                        Store (GTF (0x00, Arg1), ATA0)
                        Store (GTF (0x01, Arg2), ATA1)
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA0))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA1))
                        }
                    }
                }

                Device (CHN1)
                {
                    Name (_ADR, 0x01)
                    OperationRegion (IDE1, SystemIO, 0x0170, 0x08)
                    Field (IDE1, ByteAcc, NoLock, Preserve)
                    {
                        DATA,   8, 
                        FEAT,   8, 
                        SECC,   8, 
                        SECN,   8, 
                        CYLL,   8, 
                        CYLH,   8, 
                        DVHD,   8, 
                        STAT,   8
                    }

                    Name (ATS0, 0x01)
                    Name (ATS1, 0x01)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Return (GTM (TIMS, STMS, UDMS, UDTS, SCB0, FSB0))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        Store (Arg0, Debug)
                        Store (Arg0, TMD0)
                        Store (TIMS, GTIM)
                        Store (UDTS, GUDT)
                        If (STM ())
                        {
                            Store (GTIM, TIMS)
                            Store (GSTM, STMS)
                            Store (GUDM, UDMS)
                            Store (GUDT, UDTS)
                            Store (GCB0, SCB0)
                            Store (GFB0, FSB0)
                        }

                        Store (GTF (0x00, Arg1), ATA2)
                        Store (GTF (0x01, Arg2), ATA3)
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA2))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA3))
                        }
                    }

                    Name (TIM1, Buffer (0x14) {})
                    CreateDWordField (TIM1, 0x00, MPIO)
                    CreateDWordField (TIM1, 0x04, MDMA)
                    CreateDWordField (TIM1, 0x08, SPIO)
                    CreateDWordField (TIM1, 0x0C, SDMA)
                    CreateDWordField (TIM1, 0x10, FLGS)
                    Method (_PS3, 0, NotSerialized)
                    {
                        If (MCTH (\_OS, "Microsoft Windows"))
                        {
                            Store (_GTM (), TIM1)
                        }
                    }

                    Name (BOOT, 0x00)
                    Method (_PS0, 0, NotSerialized)
                    {
                        If (MCTH (\_OS, "Microsoft Windows"))
                        {
                            If (BOOT)
                            {
                                If (And (DRVI, 0x20))
                                {
                                    PRGT (MPIO, MDMA, FLGS, 0xA0)
                                }

                                If (And (DRVI, 0x80))
                                {
                                    PRGT (SPIO, SDMA, FLGS, 0xB0)
                                }
                            }

                            Store (0x01, BOOT)
                        }
                    }

                    Method (PRGT, 4, NotSerialized)
                    {
                        Store (Arg3, DVHD)
                        If (And (Not (LEqual (Arg0, 0xFFFFFFFF)), Not (LEqual (Arg0, 0x00))))
                        {
                            While (LEqual (And (STAT, 0x80), 0x80)) {}
                            Store (0x03, FEAT)
                            Store (Match (DerefOf (Index (TIM0, 0x00)), MEQ, Arg0, MTR, 0x00, 0x00), Local0)
                            Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x07)), Local0)), Local0)
                            Store (Local0, SECC)
                            Store (0x00, SECN)
                            Store (0x00, CYLL)
                            Store (0x00, CYLH)
                            Store (Arg3, DVHD)
                            Store (0xEF, STAT)
                        }

                        If (And (Not (LEqual (Arg0, 0xFFFFFFFF)), Not (LEqual (Arg0, 0x00))))
                        {
                            While (LEqual (And (STAT, 0x80), 0x80)) {}
                            Store (0x03, FEAT)
                            Store (0x00, Local0)
                            If (LEqual (Arg3, 0xA0))
                            {
                                If (And (Arg2, 0x01))
                                {
                                    Store (0x01, Local0)
                                }
                            }
                            Else
                            {
                                If (And (Arg2, 0x04))
                                {
                                    Store (0x01, Local0)
                                }
                            }

                            If (LEqual (Local0, 0x01))
                            {
                                Store (Match (DerefOf (Index (TIM0, 0x03)), MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                                Or (0x40, Local0, Local0)
                            }
                            Else
                            {
                                Store (Match (DerefOf (Index (TIM0, 0x00)), MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                                Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x08)), Local0)), Local0)
                            }

                            Store (Local0, SECC)
                            Store (0x00, SECN)
                            Store (0x00, CYLL)
                            Store (0x00, CYLH)
                            Store (Arg3, DVHD)
                            Store (0xEF, STAT)
                        }
                    }
                }

                Method (GTM, 6, Serialized)
                {
                    Store (Ones, PIO0)
                    Store (PIO0, PIO1)
                    Store (PIO0, DMA0)
                    Store (PIO0, DMA1)
                    Store (Zero, CHNF)
                    If (REGF) {}
                    Else
                    {
                        Return (TMD0)
                    }

                    If (And (Arg0, 0x02))
                    {
                        Or (CHNF, 0x02, CHNF)
                    }

                    ShiftRight (And (Arg0, 0x3300), 0x08, Local5)
                    Store (Match (DerefOf (Index (TIM0, 0x01)), MLE, Local5, MTR, 0x00, 0x00), Local6)
                    Store (DerefOf (Index (DerefOf (Index (TIM0, 0x00)), Local6)), Local7)
                    Store (Local7, DMA0)
                    If (And (Arg0, 0x08))
                    {
                        Store (0x0384, PIO0)
                    }
                    Else
                    {
                        Store (Local7, PIO0)
                    }

                    If (And (Arg0, 0x20))
                    {
                        Or (CHNF, 0x08, CHNF)
                    }

                    If (And (Arg0, 0x4000))
                    {
                        Or (CHNF, 0x10, CHNF)
                        Store (Match (DerefOf (Index (TIM0, 0x02)), MLE, Arg1, MTR, 0x00, 0x00), Local5)
                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x00)), Local5)), Local6)
                        Store (Local6, DMA1)
                        If (And (Arg0, 0x80))
                        {
                            Store (0x0384, PIO1)
                        }
                        Else
                        {
                            Store (Local6, PIO1)
                        }
                    }

                    If (And (Arg2, 0x01))
                    {
                        And (Arg3, 0x03, Local5)
                        If (LAnd (And (Arg5, 0x01), LEqual (Local5, 0x01)))
                        {
                            Store (0x05, Local5)
                        }
                        Else
                        {
                            If (And (Arg4, 0x01))
                            {
                                Store (0x04, Local5)
                            }
                        }

                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local5)), DMA0)
                        Or (CHNF, 0x01, CHNF)
                    }

                    If (And (Arg2, 0x02))
                    {
                        And (ShiftRight (Arg3, 0x04), 0x03, Local5)
                        If (LAnd (And (Arg5, 0x02), LEqual (Local5, 0x01)))
                        {
                            Store (0x05, Local5)
                        }
                        Else
                        {
                            If (And (Arg4, 0x02))
                            {
                                Store (0x04, Local5)
                            }
                        }

                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local5)), DMA1)
                        Or (CHNF, 0x04, CHNF)
                    }

                    Store (TMD0, Debug)
                    Return (TMD0)
                }

                Method (STM, 0, Serialized)
                {
                    If (REGF) {}
                    Else
                    {
                        Return (0x00)
                    }

                    And (GTIM, 0x8044, GTIM)
                    Store (0x00, GSTM)
                    Store (0x00, GUDM)
                    Store (0x00, GCB0)
                    And (GUDT, 0xCC, GUDT)
                    Store (0x00, GFB0)
                    If (And (CHNF, 0x01))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMA0, MTR, 0x00, 0x00), Local0)
                        If (LGreater (Local0, 0x05))
                        {
                            Store (0x05, Local0)
                        }

                        Or (GUDT, DerefOf (Index (DerefOf (Index (TIM0, 0x04)), Local0)), GUDT)
                        Or (GCB0, DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Local0)), GCB0)
                        Or (GFB0, DerefOf (Index (DerefOf (Index (TIM0, 0x06)), Local0)), GFB0)
                        Or (GUDM, 0x01, GUDM)
                    }
                    Else
                    {
                        If (Or (LEqual (PIO0, Ones), LEqual (PIO0, 0x00)))
                        {
                            If (And (LLess (DMA0, Ones), LGreater (DMA0, 0x00)))
                            {
                                Store (DMA0, PIO0)
                                Or (GTIM, 0x08, GTIM)
                            }
                        }
                    }

                    If (And (CHNF, 0x04))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMA1, MTR, 0x00, 0x00), Local0)
                        If (LGreater (Local0, 0x05))
                        {
                            Store (0x05, Local0)
                        }

                        Or (GUDT, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x04)), Local0)), 0x04), GUDT)
                        Or (GCB0, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Local0)), 0x01), GCB0)
                        Or (GFB0, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x06)), Local0)), 0x01), GFB0)
                        Or (GUDM, 0x02, GUDM)
                    }
                    Else
                    {
                        If (Or (LEqual (PIO1, Ones), LEqual (PIO1, 0x00)))
                        {
                            If (And (LLess (DMA1, Ones), LGreater (DMA1, 0x00)))
                            {
                                Store (DMA1, PIO1)
                                Or (GTIM, 0x80, GTIM)
                            }
                        }
                    }

                    If (And (CHNF, 0x02))
                    {
                        Or (GTIM, 0x03, GTIM)
                    }

                    If (And (CHNF, 0x08))
                    {
                        Or (GTIM, 0x30, GTIM)
                    }

                    And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIO0, MTR, 0x00, 0x00), 0x03, Local0)
                    Store (DerefOf (Index (DerefOf (Index (TIM0, 0x01)), Local0)), Local1)
                    ShiftLeft (Local1, 0x08, Local2)
                    Or (GTIM, Local2, GTIM)
                    If (And (CHNF, 0x10))
                    {
                        Or (GTIM, 0x4000, GTIM)
                        And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIO1, MTR, 0x00, 0x00), 0x03, Local0)
                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x02)), Local0)), GSTM)
                    }

                    Return (0x01)
                }

                Name (AT01, Buffer (0x07)
                {
                    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEF
                })
                Name (AT02, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90
                })
                Name (AT03, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6
                })
                Name (AT04, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91
                })
                Name (AT05, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF5
                })
                Name (ATA0, Buffer (0x1D) {})
                Name (ATA1, Buffer (0x1D) {})
                Name (ATA2, Buffer (0x1D) {})
                Name (ATA3, Buffer (0x1D) {})
                Name (ATAB, Buffer (0x1D) {})
                CreateByteField (ATAB, 0x00, CMDC)
                Method (GTFB, 3, Serialized)
                {
                    Multiply (CMDC, 0x38, Local0)
                    Add (Local0, 0x08, Local1)
                    CreateField (ATAB, Local1, 0x38, CMDX)
                    Multiply (CMDC, 0x07, Local0)
                    CreateByteField (ATAB, Add (Local0, 0x02), A001)
                    CreateByteField (ATAB, Add (Local0, 0x06), A005)
                    Store (Arg0, CMDX)
                    Store (Arg1, A001)
                    Store (Arg2, A005)
                    Increment (CMDC)
                }

                Method (GTF, 2, Serialized)
                {
                    Store (Arg1, Debug)
                    Store (0x00, CMDC)
                    Name (ID49, 0x0C00)
                    Name (ID59, 0x00)
                    Name (ID53, 0x04)
                    Name (ID63, 0x0F00)
                    Name (ID88, 0x0F00)
                    Name (IRDY, 0x01)
                    Name (PIOT, 0x00)
                    Name (DMAT, 0x00)
                    If (LEqual (SizeOf (Arg1), 0x0200))
                    {
                        CreateWordField (Arg1, 0x62, IW49)
                        Store (IW49, ID49)
                        CreateWordField (Arg1, 0x6A, IW53)
                        Store (IW53, ID53)
                        CreateWordField (Arg1, 0x7E, IW63)
                        Store (IW63, ID63)
                        CreateWordField (Arg1, 0x76, IW59)
                        Store (IW59, ID59)
                        CreateWordField (Arg1, 0xB0, IW88)
                        Store (IW88, ID88)
                        CreateWordField (Arg1, 0xA4, IW82)
                    }

                    Store (0xA0, Local7)
                    If (Arg0)
                    {
                        Store (0xB0, Local7)
                        And (CHNF, 0x08, IRDY)
                        If (And (CHNF, 0x10))
                        {
                            Store (PIO1, PIOT)
                        }
                        Else
                        {
                            Store (PIO0, PIOT)
                        }

                        If (And (CHNF, 0x04))
                        {
                            If (And (CHNF, 0x10))
                            {
                                Store (DMA1, DMAT)
                            }
                            Else
                            {
                                Store (DMA0, DMAT)
                            }
                        }
                    }
                    Else
                    {
                        And (CHNF, 0x02, IRDY)
                        Store (PIO0, PIOT)
                        If (And (CHNF, 0x01))
                        {
                            Store (DMA0, DMAT)
                        }
                    }

                    If (LAnd (LAnd (And (ID53, 0x04), And (ID88, 0xFF00)), DMAT))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMAT, MTR, 0x00, 0x00), Local1)
                        If (LGreater (Local1, 0x05))
                        {
                            Store (0x05, Local1)
                        }

                        GTFB (AT01, Or (0x40, Local1), Local7)
                    }
                    Else
                    {
                        If (LAnd (And (ID63, 0xFF00), PIOT))
                        {
                            And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIOT, MTR, 0x00, 0x00), 0x03, Local0)
                            Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x08)), Local0)), Local1)
                            GTFB (AT01, Local1, Local7)
                        }
                    }

                    If (IRDY)
                    {
                        And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIOT, MTR, 0x00, 0x00), 0x03, Local0)
                        Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x07)), Local0)), Local1)
                        GTFB (AT01, Local1, Local7)
                    }
                    Else
                    {
                        If (And (ID49, 0x0400))
                        {
                            GTFB (AT01, 0x01, Local7)
                        }
                    }

                    If (LAnd (And (ID59, 0x0100), And (ID59, 0xFF)))
                    {
                        GTFB (AT03, And (ID59, 0xFF), Local7)
                    }

                    If (LAnd (IW82, 0x02))
                    {
                        GTFB (AT05, 0x00, Local7)
                    }

                    Store (ATAB, Debug)
                    Return (ATAB)
                }

                Method (RATA, 1, NotSerialized)
                {
                    CreateByteField (Arg0, 0x00, CMDN)
                    Multiply (CMDN, 0x38, Local0)
                    CreateField (Arg0, 0x08, Local0, RETB)
                    Store (RETB, Debug)
                    Return (RETB)
                }
            }

            Device (USB0)
            {
                Name (_ADR, 0x001D0000)
                OperationRegion (BAR0, PCI_Config, 0xC0, 0x05)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    UBL1,   16, 
                    Offset (0x04), 
                    USBW,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x03, USBW)
                    }
                    Else
                    {
                        Store (0x00, USBW)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x03, 0x03))
                }
            }

            Device (USB1)
            {
                Name (_ADR, 0x001D0001)
                OperationRegion (BAR0, PCI_Config, 0xC0, 0x05)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    UBL1,   16, 
                    Offset (0x04), 
                    USBW,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x03, USBW)
                    }
                    Else
                    {
                        Store (0x00, USBW)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x04, 0x03))
                }
            }

            Device (USB2)
            {
                Name (_ADR, 0x001D0002)
                OperationRegion (BAR0, PCI_Config, 0xC0, 0x05)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    UBL1,   16, 
                    Offset (0x04), 
                    USBW,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x03, USBW)
                    }
                    Else
                    {
                        Store (0x00, USBW)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0C, 0x03))
                }
            }

            Device (USB3)
            {
                Name (_ADR, 0x001D0003)
                OperationRegion (BAR0, PCI_Config, 0xC0, 0x05)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    UBL1,   16, 
                    Offset (0x04), 
                    USBW,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x03, USBW)
                    }
                    Else
                    {
                        Store (0x00, USBW)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0E, 0x03))
                }
            }

            Device (USB7)
            {
                Name (_ADR, 0x001D0007)
                OperationRegion (BAR0, PCI_Config, 0x62, 0x02)
                Field (BAR0, ByteAcc, NoLock, Preserve)
                {
                    USBW,   16
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        Store (0x7F, USBW)
                    }
                    Else
                    {
                        Store (0x00, USBW)
                    }
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0D, 0x03))
                }
            }

            Device (SBRG)
            {
                Name (_ADR, 0x001F0000)
                Device (PIC)
                {
                    Name (_HID, EisaId ("PNP0000"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0020, 0x0020, 0x00, 0x02)
                        IO (Decode16, 0x00A0, 0x00A0, 0x00, 0x02)
                        IRQNoFlags () {2}
                    })
                }

                Device (DMAD)
                {
                    Name (_HID, EisaId ("PNP0200"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        DMA (Compatibility, BusMaster, Transfer8) {4}
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x10)
                        IO (Decode16, 0x0081, 0x0081, 0x00, 0x03)
                        IO (Decode16, 0x0087, 0x0087, 0x00, 0x01)
                        IO (Decode16, 0x0089, 0x0089, 0x00, 0x03)
                        IO (Decode16, 0x008F, 0x008F, 0x00, 0x01)
                        IO (Decode16, 0x00C0, 0x00C0, 0x00, 0x20)
                    })
                }

                Device (TMR)
                {
                    Name (_HID, EisaId ("PNP0100"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0040, 0x0040, 0x00, 0x04)
                        IRQNoFlags () {0}
                    })
                }

                Device (RTC0)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0070, 0x0070, 0x00, 0x02)
                        IRQNoFlags () {8}
                    })
                }

                Device (PS2K)
                {
                    Name (_HID, EisaId ("PNP0303"))
                    Name (_CID, 0x0B03D041)
                    Method (_STA, 0, NotSerialized)
                    {
                        ShiftLeft (0x01, 0x0A, Local0)
                        If (And (IOST, Local0))
                        {
                            Return (0x0F)
                        }

                        If (OSFL ())
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
                        IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
                        IRQNoFlags () {1}
                    })
                }

                Device (PS2M)
                {
                    Name (_HID, EisaId ("PNP0F03"))
                    Name (_CID, 0x130FD041)
                    Method (_STA, 0, NotSerialized)
                    {
                        ShiftLeft (0x01, 0x0C, Local0)
                        If (And (IOST, Local0))
                        {
                            Return (0x0F)
                        }

                        If (OSFL ())
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Name (CRS1, ResourceTemplate ()
                    {
                        IRQNoFlags () {12}
                    })
                    Name (CRS2, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
                        IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
                        IRQNoFlags () {12}
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        ShiftLeft (0x01, 0x0A, Local0)
                        If (And (IOST, Local0))
                        {
                            Return (CRS1)
                        }
                        Else
                        {
                            Return (CRS2)
                        }
                    }
                }

                Device (SPKR)
                {
                    Name (_HID, EisaId ("PNP0800"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0061, 0x0061, 0x00, 0x01)
                    })
                }

                Device (COPR)
                {
                    Name (_HID, EisaId ("PNP0C04"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x00F0, 0x00F0, 0x00, 0x10)
                        IRQNoFlags () {13}
                    })
                }

                OperationRegion (SMC1, SystemIO, SPIO, 0x02)
                Field (SMC1, ByteAcc, Lock, Preserve)
                {
                    INDX,   8, 
                    DATA,   8
                }

                IndexField (INDX, DATA, ByteAcc, Lock, Preserve)
                {
                    Offset (0x02), 
                    CFG,    8, 
                    Offset (0x07), 
                    LDN,    8, 
                    Offset (0x20), 
                    SDID,   8, 
                    SREV,   8, 
                    Offset (0x30), 
                    ACTR,   8, 
                    Offset (0x60), 
                    IOAH,   8, 
                    IOAL,   8, 
                    Offset (0x70), 
                    INTR,   8, 
                    Offset (0x72), 
                    INT1,   8, 
                    Offset (0x74), 
                    DMCH,   8, 
                    Offset (0xC0), 
                    GP40,   8, 
                    Offset (0xF0), 
                    OPT0,   8, 
                    OPT1,   8, 
                    OPT2,   8, 
                    OPT3,   8, 
                    OPT4,   8, 
                    OPT5,   8, 
                    OPT6,   8, 
                    OPT7,   8, 
                    OPT8,   8
                }

                Mutex (MUT0, 0x00)
                Method (ENFG, 0, NotSerialized)
                {
                    Acquire (MUT0, 0x0FFF)
                    Store (0x55, INDX)
                }

                Method (EXFG, 0, NotSerialized)
                {
                    Store (0xAA, INDX)
                    Release (MUT0)
                }

                Method (KCLR, 0, NotSerialized)
                {
                    Store (0x07, INDX)
                    Store (LDKB, DATA)
                    Store (0xF0, INDX)
                    Store (0x00, DATA)
                }

                Name (LDFD, 0x00)
                Name (LDLP, 0x01)
                Name (LDU2, 0x02)
                Name (LDU1, 0x03)
                Name (LDPW, 0x04)
                Name (LDMO, 0x05)
                Name (LDKB, 0x06)
                Name (LDGP, 0x07)
                Device (\_SB.PCI0.SBRG.FDC0)
                {
                    Name (_HID, EisaId ("PNP0700"))
                    Method (_STA, 0, NotSerialized)
                    {
                        If (FDST)
                        {
                            Return (GSTA (LDFD))
                        }

                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        DDIS (LDFD)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (FCRS)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (FPRS)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        DENB (LDFD)
                    }
                }

                Device (\_SB.PCI0.SBRG.UAR1)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (U1ST)
                        {
                            Return (GSTA (LDU1))
                        }

                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        DDIS (LDU1)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PCRS (LDU1, 0x01, 0x08))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSRS (Arg0, LDU1)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (C1PR)
                    }
                }

                Device (\_SB.PCI0.SBRG.LPT)
                {
                    Name (_HID, EisaId ("PNP0400"))
                    Method (_STA, 0, NotSerialized)
                    {
                        ENFG ()
                        Store (LDLP, LDN)
                        And (OPT8, 0x04, Local0)
                        EXFG ()
                        If (Local0) {}
                        Else
                        {
                            If (LPST)
                            {
                                Return (GSTA (LDLP))
                            }
                        }

                        Return (Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        DDIS (LDLP)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PCRS (LDLP, 0x01, 0x08))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSRS (Arg0, LDLP)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (LPPR)
                    }
                }

                Device (\_SB.PCI0.SBRG.ECP)
                {
                    Name (_HID, EisaId ("PNP0401"))
                    Method (_STA, 0, NotSerialized)
                    {
                        ENFG ()
                        Store (LDLP, LDN)
                        And (OPT8, 0x04, Local0)
                        EXFG ()
                        If (Local0)
                        {
                            If (LPST)
                            {
                                Return (GSTA (LDLP))
                            }
                        }

                        Return (Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        DDIS (LDLP)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (ECRS (LDLP))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        ESRS (Arg0, LDLP)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (EPRS)
                    }
                }

                Name (FDST, 0x00)
                Name (U1ST, 0x00)
                Name (U2ST, 0x00)
                Name (LPST, 0x00)
                Method (IODT, 0, NotSerialized)
                {
                    If (LEqual (GSTA (LDFD), 0x0F))
                    {
                        Store (0x01, FDST)
                    }

                    If (LEqual (GSTA (LDU1), 0x0F))
                    {
                        Store (0x01, U1ST)
                    }

                    If (LEqual (GSTA (LDU2), 0x0F))
                    {
                        Store (0x01, U2ST)
                    }

                    If (LEqual (GSTA (LDLP), 0x0F))
                    {
                        Store (0x01, LPST)
                    }
                }

                Method (GSTA, 1, NotSerialized)
                {
                    ENFG ()
                    Store (Arg0, LDN)
                    If (ACTR)
                    {
                        Store (0x0F, Local0)
                    }
                    Else
                    {
                        If (Or (IOAH, IOAL))
                        {
                            Store (0x0D, Local0)
                        }
                        Else
                        {
                            Store (0x00, Local0)
                        }
                    }

                    EXFG ()
                    Return (Local0)
                }

                Method (DDIS, 1, NotSerialized)
                {
                    ENFG ()
                    Store (Arg0, LDN)
                    Store (Zero, ACTR)
                    EXFG ()
                }

                Method (DENB, 1, NotSerialized)
                {
                    ENFG ()
                    Store (Arg0, LDN)
                    Store (One, ACTR)
                    EXFG ()
                }

                Method (PCRS, 3, NotSerialized)
                {
                    CreateByteField (PBUF, 0x02, IOLO)
                    CreateByteField (PBUF, 0x03, IOHI)
                    CreateWordField (PBUF, 0x02, IOHL)
                    CreateWordField (PBUF, 0x04, IORL)
                    CreateByteField (PBUF, 0x06, ALMN)
                    CreateByteField (PBUF, 0x07, LENG)
                    CreateByteField (PBUF, 0x09, IRQL)
                    ENFG ()
                    Store (Arg0, LDN)
                    Store (IOAH, IOHI)
                    Store (IOAL, IOLO)
                    Store (IOHL, IORL)
                    Store (Arg1, ALMN)
                    If (LEqual (IOLO, 0xBC))
                    {
                        Store (0x04, LENG)
                    }
                    Else
                    {
                        Store (Arg2, LENG)
                    }

                    Store (One, Local0)
                    ShiftLeft (Local0, INTR, IRQL)
                    EXFG ()
                    Return (PBUF)
                }

                Method (PSRS, 2, NotSerialized)
                {
                    CreateByteField (Arg0, 0x02, POLB)
                    CreateByteField (Arg0, 0x03, POHB)
                    CreateByteField (Arg0, 0x09, PIRQ)
                    ENFG ()
                    Store (Arg1, LDN)
                    Store (POLB, IOAL)
                    Store (POHB, IOAH)
                    FindSetRightBit (PIRQ, Local0)
                    Subtract (Local0, 0x01, Local0)
                    Store (Local0, INTR)
                    Store (One, ACTR)
                    EXFG ()
                }

                Method (ECRS, 1, NotSerialized)
                {
                    CreateByteField (EBUF, 0x02, EPLO)
                    CreateByteField (EBUF, 0x03, EPHI)
                    CreateWordField (EBUF, 0x02, EPHL)
                    CreateWordField (EBUF, 0x04, EPRL)
                    CreateWordField (EBUF, 0x06, ALM1)
                    CreateWordField (EBUF, 0x0A, E4LO)
                    CreateWordField (EBUF, 0x0C, E4RL)
                    CreateWordField (EBUF, 0x0E, ALM2)
                    CreateWordField (EBUF, 0x11, EIRQ)
                    CreateWordField (EBUF, 0x14, EDMA)
                    ENFG ()
                    Store (Arg0, LDN)
                    Store (IOAH, EPHI)
                    Store (IOAL, EPLO)
                    Store (EPHL, EPRL)
                    Add (EPHL, 0x0400, E4LO)
                    Store (E4LO, E4RL)
                    If (LEqual (EPHL, 0x03BC))
                    {
                        Store (0x0401, ALM1)
                        Store (0x0401, ALM2)
                    }
                    Else
                    {
                        Store (0x0801, ALM1)
                        Store (0x0801, ALM2)
                    }

                    Store (One, Local0)
                    Store (INTR, Local1)
                    ShiftLeft (Local0, Local1, EIRQ)
                    Store (DMCH, Local1)
                    If (LGreater (Local1, 0x03))
                    {
                        Store (0x00, EDMA)
                    }
                    Else
                    {
                        Store (One, Local0)
                        ShiftLeft (Local0, Local1, EDMA)
                    }

                    EXFG ()
                    Return (EBUF)
                }

                Method (ESRS, 2, NotSerialized)
                {
                    CreateByteField (Arg0, 0x02, LOEP)
                    CreateByteField (Arg0, 0x03, HIEP)
                    CreateWordField (Arg0, 0x11, IRQE)
                    CreateWordField (Arg0, 0x14, DMAE)
                    ENFG ()
                    Store (Arg1, LDN)
                    Store (LOEP, IOAL)
                    Store (HIEP, IOAH)
                    FindSetRightBit (IRQE, Local0)
                    Subtract (Local0, 0x01, INTR)
                    If (DMAE)
                    {
                        FindSetRightBit (DMAE, Local0)
                        Subtract (Local0, 0x01, DMCH)
                    }
                    Else
                    {
                        Store (0x04, DMCH)
                    }

                    Store (One, ACTR)
                    EXFG ()
                }

                Name (CSCP, 0x00)
                PowerResource (URP1, 0x00, 0x0000)
                {
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (CSCP)
                    }

                    Method (_ON, 0, NotSerialized)
                    {
                        Store (0x01, CSCP)
                    }

                    Method (_OFF, 0, NotSerialized)
                    {
                        Store (0x00, CSCP)
                    }
                }

                PowerResource (FDDP, 0x00, 0x0000)
                {
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (CSCP)
                    }

                    Method (_ON, 0, NotSerialized)
                    {
                        Store (0x01, CSCP)
                    }

                    Method (_OFF, 0, NotSerialized)
                    {
                        Store (0x00, CSCP)
                    }
                }

                PowerResource (LPTP, 0x00, 0x0000)
                {
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (CSCP)
                    }

                    Method (_ON, 0, NotSerialized)
                    {
                        Store (0x01, CSCP)
                    }

                    Method (_OFF, 0, NotSerialized)
                    {
                        Store (0x00, CSCP)
                    }
                }

                Name (FCRS, ResourceTemplate ()
                {
                    IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x02)
                    IO (Decode16, 0x03F2, 0x03F2, 0x01, 0x02)
                    IO (Decode16, 0x03F4, 0x03F4, 0x01, 0x02)
                    IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                    IRQNoFlags () {6}
                    DMA (Compatibility, NotBusMaster, Transfer8) {2}
                })
                Name (PBUF, ResourceTemplate ()
                {
                    IO (Decode16, 0x0000, 0x0000, 0x01, 0x08)
                    IRQNoFlags () {0}
                })
                Name (EBUF, ResourceTemplate ()
                {
                    IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                    IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                    IRQNoFlags () {7}
                    DMA (Compatibility, NotBusMaster, Transfer8) {}
                })
                Name (FPRS, ResourceTemplate ()
                {
                    StartDependentFn (0x00, 0x00)
                    {
                        IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x02)
                        IO (Decode16, 0x03F2, 0x03F2, 0x01, 0x02)
                        IO (Decode16, 0x03F4, 0x03F4, 0x01, 0x02)
                        IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                        IRQNoFlags () {6}
                        DMA (Compatibility, NotBusMaster, Transfer8) {2}
                    }
                    EndDependentFn ()
                })
                Name (C1PR, ResourceTemplate ()
                {
                    StartDependentFn (0x00, 0x00)
                    {
                        IO (Decode16, 0x03F8, 0x03F8, 0x04, 0x08)
                        IRQNoFlags () {4}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03F8, 0x03F8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03E8, 0x03E8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x02E8, 0x02E8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    EndDependentFn ()
                })
                Name (LPPR, ResourceTemplate ()
                {
                    StartDependentFn (0x00, 0x00)
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IRQNoFlags () {7}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                        IRQNoFlags () {5,7}
                    }
                    EndDependentFn ()
                })
                Name (EPRS, ResourceTemplate ()
                {
                    StartDependentFn (0x00, 0x00)
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IO (Decode16, 0x0778, 0x0778, 0x01, 0x08)
                        IRQNoFlags () {7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {1}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IO (Decode16, 0x0778, 0x0778, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {1,3}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                        IO (Decode16, 0x0678, 0x0678, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {1,3}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                        IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {1,3}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IO (Decode16, 0x0778, 0x0778, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                        IO (Decode16, 0x0678, 0x0678, 0x01, 0x08)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                        IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                        IRQNoFlags () {5,7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {}
                    }
                    EndDependentFn ()
                })
                Device (\_SB.PCI0.SBRG.UAR2)
                {
                    Method (_HID, 0, NotSerialized)
                    {
                        ENFG ()
                        Store (LDU2, LDN)
                        And (OPT1, 0x38, Local0)
                        EXFG ()
                        If (Local0)
                        {
                            Return (0x1005D041)
                        }
                        Else
                        {
                            Return (0x0105D041)
                        }
                    }

                    Name (_UID, 0x02)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (U2ST)
                        {
                            Return (GSTA (LDU2))
                        }

                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        DDIS (LDU2)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PCRS (LDU2, 0x01, 0x08))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSRS (Arg0, LDU2)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (C2PR)
                    }
                }

                Name (CNBF, Buffer (0x02)
                {
                    0xF8, 0x03
                })
                Method (UABS, 1, NotSerialized)
                {
                    ENFG ()
                    Store (Arg0, LDN)
                    CreateByteField (CNBF, 0x00, IOLO)
                    CreateByteField (CNBF, 0x01, IOHI)
                    CreateWordField (CNBF, 0x00, IOAD)
                    Store (IOAL, IOLO)
                    Store (IOAH, IOHI)
                    EXFG ()
                    Return (IOAD)
                }

                PowerResource (URP2, 0x00, 0x0000)
                {
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (CSCP)
                    }

                    Method (_ON, 0, NotSerialized)
                    {
                        Store (0x01, CSCP)
                    }

                    Method (_OFF, 0, NotSerialized)
                    {
                        Store (0x00, CSCP)
                    }
                }

                Name (C2PR, ResourceTemplate ()
                {
                    StartDependentFn (0x00, 0x00)
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x04, 0x08)
                        IRQNoFlags () {3}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03F8, 0x03F8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x03E8, 0x03E8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16, 0x02E8, 0x02E8, 0x04, 0x08)
                        IRQNoFlags () {3,4,10,11}
                    }
                    EndDependentFn ()
                })
                Device (RMSC)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x10)
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0010, 0x0010, 0x00, 0x10)
                        IO (Decode16, 0x0022, 0x0022, 0x00, 0x1E)
                        IO (Decode16, 0x0044, 0x0044, 0x00, 0x0A)
                        IO (Decode16, 0x0050, 0x0050, 0x00, 0x10)
                        IO (Decode16, 0x0063, 0x0063, 0x00, 0x01)
                        IO (Decode16, 0x0065, 0x0065, 0x00, 0x01)
                        IO (Decode16, 0x0067, 0x0067, 0x00, 0x09)
                        IO (Decode16, 0x0072, 0x0072, 0x00, 0x0E)
                        IO (Decode16, 0x0080, 0x0080, 0x00, 0x01)
                        IO (Decode16, 0x0084, 0x0084, 0x00, 0x03)
                        IO (Decode16, 0x0088, 0x0088, 0x00, 0x01)
                        IO (Decode16, 0x008C, 0x008C, 0x00, 0x03)
                        IO (Decode16, 0x0090, 0x0090, 0x00, 0x10)
                        IO (Decode16, 0x00A2, 0x00A2, 0x00, 0x1E)
                        IO (Decode16, 0x00E0, 0x00E0, 0x00, 0x10)
                        IO (Decode16, 0x04D0, 0x04D0, 0x00, 0x02)
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (CRS, 0x82, GP00)
                        CreateWordField (CRS, 0x84, GP01)
                        CreateByteField (CRS, 0x87, GP0L)
                        Store (PMBS, GP00)
                        Store (PMBS, GP01)
                        Store (PMLN, GP0L)
                        If (GPBS)
                        {
                            CreateWordField (CRS, 0x8A, GP20)
                            CreateWordField (CRS, 0x8C, GP21)
                            CreateByteField (CRS, 0x8F, GP2L)
                            Store (GPBS, GP20)
                            Store (GPBS, GP21)
                            Store (GPLN, GP2L)
                        }

                        Return (CRS)
                    }
                }

                Device (FWH)
                {
                    Name (_HID, EisaId ("INT0800"))
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                    })
                    CreateDWordField (CRS, 0x04, BS00)
                    CreateDWordField (CRS, 0x08, BL00)
                    CreateDWordField (CRS, 0x10, BS10)
                    CreateDWordField (CRS, 0x14, BL10)
                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (0xFF800000, Local0)
                        FindSetRightBit (FHD0, Local1)
                        Decrement (Local1)
                        If (Local1)
                        {
                            Multiply (Local1, 0x00080000, Local1)
                        }

                        Add (Local0, Local1, Local2)
                        Store (Local2, BS00)
                        Add (BS00, 0x00400000, BS10)
                        Subtract (0x00, BS10, BL00)
                        Store (BL00, BL10)
                        Return (CRS)
                    }
                }

                Device (FWHE)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x03)
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateDWordField (CRS, 0x04, BS00)
                        CreateDWordField (CRS, 0x08, BL00)
                        If (LEqual (^^FWH.BS00, 0x00))
                        {
                            ^^FWH._CRS ()
                        }

                        Add (^^FWH.BS00, ^^FWH.BL00, BS00)
                        Subtract (^^FWH.BS10, BS00, BL00)
                        Return (CRS)
                    }
                }

                OperationRegion (FHR0, PCI_Config, 0xD9, 0x01)
                Field (FHR0, ByteAcc, NoLock, Preserve)
                {
                    FHD0,   8
                }

                Device (OMSC)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x00)
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                        IO (Decode16, 0x0000, 0x0000, 0x00, 0x00)
                        Memory32Fixed (ReadOnly, 0xEEC00000, 0x00004000)
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                        Memory32Fixed (ReadOnly, 0xE0000000, 0x10000000)
                        Memory32Fixed (ReadOnly, 0xFED13000, 0x00001000)
                        Memory32Fixed (ReadOnly, 0xFED14000, 0x00004000)
                        Memory32Fixed (ReadOnly, 0xFED18000, 0x00001000)
                        Memory32Fixed (ReadOnly, 0xFED19000, 0x00001000)
                        Memory32Fixed (ReadOnly, 0xFED1C000, 0x00004000)
                        Memory32Fixed (ReadOnly, 0xFED20000, 0x00080000)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (CRS, 0x02, GP00)
                        CreateWordField (CRS, 0x04, GP01)
                        CreateByteField (CRS, 0x07, GP0L)
                        Store (PMBS, GP00)
                        Store (PMBS, GP01)
                        Store (PMLN, GP0L)
                        If (LAnd (LNot (LEqual (SPIO, 0x03F0)), LGreater (SPIO, 0xF0)))
                        {
                            CreateWordField (CRS, 0x0A, GP10)
                            CreateWordField (CRS, 0x0C, GP11)
                            CreateByteField (CRS, 0x0F, GPL1)
                            Store (SPIO, GP10)
                            Store (SPIO, GP11)
                            Store (0x02, GPL1)
                        }

                        If (IO1B)
                        {
                            CreateWordField (CRS, 0x12, GP20)
                            CreateWordField (CRS, 0x14, GP21)
                            CreateByteField (CRS, 0x17, GP2L)
                            Store (IO1B, GP20)
                            Store (IO1B, GP21)
                            Store (IO1L, GP2L)
                        }

                        If (GPBS)
                        {
                            CreateWordField (CRS, 0x1A, GP30)
                            CreateWordField (CRS, 0x1C, GP31)
                            CreateByteField (CRS, 0x1F, GP3L)
                            Store (GPBS, GP30)
                            Store (GPBS, GP31)
                            Store (GPLN, GP3L)
                        }

                        CreateDWordField (CRS, 0x34, RLIM)
                        CreateDWordField (CRS, 0x30, RBAS)
                        Store (0xFED1A000, RBAS)
                        Store (0x4000, RLIM)
                        If (APIC)
                        {
                            CreateDWordField (CRS, 0x34, ML01)
                            CreateDWordField (CRS, 0x30, MB01)
                            CreateDWordField (CRS, 0x40, ML02)
                            CreateDWordField (CRS, 0x3C, MB02)
                            Store (0xFEC00000, MB01)
                            Store (0x1000, ML01)
                            Store (0xFEE00000, MB02)
                            Store (0x1000, ML02)
                        }

                        Return (CRS)
                    }
                }

                Device (\_SB.RMEM)
                {
                    Name (_HID, EisaId ("PNP0C01"))
                    Name (_UID, 0x01)
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadWrite, 0x00000000, 0x000A0000)
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                        Memory32Fixed (ReadOnly, 0x000E0000, 0x00020000)
                        Memory32Fixed (ReadWrite, 0x00100000, 0x00000000)
                        Memory32Fixed (ReadOnly, 0x00000000, 0x00000000)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateDWordField (CRS, 0x10, BAS1)
                        CreateDWordField (CRS, 0x14, LEN1)
                        CreateDWordField (CRS, 0x1C, BAS2)
                        CreateDWordField (CRS, 0x20, LEN2)
                        CreateDWordField (CRS, 0x2C, LEN3)
                        CreateDWordField (CRS, 0x34, BAS4)
                        CreateDWordField (CRS, 0x38, LEN4)
                        If (OSFL ()) {}
                        Else
                        {
                            If (MG1B)
                            {
                                If (LGreater (MG1B, 0x000C0000))
                                {
                                    Store (0x000C0000, BAS1)
                                    Subtract (MG1B, BAS1, LEN1)
                                }
                            }
                            Else
                            {
                                Store (0x000C0000, BAS1)
                                Store (0x00020000, LEN1)
                            }

                            If (Add (MG1B, MG1L, Local0))
                            {
                                Store (Local0, BAS2)
                                Subtract (0x00100000, BAS2, LEN2)
                            }
                        }

                        Subtract (MG2B, 0x00100000, LEN3)
                        Add (MG2B, MG2L, BAS4)
                        Subtract (0x00, BAS4, LEN4)
                        Return (CRS)
                    }
                }
            }

            Device (IDE1)
            {
                Name (_ADR, 0x001F0002)
                Name (REGF, 0x01)
                Method (_REG, 2, NotSerialized)
                {
                    If (LEqual (Arg0, 0x02))
                    {
                        Store (Arg1, REGF)
                    }
                }

                OperationRegion (BAR0, PCI_Config, 0x00, 0x0100)
                Field (BAR0, DWordAcc, NoLock, Preserve)
                {
                    ID32,   32, 
                    Offset (0x40), 
                    TIMP,   16, 
                    TIMS,   16, 
                    STMP,   4, 
                    STMS,   4, 
                    Offset (0x48), 
                    UDMP,   2, 
                    UDMS,   2, 
                    Offset (0x4A), 
                    UDTP,   6, 
                    Offset (0x4B), 
                    UDTS,   6, 
                    Offset (0x54), 
                    PCB0,   2, 
                    SCB0,   2, 
                    PCA0,   2, 
                    SCA0,   2, 
                        ,   4, 
                    FPB0,   2, 
                    FSB0,   2, 
                    Offset (0x90), 
                    MAP1,   3, 
                    Offset (0x92), 
                    PEN1,   2
                }

                Name (TIM0, Package (0x09)
                {
                    Package (0x04)
                    {
                        0x78, 
                        0xB4, 
                        0xF0, 
                        0x0384
                    }, 

                    Package (0x04)
                    {
                        0x23, 
                        0x21, 
                        0x10, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0B, 
                        0x09, 
                        0x04, 
                        0x00
                    }, 

                    Package (0x06)
                    {
                        0x70, 
                        0x49, 
                        0x36, 
                        0x27, 
                        0x19, 
                        0x11
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x01, 
                        0x02, 
                        0x01, 
                        0x02, 
                        0x01
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x00, 
                        0x00, 
                        0x01, 
                        0x01, 
                        0x01
                    }, 

                    Package (0x06)
                    {
                        0x00, 
                        0x00, 
                        0x00, 
                        0x00, 
                        0x00, 
                        0x01
                    }, 

                    Package (0x04)
                    {
                        0x04, 
                        0x03, 
                        0x02, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x02, 
                        0x01, 
                        0x00, 
                        0x00
                    }
                })
                Name (\PTSV, 0x00)
                Name (\MPSV, 0x00)
                Method (_INI, 0, NotSerialized)
                {
                    Store (MAP1, MPSV)
                    Store (PEN1, PTSV)
                }

                Name (TMD0, Buffer (0x14) {})
                CreateDWordField (TMD0, 0x00, PIO0)
                CreateDWordField (TMD0, 0x04, DMA0)
                CreateDWordField (TMD0, 0x08, PIO1)
                CreateDWordField (TMD0, 0x0C, DMA1)
                CreateDWordField (TMD0, 0x10, CHNF)
                Name (GTIM, 0x00)
                Name (GSTM, 0x00)
                Name (GUDM, 0x00)
                Name (GUDT, 0x00)
                Name (GCB0, 0x00)
                Name (GFB0, 0x00)
                Device (CHN0)
                {
                    Name (_ADR, 0x00)
                    OperationRegion (IDE0, SystemIO, 0x01F0, 0x08)
                    Field (IDE0, ByteAcc, NoLock, Preserve)
                    {
                        DATA,   8, 
                        FEAT,   8, 
                        SECC,   8, 
                        SECN,   8, 
                        CYLL,   8, 
                        CYLH,   8, 
                        DVHD,   8, 
                        STAT,   8
                    }

                    Name (ATP0, 0x01)
                    Name (ATP1, 0x01)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Return (GTM (TIMP, STMP, UDMP, UDTP, PCB0, FPB0))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        Store (Arg0, Debug)
                        Store (Arg0, TMD0)
                        Store (TIMP, GTIM)
                        Store (UDTP, GUDT)
                        If (STM ())
                        {
                            Store (GTIM, TIMP)
                            Store (GSTM, STMP)
                            Store (GUDM, UDMP)
                            Store (GUDT, UDTP)
                            Store (GCB0, PCB0)
                            Store (GFB0, FPB0)
                        }

                        Store (GTF (0x00, Arg1), ATA0)
                        Store (GTF (0x01, Arg2), ATA1)
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA0))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA1))
                        }
                    }
                }

                Device (CHN1)
                {
                    Name (_ADR, 0x01)
                    OperationRegion (IDE1, SystemIO, 0x0170, 0x08)
                    Field (IDE1, ByteAcc, NoLock, Preserve)
                    {
                        DATA,   8, 
                        FEAT,   8, 
                        SECC,   8, 
                        SECN,   8, 
                        CYLL,   8, 
                        CYLH,   8, 
                        DVHD,   8, 
                        STAT,   8
                    }

                    Name (ATS0, 0x01)
                    Name (ATS1, 0x01)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Return (GTM (TIMS, STMS, UDMS, UDTS, SCB0, FSB0))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        Store (Arg0, Debug)
                        Store (Arg0, TMD0)
                        Store (TIMS, GTIM)
                        Store (UDTS, GUDT)
                        If (STM ())
                        {
                            Store (GTIM, TIMS)
                            Store (GSTM, STMS)
                            Store (GUDM, UDMS)
                            Store (GUDT, UDTS)
                            Store (GCB0, SCB0)
                            Store (GFB0, FSB0)
                        }

                        Store (GTF (0x00, Arg1), ATA2)
                        Store (GTF (0x01, Arg2), ATA3)
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA2))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Return (RATA (ATA3))
                        }
                    }

                    Name (TIM1, Buffer (0x14) {})
                    CreateDWordField (TIM1, 0x00, MPIO)
                    CreateDWordField (TIM1, 0x04, MDMA)
                    CreateDWordField (TIM1, 0x08, SPIO)
                    CreateDWordField (TIM1, 0x0C, SDMA)
                    CreateDWordField (TIM1, 0x10, FLGS)
                    Method (_PS3, 0, NotSerialized)
                    {
                        If (MCTH (\_OS, "Microsoft Windows"))
                        {
                            Store (_GTM (), TIM1)
                        }
                    }

                    Name (BOOT, 0x00)
                    Method (_PS0, 0, NotSerialized)
                    {
                        If (LEqual (ID32, 0xFFFFFFFF))
                        {
                            Noop
                        }
                        Else
                        {
                            If (LNot (LEqual (MAP1, MPSV)))
                            {
                                Store (MPSV, MAP1)
                                Store (0x21, DBG8)
                                Sleep (0x07D0)
                            }

                            If (LNot (LEqual (PEN1, PTSV)))
                            {
                                And (Not (PTSV), PEN1, PEN1)
                                Sleep (0x01)
                                Store (PTSV, PEN1)
                                Sleep (0x0A)
                            }
                        }

                        If (MCTH (\_OS, "Microsoft Windows"))
                        {
                            If (BOOT)
                            {
                                If (And (DRVI, 0x20))
                                {
                                    PRGT (MPIO, MDMA, FLGS, 0xA0)
                                }

                                If (And (DRVI, 0x80))
                                {
                                    PRGT (SPIO, SDMA, FLGS, 0xB0)
                                }
                            }

                            Store (0x01, BOOT)
                        }
                    }

                    Method (PRGT, 4, NotSerialized)
                    {
                        Store (Arg3, DVHD)
                        If (And (Not (LEqual (Arg0, 0xFFFFFFFF)), Not (LEqual (Arg0, 0x00))))
                        {
                            While (LEqual (And (STAT, 0x80), 0x80)) {}
                            Store (0x03, FEAT)
                            Store (Match (DerefOf (Index (TIM0, 0x00)), MEQ, Arg0, MTR, 0x00, 0x00), Local0)
                            Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x07)), Local0)), Local0)
                            Store (Local0, SECC)
                            Store (0x00, SECN)
                            Store (0x00, CYLL)
                            Store (0x00, CYLH)
                            Store (Arg3, DVHD)
                            Store (0xEF, STAT)
                        }

                        If (And (Not (LEqual (Arg0, 0xFFFFFFFF)), Not (LEqual (Arg0, 0x00))))
                        {
                            While (LEqual (And (STAT, 0x80), 0x80)) {}
                            Store (0x03, FEAT)
                            Store (0x00, Local0)
                            If (LEqual (Arg3, 0xA0))
                            {
                                If (And (Arg2, 0x01))
                                {
                                    Store (0x01, Local0)
                                }
                            }
                            Else
                            {
                                If (And (Arg2, 0x04))
                                {
                                    Store (0x01, Local0)
                                }
                            }

                            If (LEqual (Local0, 0x01))
                            {
                                Store (Match (DerefOf (Index (TIM0, 0x03)), MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                                Or (0x40, Local0, Local0)
                            }
                            Else
                            {
                                Store (Match (DerefOf (Index (TIM0, 0x00)), MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                                Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x08)), Local0)), Local0)
                            }

                            Store (Local0, SECC)
                            Store (0x00, SECN)
                            Store (0x00, CYLL)
                            Store (0x00, CYLH)
                            Store (Arg3, DVHD)
                            Store (0xEF, STAT)
                        }
                    }
                }

                Method (GTM, 6, Serialized)
                {
                    Store (Ones, PIO0)
                    Store (PIO0, PIO1)
                    Store (PIO0, DMA0)
                    Store (PIO0, DMA1)
                    Store (Zero, CHNF)
                    If (REGF) {}
                    Else
                    {
                        Return (TMD0)
                    }

                    If (And (Arg0, 0x02))
                    {
                        Or (CHNF, 0x02, CHNF)
                    }

                    ShiftRight (And (Arg0, 0x3300), 0x08, Local5)
                    Store (Match (DerefOf (Index (TIM0, 0x01)), MLE, Local5, MTR, 0x00, 0x00), Local6)
                    Store (DerefOf (Index (DerefOf (Index (TIM0, 0x00)), Local6)), Local7)
                    Store (Local7, DMA0)
                    If (And (Arg0, 0x08))
                    {
                        Store (0x0384, PIO0)
                    }
                    Else
                    {
                        Store (Local7, PIO0)
                    }

                    If (And (Arg0, 0x20))
                    {
                        Or (CHNF, 0x08, CHNF)
                    }

                    If (And (Arg0, 0x4000))
                    {
                        Or (CHNF, 0x10, CHNF)
                        Store (Match (DerefOf (Index (TIM0, 0x02)), MLE, Arg1, MTR, 0x00, 0x00), Local5)
                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x00)), Local5)), Local6)
                        Store (Local6, DMA1)
                        If (And (Arg0, 0x80))
                        {
                            Store (0x0384, PIO1)
                        }
                        Else
                        {
                            Store (Local6, PIO1)
                        }
                    }

                    If (And (Arg2, 0x01))
                    {
                        And (Arg3, 0x03, Local5)
                        If (LAnd (And (Arg5, 0x01), LEqual (Local5, 0x01)))
                        {
                            Store (0x05, Local5)
                        }
                        Else
                        {
                            If (And (Arg4, 0x01))
                            {
                                Store (0x04, Local5)
                            }
                        }

                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local5)), DMA0)
                        Or (CHNF, 0x01, CHNF)
                    }

                    If (And (Arg2, 0x02))
                    {
                        And (ShiftRight (Arg3, 0x04), 0x03, Local5)
                        If (LAnd (And (Arg5, 0x02), LEqual (Local5, 0x01)))
                        {
                            Store (0x05, Local5)
                        }
                        Else
                        {
                            If (And (Arg4, 0x02))
                            {
                                Store (0x04, Local5)
                            }
                        }

                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local5)), DMA1)
                        Or (CHNF, 0x04, CHNF)
                    }

                    Store (TMD0, Debug)
                    Return (TMD0)
                }

                Method (STM, 0, Serialized)
                {
                    If (REGF) {}
                    Else
                    {
                        Return (0x00)
                    }

                    And (GTIM, 0x8044, GTIM)
                    Store (0x00, GSTM)
                    Store (0x00, GUDM)
                    Store (0x00, GCB0)
                    And (GUDT, 0xCC, GUDT)
                    Store (0x00, GFB0)
                    If (And (CHNF, 0x01))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMA0, MTR, 0x00, 0x00), Local0)
                        If (LGreater (Local0, 0x05))
                        {
                            Store (0x05, Local0)
                        }

                        Or (GUDT, DerefOf (Index (DerefOf (Index (TIM0, 0x04)), Local0)), GUDT)
                        Or (GCB0, DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Local0)), GCB0)
                        Or (GFB0, DerefOf (Index (DerefOf (Index (TIM0, 0x06)), Local0)), GFB0)
                        Or (GUDM, 0x01, GUDM)
                    }
                    Else
                    {
                        If (Or (LEqual (PIO0, Ones), LEqual (PIO0, 0x00)))
                        {
                            If (And (LLess (DMA0, Ones), LGreater (DMA0, 0x00)))
                            {
                                Store (DMA0, PIO0)
                                Or (GTIM, 0x08, GTIM)
                            }
                        }
                    }

                    If (And (CHNF, 0x04))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMA1, MTR, 0x00, 0x00), Local0)
                        If (LGreater (Local0, 0x05))
                        {
                            Store (0x05, Local0)
                        }

                        Or (GUDT, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x04)), Local0)), 0x04), GUDT)
                        Or (GCB0, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Local0)), 0x01), GCB0)
                        Or (GFB0, ShiftLeft (DerefOf (Index (DerefOf (Index (TIM0, 0x06)), Local0)), 0x01), GFB0)
                        Or (GUDM, 0x02, GUDM)
                    }
                    Else
                    {
                        If (Or (LEqual (PIO1, Ones), LEqual (PIO1, 0x00)))
                        {
                            If (And (LLess (DMA1, Ones), LGreater (DMA1, 0x00)))
                            {
                                Store (DMA1, PIO1)
                                Or (GTIM, 0x80, GTIM)
                            }
                        }
                    }

                    If (And (CHNF, 0x02))
                    {
                        Or (GTIM, 0x03, GTIM)
                    }

                    If (And (CHNF, 0x08))
                    {
                        Or (GTIM, 0x30, GTIM)
                    }

                    And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIO0, MTR, 0x00, 0x00), 0x03, Local0)
                    Store (DerefOf (Index (DerefOf (Index (TIM0, 0x01)), Local0)), Local1)
                    ShiftLeft (Local1, 0x08, Local2)
                    Or (GTIM, Local2, GTIM)
                    If (And (CHNF, 0x10))
                    {
                        Or (GTIM, 0x4000, GTIM)
                        And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIO1, MTR, 0x00, 0x00), 0x03, Local0)
                        Store (DerefOf (Index (DerefOf (Index (TIM0, 0x02)), Local0)), GSTM)
                    }

                    Return (0x01)
                }

                Name (AT01, Buffer (0x07)
                {
                    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEF
                })
                Name (AT02, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90
                })
                Name (AT03, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6
                })
                Name (AT04, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91
                })
                Name (AT05, Buffer (0x07)
                {
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF5
                })
                Name (ATA0, Buffer (0x1D) {})
                Name (ATA1, Buffer (0x1D) {})
                Name (ATA2, Buffer (0x1D) {})
                Name (ATA3, Buffer (0x1D) {})
                Name (ATAB, Buffer (0x1D) {})
                CreateByteField (ATAB, 0x00, CMDC)
                Method (GTFB, 3, Serialized)
                {
                    Multiply (CMDC, 0x38, Local0)
                    Add (Local0, 0x08, Local1)
                    CreateField (ATAB, Local1, 0x38, CMDX)
                    Multiply (CMDC, 0x07, Local0)
                    CreateByteField (ATAB, Add (Local0, 0x02), A001)
                    CreateByteField (ATAB, Add (Local0, 0x06), A005)
                    Store (Arg0, CMDX)
                    Store (Arg1, A001)
                    Store (Arg2, A005)
                    Increment (CMDC)
                }

                Method (GTF, 2, Serialized)
                {
                    Store (Arg1, Debug)
                    Store (0x00, CMDC)
                    Name (ID49, 0x0C00)
                    Name (ID59, 0x00)
                    Name (ID53, 0x04)
                    Name (ID63, 0x0F00)
                    Name (ID88, 0x0F00)
                    Name (IRDY, 0x01)
                    Name (PIOT, 0x00)
                    Name (DMAT, 0x00)
                    If (LEqual (SizeOf (Arg1), 0x0200))
                    {
                        CreateWordField (Arg1, 0x62, IW49)
                        Store (IW49, ID49)
                        CreateWordField (Arg1, 0x6A, IW53)
                        Store (IW53, ID53)
                        CreateWordField (Arg1, 0x7E, IW63)
                        Store (IW63, ID63)
                        CreateWordField (Arg1, 0x76, IW59)
                        Store (IW59, ID59)
                        CreateWordField (Arg1, 0xB0, IW88)
                        Store (IW88, ID88)
                        CreateWordField (Arg1, 0xA4, IW82)
                    }

                    Store (0xA0, Local7)
                    If (Arg0)
                    {
                        Store (0xB0, Local7)
                        And (CHNF, 0x08, IRDY)
                        If (And (CHNF, 0x10))
                        {
                            Store (PIO1, PIOT)
                        }
                        Else
                        {
                            Store (PIO0, PIOT)
                        }

                        If (And (CHNF, 0x04))
                        {
                            If (And (CHNF, 0x10))
                            {
                                Store (DMA1, DMAT)
                            }
                            Else
                            {
                                Store (DMA0, DMAT)
                            }
                        }
                    }
                    Else
                    {
                        And (CHNF, 0x02, IRDY)
                        Store (PIO0, PIOT)
                        If (And (CHNF, 0x01))
                        {
                            Store (DMA0, DMAT)
                        }
                    }

                    If (LAnd (LAnd (And (ID53, 0x04), And (ID88, 0xFF00)), DMAT))
                    {
                        Store (Match (DerefOf (Index (TIM0, 0x03)), MLE, DMAT, MTR, 0x00, 0x00), Local1)
                        If (LGreater (Local1, 0x05))
                        {
                            Store (0x05, Local1)
                        }

                        GTFB (AT01, Or (0x40, Local1), Local7)
                    }
                    Else
                    {
                        If (LAnd (And (ID63, 0xFF00), PIOT))
                        {
                            And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIOT, MTR, 0x00, 0x00), 0x03, Local0)
                            Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x08)), Local0)), Local1)
                            GTFB (AT01, Local1, Local7)
                        }
                    }

                    If (IRDY)
                    {
                        And (Match (DerefOf (Index (TIM0, 0x00)), MGE, PIOT, MTR, 0x00, 0x00), 0x03, Local0)
                        Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x07)), Local0)), Local1)
                        GTFB (AT01, Local1, Local7)
                    }
                    Else
                    {
                        If (And (ID49, 0x0400))
                        {
                            GTFB (AT01, 0x01, Local7)
                        }
                    }

                    If (LAnd (And (ID59, 0x0100), And (ID59, 0xFF)))
                    {
                        GTFB (AT03, And (ID59, 0xFF), Local7)
                    }

                    If (LAnd (IW82, 0x02))
                    {
                        GTFB (AT05, 0x00, Local7)
                    }

                    Store (ATAB, Debug)
                    Return (ATAB)
                }

                Method (RATA, 1, NotSerialized)
                {
                    CreateByteField (Arg0, 0x00, CMDN)
                    Multiply (CMDN, 0x38, Local0)
                    CreateField (Arg0, 0x08, Local0, RETB)
                    Store (RETB, Debug)
                    Return (RETB)
                }
            }

            Device (PEX1)
            {
                Name (_ADR, 0x001C0000)
                OperationRegion (ORP0, PCI_Config, 0x00, 0xFF)
                Field (ORP0, AnyAcc, NoLock, Preserve)
                {
                    RPID,   32, 
                    Offset (0x34), 
                    CPLT,   8, 
                    Offset (0x58), 
                    SSLC,   10, 
                    Offset (0x5A), 
                    SSLS,   7, 
                    Offset (0x5C), 
                    Offset (0x60), 
                    SQID,   16, 
                    SPME,   1, 
                    SPMP,   1, 
                    Offset (0x64), 
                    Offset (0xB8), 
                    NSLC,   10, 
                    Offset (0xBA), 
                    NSLS,   7, 
                    Offset (0xBC), 
                    Offset (0xC0), 
                    NQID,   16, 
                    NPME,   1, 
                    NPMP,   1, 
                    Offset (0xC4), 
                    Offset (0xDC), 
                        ,   31, 
                    RPSC,   1
                }

                Method (HDDN, 1, NotSerialized)
                {
                    If (LEqual (RPID, Ones))
                    {
                        Return (One)
                    }
                    Else
                    {
                        Return (Zero)
                    }
                }

                Method (XPMH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        Store (NPME, Local0)
                        While (NPME)
                        {
                            Store (0x01, NPME)
                        }
                    }
                    Else
                    {
                        Store (SPME, Local0)
                        While (SPME)
                        {
                            Store (0x01, SPME)
                        }

                        While (RPSC)
                        {
                            Store (0x01, RPSC)
                        }
                    }

                    Return (Local0)
                }

                Method (XHPH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        And (NSLC, NSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (NSLS, NSLS)
                    }
                    Else
                    {
                        And (SSLC, SSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (SSLS, SSLS)
                    }

                    Return (Local0)
                }

                Method (SCIC, 2, NotSerialized)
                {
                    OperationRegion (ORP7, PCI_Config, 0xD8, 0x04)
                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        HPCS,   1, 
                        PMCS,   1
                    }

                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        ICHC,   2
                    }

                    OperationRegion (ORP8, PCI_Config, 0xEC, 0x04)
                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                        GPCN,   1, 
                        HPCN,   1, 
                        PMCN,   1
                    }

                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                            ,   1, 
                        MCHC,   2
                    }

                    If (LNot (HDDN (Arg0)))
                    {
                        If (LNot (LGreater (Arg0, 0x03)))
                        {
                            And (Arg1, 0x03, ICHC)
                        }

                        If (LEqual (Arg0, 0x08))
                        {
                            And (Arg1, 0x03, MCHC)
                        }
                    }
                }

                Method (DP80, 1, NotSerialized)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x0BB8)
                    Store (0x00, DBG8)
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x09, 0x04))
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (PICM)
                    {
                        Return (AR03)
                    }

                    Return (PR03)
                }
            }

            Device (PEX2)
            {
                Name (_ADR, 0x001C0001)
                OperationRegion (ORP0, PCI_Config, 0x00, 0xFF)
                Field (ORP0, AnyAcc, NoLock, Preserve)
                {
                    RPID,   32, 
                    Offset (0x34), 
                    CPLT,   8, 
                    Offset (0x58), 
                    SSLC,   10, 
                    Offset (0x5A), 
                    SSLS,   7, 
                    Offset (0x5C), 
                    Offset (0x60), 
                    SQID,   16, 
                    SPME,   1, 
                    SPMP,   1, 
                    Offset (0x64), 
                    Offset (0xB8), 
                    NSLC,   10, 
                    Offset (0xBA), 
                    NSLS,   7, 
                    Offset (0xBC), 
                    Offset (0xC0), 
                    NQID,   16, 
                    NPME,   1, 
                    NPMP,   1, 
                    Offset (0xC4), 
                    Offset (0xDC), 
                        ,   31, 
                    RPSC,   1
                }

                Method (HDDN, 1, NotSerialized)
                {
                    If (LEqual (RPID, Ones))
                    {
                        Return (One)
                    }
                    Else
                    {
                        Return (Zero)
                    }
                }

                Method (XPMH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        Store (NPME, Local0)
                        While (NPME)
                        {
                            Store (0x01, NPME)
                        }
                    }
                    Else
                    {
                        Store (SPME, Local0)
                        While (SPME)
                        {
                            Store (0x01, SPME)
                        }

                        While (RPSC)
                        {
                            Store (0x01, RPSC)
                        }
                    }

                    Return (Local0)
                }

                Method (XHPH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        And (NSLC, NSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (NSLS, NSLS)
                    }
                    Else
                    {
                        And (SSLC, SSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (SSLS, SSLS)
                    }

                    Return (Local0)
                }

                Method (SCIC, 2, NotSerialized)
                {
                    OperationRegion (ORP7, PCI_Config, 0xD8, 0x04)
                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        HPCS,   1, 
                        PMCS,   1
                    }

                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        ICHC,   2
                    }

                    OperationRegion (ORP8, PCI_Config, 0xEC, 0x04)
                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                        GPCN,   1, 
                        HPCN,   1, 
                        PMCN,   1
                    }

                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                            ,   1, 
                        MCHC,   2
                    }

                    If (LNot (HDDN (Arg0)))
                    {
                        If (LNot (LGreater (Arg0, 0x03)))
                        {
                            And (Arg1, 0x03, ICHC)
                        }

                        If (LEqual (Arg0, 0x08))
                        {
                            And (Arg1, 0x03, MCHC)
                        }
                    }
                }

                Method (DP80, 1, NotSerialized)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x0BB8)
                    Store (0x00, DBG8)
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x09, 0x04))
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (PICM)
                    {
                        Return (AR04)
                    }

                    Return (PR04)
                }
            }

            Device (PEX3)
            {
                Name (_ADR, 0x001C0002)
                OperationRegion (ORP0, PCI_Config, 0x00, 0xFF)
                Field (ORP0, AnyAcc, NoLock, Preserve)
                {
                    RPID,   32, 
                    Offset (0x34), 
                    CPLT,   8, 
                    Offset (0x58), 
                    SSLC,   10, 
                    Offset (0x5A), 
                    SSLS,   7, 
                    Offset (0x5C), 
                    Offset (0x60), 
                    SQID,   16, 
                    SPME,   1, 
                    SPMP,   1, 
                    Offset (0x64), 
                    Offset (0xB8), 
                    NSLC,   10, 
                    Offset (0xBA), 
                    NSLS,   7, 
                    Offset (0xBC), 
                    Offset (0xC0), 
                    NQID,   16, 
                    NPME,   1, 
                    NPMP,   1, 
                    Offset (0xC4), 
                    Offset (0xDC), 
                        ,   31, 
                    RPSC,   1
                }

                Method (HDDN, 1, NotSerialized)
                {
                    If (LEqual (RPID, Ones))
                    {
                        Return (One)
                    }
                    Else
                    {
                        Return (Zero)
                    }
                }

                Method (XPMH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        Store (NPME, Local0)
                        While (NPME)
                        {
                            Store (0x01, NPME)
                        }
                    }
                    Else
                    {
                        Store (SPME, Local0)
                        While (SPME)
                        {
                            Store (0x01, SPME)
                        }

                        While (RPSC)
                        {
                            Store (0x01, RPSC)
                        }
                    }

                    Return (Local0)
                }

                Method (XHPH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        And (NSLC, NSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (NSLS, NSLS)
                    }
                    Else
                    {
                        And (SSLC, SSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (SSLS, SSLS)
                    }

                    Return (Local0)
                }

                Method (SCIC, 2, NotSerialized)
                {
                    OperationRegion (ORP7, PCI_Config, 0xD8, 0x04)
                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        HPCS,   1, 
                        PMCS,   1
                    }

                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        ICHC,   2
                    }

                    OperationRegion (ORP8, PCI_Config, 0xEC, 0x04)
                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                        GPCN,   1, 
                        HPCN,   1, 
                        PMCN,   1
                    }

                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                            ,   1, 
                        MCHC,   2
                    }

                    If (LNot (HDDN (Arg0)))
                    {
                        If (LNot (LGreater (Arg0, 0x03)))
                        {
                            And (Arg1, 0x03, ICHC)
                        }

                        If (LEqual (Arg0, 0x08))
                        {
                            And (Arg1, 0x03, MCHC)
                        }
                    }
                }

                Method (DP80, 1, NotSerialized)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x0BB8)
                    Store (0x00, DBG8)
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x09, 0x04))
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (PICM)
                    {
                        Return (AR05)
                    }

                    Return (PR05)
                }
            }

            Device (PEX4)
            {
                Name (_ADR, 0x001C0003)
                OperationRegion (ORP0, PCI_Config, 0x00, 0xFF)
                Field (ORP0, AnyAcc, NoLock, Preserve)
                {
                    RPID,   32, 
                    Offset (0x34), 
                    CPLT,   8, 
                    Offset (0x58), 
                    SSLC,   10, 
                    Offset (0x5A), 
                    SSLS,   7, 
                    Offset (0x5C), 
                    Offset (0x60), 
                    SQID,   16, 
                    SPME,   1, 
                    SPMP,   1, 
                    Offset (0x64), 
                    Offset (0xB8), 
                    NSLC,   10, 
                    Offset (0xBA), 
                    NSLS,   7, 
                    Offset (0xBC), 
                    Offset (0xC0), 
                    NQID,   16, 
                    NPME,   1, 
                    NPMP,   1, 
                    Offset (0xC4), 
                    Offset (0xDC), 
                        ,   31, 
                    RPSC,   1
                }

                Method (HDDN, 1, NotSerialized)
                {
                    If (LEqual (RPID, Ones))
                    {
                        Return (One)
                    }
                    Else
                    {
                        Return (Zero)
                    }
                }

                Method (XPMH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        Store (NPME, Local0)
                        While (NPME)
                        {
                            Store (0x01, NPME)
                        }
                    }
                    Else
                    {
                        Store (SPME, Local0)
                        While (SPME)
                        {
                            Store (0x01, SPME)
                        }

                        While (RPSC)
                        {
                            Store (0x01, RPSC)
                        }
                    }

                    Return (Local0)
                }

                Method (XHPH, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    If (HDDN (Arg0))
                    {
                        Return (Local0)
                    }

                    If (LNot (LLess (Arg0, 0x08)))
                    {
                        And (NSLC, NSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (NSLS, NSLS)
                    }
                    Else
                    {
                        And (SSLC, SSLS, Local0)
                        And (Local0, 0x0D, Local0)
                        Store (SSLS, SSLS)
                    }

                    Return (Local0)
                }

                Method (SCIC, 2, NotSerialized)
                {
                    OperationRegion (ORP7, PCI_Config, 0xD8, 0x04)
                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        HPCS,   1, 
                        PMCS,   1
                    }

                    Field (ORP7, AnyAcc, NoLock, Preserve)
                    {
                            ,   30, 
                        ICHC,   2
                    }

                    OperationRegion (ORP8, PCI_Config, 0xEC, 0x04)
                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                        GPCN,   1, 
                        HPCN,   1, 
                        PMCN,   1
                    }

                    Field (ORP8, AnyAcc, NoLock, Preserve)
                    {
                            ,   1, 
                        MCHC,   2
                    }

                    If (LNot (HDDN (Arg0)))
                    {
                        If (LNot (LGreater (Arg0, 0x03)))
                        {
                            And (Arg1, 0x03, ICHC)
                        }

                        If (LEqual (Arg0, 0x08))
                        {
                            And (Arg1, 0x03, MCHC)
                        }
                    }
                }

                Method (DP80, 1, NotSerialized)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x0BB8)
                    Store (0x00, DBG8)
                }

                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x09, 0x04))
                }
            }

            Device (AZAL)
            {
                Name (_ADR, 0x001B0000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x05, 0x04))
                }
            }

            Device (SCHP)
            {
                Name (_ADR, 0x001F0004)
            }
        }
    }

    Scope (\_SB)
    {
        OperationRegion (\_SB.PCI0.SBRG.IROR, PCI_Config, 0x00, 0xFF)
        Field (\_SB.PCI0.SBRG.IROR, ByteAcc, NoLock, Preserve)
        {
            Offset (0x60), 
            PIRA,   8, 
            PIRB,   8, 
            PIRC,   8, 
            PIRD,   8, 
            Offset (0x68), 
            PIRE,   8, 
            PIRF,   8, 
            PIRG,   8, 
            PIRH,   8
        }

        Name (BUFA, ResourceTemplate ()
        {
            IRQ (Level, ActiveLow, Shared) {15}
        })
        CreateWordField (BUFA, 0x01, ICRS)
        Method (LSTA, 1, NotSerialized)
        {
            And (Arg0, 0x80, Local0)
            If (Local0)
            {
                Return (0x09)
            }
            Else
            {
                Return (0x0B)
            }
        }

        Method (LCRS, 1, NotSerialized)
        {
            And (Arg0, 0x0F, Local0)
            ShiftLeft (0x01, Local0, ICRS)
            Return (BUFA)
        }

        Method (LSRS, 1, NotSerialized)
        {
            CreateWordField (Arg0, 0x01, ISRS)
            FindSetRightBit (ISRS, Local0)
            Return (Decrement (Local0))
        }

        Method (LDIS, 1, NotSerialized)
        {
            Return (Or (Arg0, 0x80))
        }

        Device (LNKA)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x01)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRA))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSA)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRA), PIRA)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRA))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRA)
            }
        }

        Device (LNKB)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x02)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRB))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSB)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRB), PIRB)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRB))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRB)
            }
        }

        Device (LNKC)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x03)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRC))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSC)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRC), PIRC)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRC))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRC)
            }
        }

        Device (LNKD)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x04)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRD))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSD)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRD), PIRD)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRD))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRD)
            }
        }

        Device (LNKE)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x05)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRE))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSE)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRE), PIRE)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRE))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRE)
            }
        }

        Device (LNKF)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x06)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRF))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSF)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRF), PIRF)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRF))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRF)
            }
        }

        Device (LNKG)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x07)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRG))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSG)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRG), PIRG)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRG))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRG)
            }
        }

        Device (LNKH)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x08)
            Method (_STA, 0, NotSerialized)
            {
                Return (LSTA (PIRH))
            }

            Method (_PRS, 0, NotSerialized)
            {
                Return (PRSH)
            }

            Method (_DIS, 0, NotSerialized)
            {
                Store (LDIS (PIRH), PIRH)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Return (LCRS (PIRH))
            }

            Method (_SRS, 1, NotSerialized)
            {
                Store (LSRS (Arg0), PIRH)
            }
        }
    }

    If (\SWAP)
    {
        Scope (\)
        {
            Name (PRNT, 0x00)
            Name (SATA, 0x00)
            Name (IOGP, 0xFFFF)
            Name (TST1, 0x00)
            Name (TST2, 0x1234)
            Name (DBFL, 0x01)
            Method (DP80, 1, NotSerialized)
            {
                If (DBFL)
                {
                    Store (Arg0, DBG8)
                    Sleep (0x07D0)
                    Store (0x00, DBG8)
                }
            }
        }

        Scope (\_SB.PCI0.SBRG)
        {
            OperationRegion (OP31, SystemIO, \PMBS, 0x40)
            Field (OP31, ByteAcc, NoLock, Preserve)
            {
                Offset (0x28), 
                    ,   28, 
                G12S,   1, 
                Offset (0x2C), 
                    ,   28, 
                G12E,   1
            }

            OperationRegion (OP32, PCI_Config, 0x00, 0x0100)
            Field (OP32, ByteAcc, NoLock, Preserve)
            {
                Offset (0xBB), 
                G12R,   2
            }

            OperationRegion (OP33, SystemIO, \IOGP, 0x20)
            Field (OP33, ByteAcc, NoLock, Preserve)
            {
                Offset (0x04), 
                    ,   4, 
                PWSW,   1
            }
        }

        Scope (\_SB.PCI0.IDE1)
        {
            OperationRegion (OP34, PCI_Config, 0x00, 0x0100)
            Field (OP34, AnyAcc, NoLock, Preserve)
            {
                DVID,   32, 
                Offset (0x09), 
                PRMN,   1, 
                    ,   1, 
                SECN,   1, 
                Offset (0x10), 
                PCMA,   16, 
                Offset (0x14), 
                PCNA,   16, 
                Offset (0x18), 
                SCMA,   16, 
                Offset (0x1C), 
                SCNA,   16, 
                Offset (0x20), 
                SBMA,   16, 
                Offset (0x42), 
                    ,   1, 
                IE0,    1, 
                    ,   3, 
                IE1,    1, 
                Offset (0x54), 
                    ,   18, 
                SSMD,   2, 
                Offset (0x90), 
                MAP,    2, 
                Offset (0x92), 
                PTEN,   4, 
                PTPR,   4
            }

            Scope (CHN1)
            {
                Method (_INI, 0, NotSerialized)
                {
                    If (LEqual (DVID, 0xFFFFFFFF))
                    {
                        Store (0x00, SWAP)
                    }
                    Else
                    {
                        Store (0x01, SWAP)
                    }

                    If (SWAP)
                    {
                        If (LEqual (MAP, 0x02))
                        {
                            Store (0x00, SATA)
                        }
                        Else
                        {
                            Store (0x02, SATA)
                        }

                        Store (SCDP (0x00), PRNT)
                        \_SB.PCI0.SBRG.ENFG ()
                        Store (0x07, \_SB.PCI0.SBRG.LDN)
                        Store (0x60, \_SB.PCI0.SBRG.INDX)
                        Store (\_SB.PCI0.SBRG.DATA, IOGP)
                        ShiftLeft (IOGP, 0x08, IOGP)
                        Store (0x61, \_SB.PCI0.SBRG.INDX)
                        Or (\_SB.PCI0.SBRG.DATA, IOGP)
                        \_SB.PCI0.SBRG.EXFG ()
                        Store (0x02, \_SB.PCI0.SBRG.G12R)
                    }
                }

                Method (SCDP, 1, NotSerialized)
                {
                    If (SECN)
                    {
                        And (SCMA, 0xFFFE, Local0)
                    }
                    Else
                    {
                        Store (0x0170, Local0)
                    }

                    OperationRegion (OP37, SystemIO, Local0, 0x08)
                    Field (OP37, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x06), 
                            ,   4, 
                        SDSL,   1, 
                        Offset (0x07), 
                        SSCM,   8
                    }

                    Store (Arg0, SDSL)
                    Store (SSCM, Local2)
                    DP80 (Local2)
                    Store (Local2, TST1)
                    If (LEqual (Local2, 0x50))
                    {
                        Store (0x01, Local1)
                    }
                    Else
                    {
                        Store (0x00, Local1)
                    }

                    Return (Local1)
                }

                Method (SRST, 1, NotSerialized)
                {
                    DP80 (0x50)
                    Store (Arg0, Local0)
                    Store (0x05, Local1)
                    While (Local1)
                    {
                        And (Not (Local0), PTEN, PTEN)
                        Sleep (0x32)
                        Or (Local0, PTEN, PTEN)
                        Sleep (0x64)
                        If (And (And (PTEN, PTPR), Local0))
                        {
                            If (SCDP (0x00))
                            {
                                Return (One)
                            }
                        }
                        Else
                        {
                            Decrement (Local1)
                        }
                    }

                    Return (Zero)
                }

                Method (CINT, 0, NotSerialized)
                {
                    If (SECN)
                    {
                        And (SBMA, 0xFFFE, Local7)
                        OperationRegion (OP37, SystemIO, Local7, 0x08)
                        Field (OP37, ByteAcc, NoLock, Preserve)
                        {
                            Offset (0x02), 
                                ,   2, 
                            INTR,   1, 
                            Offset (0x03)
                        }

                        Store (0x01, INTR)
                    }
                }

                Method (HPS0, 0, NotSerialized)
                {
                    If (SWAP)
                    {
                        If (PRNT)
                        {
                            Noop
                        }
                        Else
                        {
                            DP80 (0xD0)
                            Store (0x00, \_SB.PCI0.SBRG.PWSW)
                            Sleep (0x0A)
                            If (SATA)
                            {
                                If (LNot (And (SATA, PTEN)))
                                {
                                    And (Not (SATA), PTEN, PTEN)
                                    Sleep (0x01)
                                    Or (SATA, PTEN, PTEN)
                                    Sleep (0x0A)
                                    Store (PTEN, PTSV)
                                }
                            }
                            Else
                            {
                                Store (0x00, SSMD)
                                Store (0x01, IE0)
                            }
                        }
                    }
                }

                Method (HPS3, 0, NotSerialized)
                {
                    If (SWAP)
                    {
                        DP80 (0xD3)
                        If (SATA)
                        {
                            And (Not (SATA), PTEN, PTEN)
                            Store (PTEN, PTSV)
                            Store (0x01, \_SB.PCI0.SBRG.PWSW)
                            Sleep (0x03E8)
                        }
                        Else
                        {
                            Store (0x01, SSMD)
                            Store (0x00, IE0)
                            Store (0x01, \_SB.PCI0.SBRG.PWSW)
                            Sleep (0x03E8)
                            Store (0x02, SSMD)
                            Sleep (0xC8)
                            Store (0x01, SSMD)
                            Sleep (0x01F4)
                        }
                    }
                }

                Scope (DRV0)
                {
                    Method (_STA, 0, NotSerialized)
                    {
                        If (PRNT)
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_EJ0, 1, NotSerialized)
                    {
                        DP80 (0xE0)
                        \_SB.PCI0.IDE1.CHN1.HPS3 ()
                        Store (\_SB.PCI0.IDE1.CHN1.SCDP (0x00), PRNT)
                    }
                }
            }

            Method (HSHL, 0, NotSerialized)
            {
                If (SWAP)
                {
                    If (PRNT)
                    {
                        DP80 (0xF0)
                        Notify (\_SB.PCI0.IDE1.CHN1.DRV0, 0x03)
                    }
                    Else
                    {
                        DP80 (0xF1)
                        \_SB.PCI0.IDE1.CHN1.HPS0 ()
                        Store (0x0A, Local0)
                        While (Local0)
                        {
                            Sleep (0x03E8)
                            Store (\_SB.PCI0.IDE1.CHN1.SCDP (0x00), PRNT)
                            If (PRNT)
                            {
                                Notify (\_SB.PCI0.IDE1.CHN1.DRV0, 0x01)
                                Return (Ones)
                            }
                            Else
                            {
                                Decrement (Local0)
                            }
                        }
                    }
                }
            }
        }
    }

    Scope (\_SI)
    {
        OperationRegion (SIOR, SystemIO, 0x06C0, 0x1C)
        Field (SIOR, ByteAcc, NoLock, Preserve)
        {
            Offset (0x10), 
            LDGY,   1, 
            LDBL,   1
        }

        Method (_SST, 1, NotSerialized)
        {
            If (LEqual (Arg0, 0x01))
            {
                Store (0x01, LDGY)
                Store (0x01, LDBL)
            }

            If (LEqual (Arg0, 0x02))
            {
                Store (0x01, LDGY)
                Store (0x00, LDBL)
            }

            If (LEqual (Arg0, 0x03)) {}
            If (LEqual (Arg0, 0x04))
            {
                Store (0x00, LDGY)
                Store (0x01, LDBL)
            }
        }

        Method (_MSG, 1, NotSerialized)
        {
            Noop
        }
    }

    Scope (\_SB)
    {
        Scope (PCI0)
        {
            OperationRegion (SSMI, SystemIO, 0xB2, 0x02)
            Field (SSMI, ByteAcc, NoLock, Preserve)
            {
                IOB2,   8, 
                IOB3,   8
            }

            Method (_INI, 0, NotSerialized)
            {
                Store (0x00, PMEE)
                Store (0x00, MSEE)
                Store (0x00, KBDE)
                Store (0x00, RI1E)
                \_SB.PCI0.SBRG.IODT ()
                If (CondRefOf (_OSI, Local0))
                {
                    Store (0x01, OSYS)
                }
                Else
                {
                    Store (0x00, OSYS)
                }
            }

            Name (CRS, ResourceTemplate ()
            {
                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    0x0000,
                    0x0000,
                    0x00FF,
                    0x0000,
                    0x0100)
                IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,
                    0x0000,
                    0x0CF7,
                    0x0000,
                    0x0CF8)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,
                    0x0D00,
                    0xFFFF,
                    0x0000,
                    0xF300)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,
                    0x000A0000,
                    0x000BFFFF,
                    0x00000000,
                    0x00020000)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000)
            })
            CreateDWordField (CRS, 0x5C, MIN5)
            CreateDWordField (CRS, 0x60, MAX5)
            CreateDWordField (CRS, 0x68, LEN5)
            CreateDWordField (CRS, 0x76, MIN6)
            CreateDWordField (CRS, 0x7A, MAX6)
            CreateDWordField (CRS, 0x82, LEN6)
            Method (_CRS, 0, NotSerialized)
            {
                Store (MG1B, MIN5)
                Store (MG1L, LEN5)
                Store (MG1L, Local0)
                If (Local0)
                {
                    Add (MIN5, Decrement (Local0), MAX5)
                }

                Store (MG2B, MIN6)
                Store (MG2L, LEN6)
                Store (MG2L, Local0)
                Add (MIN6, Decrement (Local0), MAX6)
                Return (CRS)
            }
        }
    }

    If (SS1)
    {
        Name (\_SB.PCI0._S1D, 0x02)
        Name (\_SB.PCI0.PEGP._S1D, 0x02)
        Name (\_SB.PCI0.USB0._S1D, 0x02)
        Name (\_SB.PCI0.USB1._S1D, 0x02)
        Name (\_SB.PCI0.USB2._S1D, 0x02)
        Name (\_SB.PCI0.USB3._S1D, 0x02)
        Name (\_SB.PCI0.USB7._S1D, 0x02)
        Name (\_SB.PCI0.AC97._S1D, 0x02)
    }

    If (SS3)
    {
        Name (\_SB.PCI0._S3D, 0x02)
        Name (\_SB.PCI0.PEGP._S3D, 0x02)
        Name (\_SB.PCI0.USB0._S3D, 0x02)
        Name (\_SB.PCI0.USB1._S3D, 0x02)
        Name (\_SB.PCI0.USB2._S3D, 0x02)
        Name (\_SB.PCI0.USB3._S3D, 0x02)
        Name (\_SB.PCI0.USB7._S3D, 0x02)
        Name (\_SB.PCI0.AC97._S3D, 0x02)
    }

    If (SS4)
    {
        Name (\_SB.PCI0._S4D, 0x02)
        Name (\_SB.PCI0.PEGP._S4D, 0x02)
        Name (\_SB.PCI0.AC97._S4D, 0x02)
    }

    Method (_PTS, 1, NotSerialized)
    {
        Store (Arg0, DBG8)
        PTS (Arg0)
        Store (0x00, Index (WAKP, 0x00))
        Store (0x00, Index (WAKP, 0x01))
    }

    OperationRegion (RNTR, SystemIO, 0x06C0, 0x10)
    Field (RNTR, ByteAcc, NoLock, WriteAsZeros)
    {
        PMST,   1, 
        Offset (0x01)
    }

    Field (RNTR, ByteAcc, NoLock, Preserve)
    {
        Offset (0x04), 
        PMEE,   1, 
        Offset (0x05)
    }

    Field (RNTR, ByteAcc, NoLock, WriteAsZeros)
    {
        Offset (0x0A), 
        EVST,   8
    }

    Field (RNTR, ByteAcc, NoLock, Preserve)
    {
        Offset (0x0E), 
            ,   2, 
        RI1E,   1, 
        KBDE,   1, 
        MSEE,   1, 
        Offset (0x0F)
    }

    OperationRegion (\_SB.PCI0.SBRG.PMC3, PCI_Config, 0xA4, 0x01)
    Field (\_SB.PCI0.SBRG.PMC3, ByteAcc, NoLock, Preserve)
    {
        AFG3,   1
    }

    OperationRegion (SIOR, SystemIO, 0x06C0, 0x1C)
    Field (SIOR, ByteAcc, NoLock, Preserve)
    {
        Offset (0x10), 
        LDGY,   1, 
        LDBL,   1
    }

    Method (\_SB.PCI0.SBRG.SIOS, 1, NotSerialized)
    {
        If (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x03)))
        {
            Store (0xFF, EVST)
            Store (0x01, KBDE)
            Store (0x01, MSEE)
            Store (0x01, PMST)
            Store (0x01, PMEE)
        }

        If (LEqual (SDID, 0x74))
        {
            If (LLess (SREV, 0x01))
            {
                Store (0x01, LDGY)
                Store (0x00, LDBL)
            }
            Else
            {
                Store (0x00, LDGY)
                Store (0x01, LDBL)
            }
        }
        Else
        {
            Store (0x00, LDGY)
            Store (0x01, LDBL)
        }

        If (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x03)))
        {
            ENFG ()
            Store (SDID, Local0)
            If (LEqual (Local0, 0xF0))
            {
                Store (LDMO, LDN)
                Store (0x00, ACTR)
                Store (LDKB, LDN)
                Store (0x00, ACTR)
            }
            Else
            {
                Store (0x06, LDN)
                Store (0x60, OPT0)
            }

            EXFG ()
        }

        If (LEqual (Arg0, 0x05))
        {
            If (LEqual (LAST, 0x02))
            {
                Store (0x00, AFG3)
            }
            Else
            {
                Store (0x01, AFG3)
            }
        }
    }

    Name (SLID, 0x01)
    Method (_WAK, 1, NotSerialized)
    {
        ShiftLeft (Arg0, 0x04, DBG8)
        Store (0x01, SLID)
        WAK (Arg0)
        Store (0x01, SLPS)
        Store (0x01, SLPE)
        If (DerefOf (Index (WAKP, 0x00)))
        {
            Store (0x00, Index (WAKP, 0x01))
        }
        Else
        {
            Store (Arg0, Index (WAKP, 0x01))
        }

        Return (WAKP)
    }

    Method (\_SB.PCI0.SBRG.SIOW, 1, NotSerialized)
    {
        If (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x03)))
        {
            ENFG ()
            Store (SDID, Local0)
            If (LEqual (Local0, 0xF0))
            {
                Store (LDKB, LDN)
                Store (0x01, ACTR)
                Store (LDMO, LDN)
                Store (0x01, ACTR)
            }
            Else
            {
                Store (0x06, LDN)
                Store (0x00, OPT0)
            }

            EXFG ()
        }

        Store (0x00, PMEE)
        Store (0x00, MSEE)
        Store (0x00, KBDE)
        Store (0x00, RI1E)
    }

    Method (\_SB.PCI0.SBRG.SIOH, 0, NotSerialized)
    {
        Noop
    }

    Method (\_SB.PCI0.SBRG.UAR1._PRW, 0, NotSerialized)
    {
        Return (Package (0x02)
        {
            0x1D, 
            0x04
        })
    }

    Method (\_SB.PCI0.SBRG.UAR1._PSW, 1, NotSerialized)
    {
        Store (Arg0, RI1E)
    }

    OperationRegion (CBK2, SystemIO, 0x72, 0x02)
    Field (CBK2, ByteAcc, NoLock, Preserve)
    {
        IND,    8, 
        DAT,    8
    }

    IndexField (IND, DAT, ByteAcc, NoLock, Preserve)
    {
        Offset (0xB5), 
        LAST,   2, 
        Offset (0xD9), 
        DRVI,   8, 
        Offset (0xFE), 
            ,   6, 
        OSYS,   1, 
        PSWP,   1
    }

    OperationRegion (SBIO, SystemIO, 0x0430, 0x08)
    Field (SBIO, ByteAcc, NoLock, Preserve)
    {
        SKIP,   4, 
        SLPE,   1
    }

    Field (SBIO, ByteAcc, NoLock, WriteAsZeros)
    {
        Offset (0x04), 
        NONE,   4, 
        SLPS,   1
    }

    Scope (\_GPE)
    {
        Method (_L1D, 0, NotSerialized)
        {
            \_SB.PCI0.SBRG.SIOH ()
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L1C, 0, NotSerialized)
        {
            If (\SWAP)
            {
                \_SB.PCI0.IDE1.HSHL ()
            }
        }
    }

    Scope (\_GPE)
    {
        Method (_L0B, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.P0P2, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L03, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB0, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L04, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB1, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L0C, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB2, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L0E, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB3, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L0D, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB7, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }
    }

    Device (\_SB.PWRB)
    {
        Name (_HID, EisaId ("PNP0C0C"))
        Name (_UID, 0xAA)
        Name (_STA, 0x0B)
        Method (_PRW, 0, NotSerialized)
        {
            Return (GPRW (0x1D, 0x05))
        }
    }

    If (\ASFF) {}
    Scope (\_GPE)
    {
        Method (_L09, 0, NotSerialized)
        {
            If (\_SB.PCI0.PEX1.XPMH (0x00))
            {
                Notify (\_SB.PCI0.PEX1, 0x02)
            }

            If (\_SB.PCI0.PEX2.XPMH (0x01))
            {
                Notify (\_SB.PCI0.PEX2, 0x02)
            }

            If (\_SB.PCI0.PEX3.XPMH (0x02))
            {
                Notify (\_SB.PCI0.PEX3, 0x02)
            }

            If (\_SB.PCI0.PEX4.XPMH (0x03))
            {
                Notify (\_SB.PCI0.PEX4, 0x02)
            }

            If (\_SB.PCI0.PEGP.XPMH (0x08))
            {
                Notify (\_SB.PCI0.PEGP, 0x02)
            }
        }
    }

    Scope (\_SB.PCI0)
    {
        Method (_OSC, 5, NotSerialized)
        {
            Store (Arg3, Local0)
            Multiply (Local0, 0x04, Local1)
            Name (BUF1, Buffer (Local1) {})
            Store (Arg4, BUF1)
            Store (0x03, Local3)
            CreateDWordField (BUF1, 0x00, CAPB)
            If (LAnd (CAPB, 0x02))
            {
                And (Local3, 0x0E, Local3)
            }

            If (LAnd (CAPB, 0x08))
            {
                And (Local3, 0x0D, Local3)
                \_SB.PCI0.SBRG.GPMD (0x00)
            }

            \_SB.PCI0.PEX1.SCIC (0x00, Local3)
            \_SB.PCI0.PEX2.SCIC (0x01, Local3)
            \_SB.PCI0.PEX3.SCIC (0x02, Local3)
            \_SB.PCI0.PEX4.SCIC (0x03, Local3)
            \_SB.PCI0.PEGP.SCIC (0x08, Local3)
            Return (BUF1)
        }
    }

    Scope (\_SB.PCI0)
    {
        OperationRegion (SRCR, SystemMemory, 0xFED1C000, 0x4000)
        Field (SRCR, AnyAcc, NoLock, Preserve)
        {
            Offset (0x3418), 
            CHPD,   1, 
            PATD,   1, 
            SATD,   1, 
            SMBD,   1, 
            AZLD,   1, 
            A97D,   1, 
            M97D,   1, 
            ILND,   1, 
            UH0D,   1, 
            UH1D,   1, 
            UH2D,   1, 
            UH3D,   1, 
                ,   2, 
            LPCD,   1, 
            EHCD,   1, 
            RP1D,   1, 
            RP2D,   1, 
            RP3D,   1, 
            RP4D,   1, 
            Offset (0x341C)
        }
    }

    Scope (\_SB.PCI0.PEX1)
    {
    }

    Scope (\_SB.PCI0.PEX2)
    {
    }

    Scope (\_SB.PCI0.PEX3)
    {
    }

    Scope (\_SB.PCI0.PEX4)
    {
    }

    Scope (\_SB.PCI0.SBRG)
    {
        OperationRegion (OP91, PCI_Config, 0xA0, 0x04)
        Field (OP91, AnyAcc, NoLock, Preserve)
        {
                ,   10, 
            XPME,   1
        }

        Method (GPMD, 1, NotSerialized)
        {
            Store (Arg0, XPME)
        }
    }

    Scope (\_SB.PCI0.PEGP)
    {
    }

    Method (\_GPE._L05, 0, NotSerialized)
    {
        If (LAnd (\_SB.PCI0.AZLD, 0x01))
        {
            Notify (\_SB.PCI0.AC97, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }
        Else
        {
            Notify (\_SB.PCI0.AZAL, 0x02)
        }
    }

    Scope (\_SB.PCI0.SBRG)
    {
        Device (TPM)
        {
            Name (_HID, EisaId ("IFX0101"))
            Name (_UID, 0x01)
            Name (_CRS, ResourceTemplate ()
            {
                IO (Decode16, 0x004E, 0x004E, 0x01, 0x02)
                IO (Decode16, 0x4700, 0x4700, 0x01, 0x0C)
            })
            Method (_STA, 0, NotSerialized)
            {
                If (LEqual (\TPMF, 0x01))
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (0x00)
                }
            }
        }
    }

    Name (\_S0, Package (0x04)
    {
        0x00, 
        0x00, 
        0x00, 
        0x00
    })
    If (SS1)
    {
        Name (\_S1, Package (0x04)
        {
            0x01, 
            0x00, 
            0x00, 
            0x00
        })
    }

    If (SS3)
    {
        Name (\S3, Package (0x04)
        {
            0x05, 
            0x00, 
            0x00, 
            0x00
        })
    }

    If (SS4)
    {
        Name (\_S4, Package (0x04)
        {
            0x06, 
            0x00, 
            0x00, 
            0x00
        })
    }

    Name (\_S5, Package (0x04)
    {
        0x07, 
        0x00, 
        0x00, 
        0x00
    })
    Method (PTS, 1, NotSerialized)
    {
        If (Arg0)
        {
            \_SB.PCI0.SBRG.SIOS (Arg0)
        }
    }

    Method (WAK, 1, NotSerialized)
    {
        \_SB.PCI0.SBRG.SIOW (Arg0)
    }
}



More information about the freebsd-acpi mailing list