Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fujitsu S2110



ACPI listers,

I have recently acquired an S2110 with the AMD Turion CPU, and am tracking
6-STABLE on it.

Here is the issue:

When I simply have acpi.ko loaded, dmesg reports all kinds of nifty ACPI
devices. Great. For the life of me, though, I don't seem to see them _doing_
anything. I have powerd loaded in rc.conf, but the CPU never changes speed,
shutting the lid does _not_ suspend the laptop, and the power button simply
executes a 'shutdown -h now' via ACPI (the documented response is a
suspend). Backlight and volume functionality seems to be working fine.

So, then I 'kldload acpi_fujitsu' thinking, 'hey, that just might work!'.
Well, it doesn't do anything. Through grepping around a bit, I see that the
code supports my map table, but it seems to catch on the GVOL step, ala this
poor chap: http://docs.freebsd.org/cgi/mid.cgi?42FD1079.3020607

Bottom line is: I would really love to have ACPI fully functional, and while
my C skills are rather rusty at this point, I am more than willing to
experiment on this laptop with any patches that might be available out there
(though I couldn't find any).

Lastly, I'm not a subscriber to the list, so please CC:/BCC: me on any
responses or comments.

Thanks guys,
Brandon Mitchell

More information below:

dmesg:
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD 6.0-STABLE #2: Sat Jan 28 09:09:42 PST 2006
    bmitchell@xxxxxxxxxx:/usr/obj/usr/src/sys/ANKH
ACPI APIC Table: <FUJ    FJNB19A >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Turion(tm) 64 Mobile Technology MT-30 (795.93-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x20f42  Stepping = 2

Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  Features2=0x1<SSE3>
  AMD Features=0xe2500800<SYSCALL,NX,MMX+,<b25>,LM,3DNow+,3DNow>
real memory  = 501809152 (478 MB)
avail memory = 481681408 (459 MB)
ioapic0 <Version 2.1> irqs 0-23 on motherboard
ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413)
acpi0: <FUJ FJNB19A> on motherboard
acpi0: Overriding SCI Interrupt from IRQ 9 to IRQ 21
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
acpi_timer0: <32-bit timer at 3.579545MHz> port 0xfc20-0xfc23 on acpi0
cpu0: <ACPI CPU> on acpi0
powernow0: <PowerNow! K8> on cpu0
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
acpi_video0: <ACPI video extension> port 0x2000-0x20ff mem
0xd8000000-0xdbffffff,0xd4100000-0xd410ffff irq 17 at device 5.0 on pci1
ohci0: <OHCI (generic) USB controller> mem 0xd4000000-0xd4000fff irq 19 at
device 19.0 on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (0x1002) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xd4001000-0xd4001fff irq 19 at
device 19.1 on pci0
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0, legacy support
usb1: SMM does not respond, resetting
usb1: <OHCI (generic) USB controller> on ohci1
usb1: USB revision 1.0
uhub1: (0x1002) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
ehci0: <ATI SB400 USB 2.0 controller> mem 0xd4002000-0xd4002fff irq 19 at
device 19.2 on pci0
ehci0: [GIANT-LOCKED]
usb2: EHCI version 1.0
usb2: companion controllers, 4 ports each: usb0 usb1
usb2: <ATI SB400 USB 2.0 controller> on ehci0
usb2: USB revision 2.0
uhub2: ATI EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 8 ports with 8 removable, self powered
pci0: <serial bus, SMBus> at device 20.0 (no driver attached)
atapci0: <ATI IXP400 UDMA133 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 20.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib2: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci8: <ACPI PCI bus> on pcib2
cbb0: <PCI-CardBus Bridge> irq 20 at device 8.0 on pci8
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pci8: <base peripheral> at device 8.2 (no driver attached)
pci8: <bridge> at device 8.3 (no driver attached)
bfe0: <Broadcom BCM4401-B0 Fast Ethernet> mem 0xd4214000-0xd4215fff irq 20
at device 9.0 on pci8
miibus0: <MII bus> on bfe0
bmtphy0: <BCM4401 10/100baseTX PHY> on miibus0
bmtphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bfe0: Ethernet address: 00:0b:5d:cd:44:15
pci8: <network, ethernet> at device 10.0 (no driver attached)
fwohci0: <Texas Instruments TSB43AB21/A/AI/A-EP> mem
0xd4216800-0xd4216fff,0xd4210000-0xd4213fff irq 22 at device 11.0 on pci8
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:00:0e:10:03:81:17:d6
fwohci0: Phy 1394a available S400, 1 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:00:0e:81:17:d6
fwe0: Ethernet address: 02:00:0e:81:17:d6
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)
pcm0: <ATI IXP 400> mem 0xd4003400-0xd40034ff irq 17 at device 20.5 on pci0
pci0: <simple comms, generic modem> at device 20.6 (no driver attached)
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_button0: <Power Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 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 GlidePoint, device ID 0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on
acpi0
sio0: type 16550A
sio1 port 0x2e8-0x2ef,0x480-0x4bf irq 3 drq 3 on acpi0
sio1: type 16550A
ppc0: <Standard parallel printer port> port 0x378-0x37f,0x778-0x77b irq 7 on
acpi0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem
0xc0000-0xcefff,0xcf000-0xcffff,0xd0000-0xd17ff,0xdc000-0xdffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 795927353 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 38154MB <FUJITSU MHV2040AT 00000096> at ata0-master UDMA100
acd0: CDRW <DW-224E-C/4.8A> at ata1-master UDMA33
pcm0: <SigmaTel STAC9752/53 AC97 Codec>
Trying to mount root from ufs:/dev/ad0s1a
bfe0: link state changed to DOWN
bfe0: link state changed to UP

pciconf:
hostb0@pci0:0:0:    class=0x060000 card=0x130110cf chip=0x59501002 rev=0x01
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = bridge
    subclass = HOST-PCI
pcib1@pci0:1:0:    class=0x060400 card=0x00000044 chip=0x5a3f1002 rev=0x00
hdr=0x01
    vendor   = 'ATI Technologies Inc'
    class    = bridge
    subclass = PCI-PCI
ohci0@pci0:19:0:    class=0x0c0310 card=0x12c810cf chip=0x43741002 rev=0x00
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = serial bus
    subclass = USB
ohci1@pci0:19:1:    class=0x0c0310 card=0x12c910cf chip=0x43751002 rev=0x00
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = serial bus
    subclass = USB
ehci0@pci0:19:2:    class=0x0c0320 card=0x12ca10cf chip=0x43731002 rev=0x00
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = serial bus
    subclass = USB
none0@pci0:20:0:    class=0x0c0500 card=0x12c510cf chip=0x43721002 rev=0x10
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    device   = 'SMBus'
    class    = serial bus
    subclass = SMBus
atapci0@pci0:20:1:    class=0x01018a card=0x12c610cf chip=0x43761002
rev=0x00 hdr=0x00
    vendor   = 'ATI Technologies Inc'
    device   = 'IDE Controller'
    class    = mass storage
    subclass = ATA
isab0@pci0:20:3:    class=0x060100 card=0x12c710cf chip=0x43771002 rev=0x00
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = bridge
    subclass = PCI-ISA
pcib2@pci0:20:4:    class=0x060401 card=0x00000000 chip=0x43711002 rev=0x00
hdr=0x01
    vendor   = 'ATI Technologies Inc'
    class    = bridge
    subclass = PCI-PCI
pcm0@pci0:20:5:    class=0x040100 card=0x12ec10cf chip=0x43701002 rev=0x01
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = multimedia
    subclass = audio
none1@pci0:20:6:    class=0x070300 card=0x132110cf chip=0x43781002 rev=0x01
hdr=0x00
    vendor   = 'ATI Technologies Inc'
    class    = simple comms
    subclass = generic modem
hostb1@pci0:24:0:    class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00
hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron HyperTransport Technology Configuration'
    class    = bridge
    subclass = HOST-PCI
hostb2@pci0:24:1:    class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00
hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Address Map'
    class    = bridge
    subclass = HOST-PCI
hostb3@pci0:24:2:    class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00
hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron DRAM Controller'
    class    = bridge
    subclass = HOST-PCI
hostb4@pci0:24:3:    class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00
hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Miscellaneous Control'
    class    = bridge
    subclass = HOST-PCI
acpi_video0@pci1:5:0:    class=0x030000 card=0x130210cf chip=0x59551002
rev=0x00 hdr=0x00
    vendor   = 'ATI Technologies Inc'
    device   = 'Mobility Radeon XPRESS 200'
    class    = display
    subclass = VGA
cbb0@pci8:8:0:    class=0x060700 card=0x131e10cf chip=0x71341217 rev=0x20
hdr=0x02
    vendor   = 'O2 Micro Inc'
    class    = bridge
    subclass = PCI-CardBus
none2@pci8:8:2:    class=0x080500 card=0x131e10cf chip=0x71201217 rev=0x00
hdr=0x00
    vendor   = 'O2 Micro Inc'
    class    = base peripheral
none3@pci8:8:3:    class=0x068000 card=0x131e10cf chip=0x71301217 rev=0x00
hdr=0x00
    vendor   = 'O2 Micro Inc'
    class    = bridge
bfe0@pci8:9:0:    class=0x020000 card=0x123b10cf chip=0x170c14e4 rev=0x02
hdr=0x00
    vendor   = 'Broadcom Corporation'
    device   = 'BCM440x 100Base-TX Fast Ethernet'
    class    = network
    subclass = ethernet
none4@pci8:10:0:    class=0x020000 card=0x132910cf chip=0x001b168c rev=0x01
hdr=0x00
    vendor   = 'Atheros Communications Inc.'
    class    = network
    subclass = ethernet
fwohci0@pci8:11:0:    class=0x0c0010 card=0x116210cf chip=0x8026104c
rev=0x00 hdr=0x00
    vendor   = 'Texas Instruments (TI)'
    device   = 'TSB43AB21 1394a-2000 OHCI PHY/link-layer Controller'
    class    = serial bus
    subclass = FireWire

acpidebug:
/*
  RSD PTR: OEM=FUJ, ACPI_Rev=1.0x (0)
    RSDT=0x1de9ac36, cksum=180
 */
/*
  RSDT: Length=56, Revision=1, Checksum=79,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x100
    Entries={ 0x1dea0f8c, 0x1dea0e15, 0x1dea0e65, 0x1dea0f28, 0x1dea0f64 }
 */
/*
  FACP: Length=116, Revision=1, Checksum=34,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x100
     FACS=0x1dea1fc0, DSDT=0x1de9ac6e
    INT_MODEL=APIC
    Preferred_PM_Profile=Unspecified (0)
    SCI_INT=9
    SMI_CMD=0xb0, ACPI_ENABLE=0xf0, ACPI_DISABLE=0xf1, S4BIOS_REQ=0x0
    PSTATE_CNT=0x0
    PM1a_EVT_BLK=0xfc00-0xfc03
    PM1b_EVT_BLK=0x1404-0x1407
    PM1a_CNT_BLK=0xfc10-0xfc11
    PM2_CNT_BLK=0x1400-0x1400
    PM_TMR_BLK=0xfc20-0xfc23
    GPE0_BLK=0xfc40-0xfc47
    P_LVL2_LAT=1 us, P_LVL3_LAT=1001 us
    FLUSH_SIZE=0, FLUSH_STRIDE=0
    DUTY_OFFSET=0, DUTY_WIDTH=0
    DAY_ALRM=13, MON_ALRM=0, CENTURY=50
    IAPC_BOOT_ARCH=
    Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4,TMR_VAL_EXT}
 */
/*
  FACS:    Length=64, HwSig=0x00000b98, Firm_Wake_Vec=0x00000000
    Global_Lock=
    Flags=
    Version=0
 */
/*
  DSDT: Length=24999, Revision=1, Checksum=197,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=MSFT, Creator Revision=0x100000e
 */
/*
  APIC: Length=80, Revision=1, Checksum=88,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x100
    Local APIC ADDR=0xfee00000
    Flags={PC-AT}

    Type=Local APIC
    ACPI CPU=0
    Flags={ENABLED}
    APIC ID=0

    Type=IO APIC
    APIC ID=1
    INT BASE=0
    ADDR=0x00000000fec00000

    Type=INT Override
    BUS=0
    IRQ=9
    INTR=21
    Flags={Polarity=active-lo, Trigger=level}

    Type=Local NMI
    ACPI CPU=0
    LINT Pin=1
    Flags={Polarity=active-hi, Trigger=edge}
 */
/*
  SSDT: Length=195, Revision=1, Checksum=204,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x1000
 */
/*
  MCFG: Length=60, Revision=1, Checksum=129,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x100

    Base Address= 0x00000000e0000000
    Segment Group= 0x0000
    Start Bus= 0
    End Bus= 8
 */
/*
  BOOT: Length=40, Revision=1, Checksum=231,
    OEMID=FUJ, OEM Table ID=FJNB19A, OEM Revision=0x1060000,
    Creator ID=FUJ, Creator Revision=0x100
 */
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20041119
 *
 * Disassembly of /tmp/acpidump.rJ7UCO, Sat Jan 28 14:59:10 2006
 */
DefinitionBlock ("DSDT.aml", "DSDT", 1, "FUJ   ", "FJNB19A ", 17170432)
{
    Name (BIDT, Buffer (0x10)
    {
        0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
        0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x09, 0x0A
    })
    Name (BMNT, Package (0x0B)
    {
        "CP147685 / CP147686",
        "CP176595 / CP176596 / CP230645 / CP230646",
        "CP245456",
        "CP229835 / CP229836 / CP245464 - CP245466",
        "CP245464",
        "CP257390 / CP257391 / CP257395 / CP257396",
        "CP245480",
        "CP245360",
        "CP186215 / CP186216",
        "CP112045 / CP112046",
        "CP144820 / CP144821"
    })
    Name (BMST, Package (0x0B)
    {
        "CP147685",
        "CP176595",
        "CP245456",
        "CP229835",
        "CP245464",
        "CP245472",
        "CP245480",
        "CP245360",
        "CP245376",
        "CP112045",
        "CP245408"
    })
    Scope (_PR)
    {
        Processor (CPU0, 0x00, 0x0000FC30, 0x06) {}
    }

    Scope (\_SB)
    {
        Name (OSTB, Ones)
        OperationRegion (OSTY, SystemMemory, 0x1DEA1ECA, 0x00000001)
        Field (OSTY, AnyAcc, NoLock, Preserve)
        {
            TPOS,   8
        }

        Method (OSTP, 0, NotSerialized)
        {
            If (LEqual (^OSTB, Ones))
            {
                If (CondRefOf (\_OSI, Local0))
                {
                    If (\_OSI ("Windows 2001.1"))
                    {
                        Store (0x20, ^OSTB)
                        Store (0x20, ^TPOS)
                    }
                    Else
                    {
                        If (\_OSI ("Windows 2001 SP1"))
                        {
                            Store (0x10, ^OSTB)
                            Store (0x10, ^TPOS)
                        }
                        Else
                        {
                            If (\_OSI ("Windows 2001"))
                            {
                                Store (0x08, ^OSTB)
                                Store (0x08, ^TPOS)
                            }
                            Else
                            {
                                Store (0x00, ^OSTB)
                                Store (0x00, ^TPOS)
                            }
                        }
                    }
                }
                Else
                {
                    If (CondRefOf (\_OS, Local0))
                    {
                        If (^SEQL (\_OS, "Microsoft Windows"))
                        {
                            Store (0x01, ^OSTB)
                            Store (0x01, ^TPOS)
                        }
                        Else
                        {
                            If (^SEQL (\_OS, "Microsoft WindowsME:
Millennium Edition"))
                            {
                                Store (0x02, ^OSTB)
                                Store (0x02, ^TPOS)
                            }
                            Else
                            {
                                If (^SEQL (\_OS, "Microsoft Windows NT"))
                                {
                                    Store (0x04, ^OSTB)
                                    Store (0x04, ^TPOS)
                                }
                                Else
                                {
                                    Store (0x00, ^OSTB)
                                    Store (0x00, ^TPOS)
                                }
                            }
                        }
                    }
                    Else
                    {
                        Store (0x00, ^OSTB)
                        Store (0x00, ^TPOS)
                    }
                }
            }

            Return (^OSTB)
        }

        Method (OSHT, 0, NotSerialized)
        {
            \_SB.OSTP ()
            Store (0x48, CMD)
            Store (Zero, SSMI)
        }

        Method (SEQL, 2, Serialized)
        {
            Store (SizeOf (Arg0), Local0)
            Store (SizeOf (Arg1), Local1)
            If (LNot (LEqual (Local0, Local1)))
            {
                Return (Zero)
            }

            Name (BUF0, Buffer (Local0) {})
            Store (Arg0, BUF0)
            Name (BUF1, Buffer (Local0) {})
            Store (Arg1, BUF1)
            Store (Zero, Local2)
            While (LLess (Local2, Local0))
            {
                Store (DerefOf (Index (BUF0, Local2)), Local3)
                Store (DerefOf (Index (BUF1, Local2)), Local4)
                If (LNot (LEqual (Local3, Local4)))
                {
                    Return (Zero)
                }

                Increment (Local2)
            }

            Return (One)
        }
    }

    Name (BYIS, 0xFF)
    Name (BYIF, Ones)
    Name (BYRF, Zero)
    Name (PLWM, Zero)
    Name (NTFY, Zero)
    Name (SM0S, Zero)
    Name (SM1S, Zero)
    Name (SM2S, Zero)
    Name (RPEN, Zero)
    Name (RPDS, Zero)
    Name (TMBF, Zero)
    Name (TCNT, Zero)
    Name (LEDI, Zero)
    Name (BTNI, Zero)
    Name (NGTI, 0x06)
    Name (GPIC, Zero)
    Method (\_PIC, 1, NotSerialized)
    {
        Store (Arg0, GPIC)
        If (Arg0)
        {
            \_SB.PCI0.LPCB.DSPI ()
        }
    }

    Scope (_SB)
    {
        OperationRegion (PSIO, SystemIO, 0x00000F40, 0x00000002)
        OperationRegion (PSBF, SystemMemory, 0x1DEA1DAA, 0x00000120)
        OperationRegion (OEMT, SystemMemory, 0x1DEA1F54, 0x00000020)
        OperationRegion (SYSC, SystemMemory, 0x1DEA1F4A, 0x0000000A)
        OperationRegion (VDEX, SystemMemory, 0x1DEA1D9A, 0x00000010)
        OperationRegion (BTNC, SystemMemory, 0x1DEA1F3A, 0x00000010)
        Scope (\)
        {
            Field (\_SB.PSIO, ByteAcc, NoLock, Preserve)
            {
                SSMI,   8
            }

            Field (\_SB.PSBF, ByteAcc, NoLock, Preserve)
            {
                CMD,    8,
                DVID,   32
            }

            Field (\_SB.PSBF, ByteAcc, NoLock, Preserve)
            {
                Offset (0x05),
                INF,    8
            }

            Field (\_SB.PSBF, ByteAcc, NoLock, Preserve)
            {
                Offset (0x05),
                PIID,   320
            }

            Field (\_SB.OEMT, ByteAcc, NoLock, Preserve)
            {
                SPAF,   2,
                SPBF,   2,
                PPF,    3,
                FDCF,   1,
                SIDF,   2,
                IMTF,   1,
                BLEN,   1,
                WLEN,   1,
                Offset (0x04),
                WAPB,   1,
                WBLT,   1,
                Offset (0x08),
                    ,   4,
                TTIM,   1,
                Offset (0x10),
                FDS0,   4,
                FDS1,   4,
                Offset (0x18),
                UMST,   32,
                UMSZ,   32
            }

            Field (\_SB.SYSC, ByteAcc, NoLock, Preserve)
            {
                BHKF,   1,
                    ,   2,
                MHKF,   1,
                Offset (0x01),
                BLLM,   8,
                BLLT,   64
            }

            Field (\_SB.SYSC, ByteAcc, NoLock, Preserve)
            {
                AHKF,   8
            }

            Field (\_SB.VDEX, ByteAcc, NoLock, Preserve)
            {
                ADOS,   3,
                CLCD,   1,
                ALCD,   1,
                CCRT,   1,
                ACRT,   1,
                CTV,    1,
                ATV,    1,
                CDVI,   1,
                ADVI,   1,
                DSWF,   2
            }

            Field (\_SB.BTNC, ByteAcc, NoLock, Preserve)
            {
                IRBF,   1,
                VLBF,   3,
                    ,   3,
                NGTF,   1,
                Offset (0x04),
                IRBC,   16
            }
        }

        Method (_INI, 0, NotSerialized)
        {
            And (G3P1, 0xC0, Local0)
            If (LEqual (Local0, 0xC0))
            {
                Store (Zero, LEDI)
                Store (Zero, BTNI)
            }
            Else
            {
                If (Local0)
                {
                    Store (0x0100, LEDI)
                    Store (0x00FF0101, BTNI)
                }
                Else
                {
                    Store (Zero, LEDI)
                    Store (0x000F0001, BTNI)
                }
            }
        }

        Device (MCFG)
        {
            Name (_HID, EisaId ("PNP0C02"))
            Name (_CRS, ResourceTemplate ()
            {
                DWordMemory (ResourceConsumer, PosDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0xE0000000,
                    0xEFFFFFFF,
                    0x00000000,
                    0x10000000)
            })
        }

        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A03"))
            Name (_ADR, 0x00)
            Name (_UID, 0x01)
            Name (_BBN, 0x00)
            OperationRegion (K8ST, SystemMemory, 0x1DEA1F74, 0x00000048)
            Field (K8ST, AnyAcc, Lock, Preserve)
            {
                C0_0,   16,
                C2_0,   16,
                C4_0,   16,
                C6_0,   16,
                C8_0,   16,
                CA_0,   16,
                CC_0,   16,
                CE_0,   16,
                D0_0,   16,
                D2_0,   16,
                D4_0,   16,
                D6_0,   16,
                D8_0,   16,
                DA_0,   16,
                DC_0,   16,
                DE_0,   16,
                E0_0,   16,
                E2_0,   16,
                E4_0,   16,
                E6_0,   16,
                E8_0,   16,
                EA_0,   16,
                EC_0,   16,
                EE_0,   16,
                F0_0,   16,
                F2_0,   16,
                F4_0,   16,
                F6_0,   16,
                F8_0,   16,
                FA_0,   16,
                FC_0,   16,
                FE_0,   16,
                TOML,   32,
                TOMH,   32
            }

            Name (RSRC, ResourceTemplate ()
            {
                WordBusNumber (ResourceProducer, MinFixed, MaxFixed,
SubDecode,
                    0x0000,
                    0x0000,
                    0x00FF,
                    0x0000,
                    0x0100, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000A0000,
                    0x000BFFFF,
                    0x00000000,
                    0x00020000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000C0000,
                    0x000C1FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000C2000,
                    0x000C3FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000C4000,
                    0x000C5FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000C6000,
                    0x000C7FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000C8000,
                    0x000C9FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000CA000,
                    0x000CBFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000CC000,
                    0x000CDFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000CE000,
                    0x000CFFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000D0000,
                    0x000D1FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000D2000,
                    0x000D3FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000D4000,
                    0x000D5FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000D6000,
                    0x000D7FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000D8000,
                    0x000D9FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000DA000,
                    0x000DBFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000DC000,
                    0x000DDFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000DE000,
                    0x000DFFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000E0000,
                    0x000E1FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000E2000,
                    0x000E3FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000E4000,
                    0x000E5FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000E6000,
                    0x000E7FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000E8000,
                    0x000E9FFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000EA000,
                    0x000EBFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000EC000,
                    0x000EDFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x000EE000,
                    0x000EFFFF,
                    0x00000000,
                    0x00002000, 0x00)
                DWordMemory (ResourceProducer, SubDecode, MinFixed,
MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000,
                    0x00000000, 0x00)
                IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode,
EntireRange,
                    0x0000,
                    0x0000,
                    0x0CF7,
                    0x0000,
                    0x0CF8, 0x00)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode,
EntireRange,
                    0x0000,
                    0x0D00,
                    0xFFFF,
                    0x0000,
                    0xF300, 0x00)
            })
            Method (_CRS, 0, Serialized)
            {
                CreateBitField (RSRC, 0x0188, C0RW)
                CreateDWordField (RSRC, 0x42, C0LN)
                Store (One, C0RW)
                Store (0x2000, C0LN)
                If (And (C0_0, 0x1818))
                {
                    Store (0x00, C0LN)
                }

                CreateBitField (RSRC, 0x0260, C2RW)
                CreateDWordField (RSRC, 0x5D, C2LN)
                Store (One, C2RW)
                Store (0x2000, C2LN)
                If (And (C2_0, 0x1818))
                {
                    Store (0x00, C2LN)
                }

                CreateBitField (RSRC, 0x0338, C4RW)
                CreateDWordField (RSRC, 0x78, C4LN)
                Store (One, C4RW)
                Store (0x2000, C4LN)
                If (And (C4_0, 0x1818))
                {
                    Store (0x00, C4LN)
                }

                CreateBitField (RSRC, 0x0410, C6RW)
                CreateDWordField (RSRC, 0x93, C6LN)
                Store (One, C6RW)
                Store (0x2000, C6LN)
                If (And (C6_0, 0x1818))
                {
                    Store (0x00, C6LN)
                }

                CreateBitField (RSRC, 0x04E8, C8RW)
                CreateDWordField (RSRC, 0xAE, C8LN)
                Store (One, C8RW)
                Store (0x2000, C8LN)
                If (And (C8_0, 0x1818))
                {
                    Store (0x00, C8LN)
                }

                CreateBitField (RSRC, 0x05C0, CARW)
                CreateDWordField (RSRC, 0xC9, CALN)
                Store (One, CARW)
                Store (0x2000, CALN)
                If (And (CA_0, 0x1818))
                {
                    Store (0x00, CALN)
                }

                CreateBitField (RSRC, 0x0698, CCRW)
                CreateDWordField (RSRC, 0xE4, CCLN)
                Store (One, CCRW)
                Store (0x2000, CCLN)
                If (And (CC_0, 0x1818))
                {
                    Store (0x00, CCLN)
                }

                CreateBitField (RSRC, 0x0770, CERW)
                CreateDWordField (RSRC, 0xFF, CELN)
                Store (One, CERW)
                Store (0x2000, CELN)
                If (And (CE_0, 0x1818))
                {
                    Store (0x00, CELN)
                }

                CreateBitField (RSRC, 0x0848, D0RW)
                CreateDWordField (RSRC, 0x011A, D0LN)
                Store (One, D0RW)
                Store (0x2000, D0LN)
                If (And (D0_0, 0x1818))
                {
                    Store (0x00, D0LN)
                }

                CreateBitField (RSRC, 0x0920, D2RW)
                CreateDWordField (RSRC, 0x0135, D2LN)
                Store (One, D2RW)
                Store (0x2000, D2LN)
                If (And (D2_0, 0x1818))
                {
                    Store (0x00, D2LN)
                }

                CreateBitField (RSRC, 0x09F8, D4RW)
                CreateDWordField (RSRC, 0x0150, D4LN)
                Store (One, D4RW)
                Store (0x2000, D4LN)
                If (And (D4_0, 0x1818))
                {
                    Store (0x00, D4LN)
                }

                CreateBitField (RSRC, 0x0AD0, D6RW)
                CreateDWordField (RSRC, 0x016B, D6LN)
                Store (One, D6RW)
                Store (0x2000, D6LN)
                If (And (D6_0, 0x1818))
                {
                    Store (0x00, D6LN)
                }

                CreateBitField (RSRC, 0x0BA8, D8RW)
                CreateDWordField (RSRC, 0x0186, D8LN)
                Store (One, D8RW)
                Store (0x2000, D8LN)
                If (And (D8_0, 0x1818))
                {
                    Store (0x00, D8LN)
                }

                CreateBitField (RSRC, 0x0C80, DARW)
                CreateDWordField (RSRC, 0x01A1, DALN)
                Store (One, DARW)
                Store (0x2000, DALN)
                If (And (DA_0, 0x1818))
                {
                    Store (0x00, DALN)
                }

                CreateBitField (RSRC, 0x0D58, DCRW)
                CreateDWordField (RSRC, 0x01BC, DCLN)
                Store (One, DCRW)
                Store (0x2000, DCLN)
                If (And (DC_0, 0x1818))
                {
                    Store (0x00, DCLN)
                }

                CreateBitField (RSRC, 0x0E30, DERW)
                CreateDWordField (RSRC, 0x01D7, DELN)
                Store (One, DERW)
                Store (0x2000, DELN)
                If (And (DE_0, 0x1818))
                {
                    Store (0x00, DELN)
                }

                CreateBitField (RSRC, 0x0F08, E0RW)
                CreateDWordField (RSRC, 0x01F2, E0LN)
                Store (One, E0RW)
                Store (0x2000, E0LN)
                If (And (E0_0, 0x1818))
                {
                    Store (0x00, E0LN)
                }

                CreateBitField (RSRC, 0x0FE0, E2RW)
                CreateDWordField (RSRC, 0x020D, E2LN)
                Store (One, E2RW)
                Store (0x2000, E2LN)
                If (And (E2_0, 0x1818))
                {
                    Store (0x00, E2LN)
                }

                CreateBitField (RSRC, 0x10B8, E4RW)
                CreateDWordField (RSRC, 0x0228, E4LN)
                Store (One, E4RW)
                Store (0x2000, E4LN)
                If (And (E4_0, 0x1818))
                {
                    Store (0x00, E4LN)
                }

                CreateBitField (RSRC, 0x1190, E6RW)
                CreateDWordField (RSRC, 0x0243, E6LN)
                Store (One, E6RW)
                Store (0x2000, E6LN)
                If (And (E6_0, 0x1818))
                {
                    Store (0x00, E6LN)
                }

                CreateBitField (RSRC, 0x1268, E8RW)
                CreateDWordField (RSRC, 0x025E, E8LN)
                Store (One, E8RW)
                Store (0x2000, E8LN)
                If (And (E8_0, 0x1818))
                {
                    Store (0x00, E8LN)
                }

                CreateBitField (RSRC, 0x1340, EARW)
                CreateDWordField (RSRC, 0x0279, EALN)
                Store (One, EARW)
                Store (0x2000, EALN)
                If (And (EA_0, 0x1818))
                {
                    Store (0x00, EALN)
                }

                CreateBitField (RSRC, 0x1418, ECRW)
                CreateDWordField (RSRC, 0x0294, ECLN)
                Store (One, ECRW)
                Store (0x2000, ECLN)
                If (And (EC_0, 0x1818))
                {
                    Store (0x00, ECLN)
                }

                CreateBitField (RSRC, 0x14F0, EERW)
                CreateDWordField (RSRC, 0x02AF, EELN)
                Store (One, EERW)
                Store (0x2000, EELN)
                If (And (EE_0, 0x1818))
                {
                    Store (0x00, EELN)
                }

                CreateDWordField (RSRC, 0x02BE, BTMN)
                CreateDWordField (RSRC, 0x02C2, BTMX)
                CreateDWordField (RSRC, 0x02CA, BTLN)
                Store (TOML, BTMN)
                Store (0xDFFFFFFF, BTMX)
                Add (Subtract (BTMX, BTMN), 0x01, BTLN)
                Return (RSRC)
            }

            Method (_PRT, 0, NotSerialized)
            {
                If (GPIC)
                {
                    Return (Package (0x05)
                    {
                        Package (0x04)
                        {
                            0x0013FFFF,
                            0x00,
                            0x00,
                            0x13
                        },

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

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

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

                        Package (0x04)
                        {
                            0x0014FFFF,
                            0x03,
                            0x00,
                            0x13
                        }
                    })
                }
                Else
                {
                    Return (Package (0x05)
                    {
                        Package (0x04)
                        {
                            0x0013FFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x0014FFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x0014FFFF,
                            0x01,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x0014FFFF,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x0014FFFF,
                            0x03,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00
                        }
                    })
                }
            }

            Device (AGP)
            {
                Name (_ADR, 0x00010000)
                Method (_PRT, 0, NotSerialized)
                {
                    If (GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x00,
                                0x00,
                                0x11
                            },

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

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

                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x03,
                                0x00,
                                0x10
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0005FFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            }
                        })
                    }
                }

                Device (VGA)
                {
                    Name (_ADR, 0x00050000)
                    Method (XLCD, 0, NotSerialized)
                    {
                        Return (One)
                    }

                    Method (XCRT, 0, NotSerialized)
                    {
                        Return (One)
                    }

                    Method (XTV, 0, NotSerialized)
                    {
                        Return (XOr (SOUT, One))
                    }

                    Method (XDVI, 0, NotSerialized)
                    {
                        Return (Zero)
                    }

                    Scope (\)
                    {
                        Name (WLCD, Zero)
                        Name (WCRT, Zero)
                        Name (WTV, Zero)
                        Name (WDVI, Zero)
                    }

                    Method (PHTK, 0, NotSerialized)
                    {
                        Store (Zero, DSWF)
                    }

                    Name (F10T, Package (0x0A)
                    {
                        0x01,
                        0x02,
                        0x03,
                        0x04,
                        0x05,
                        0x01,
                        0x02,
                        0x03,
                        0x04,
                        0x05
                    })
                    Method (AHTK, 0, NotSerialized)
                    {
                        If (LAnd (LEqual (And (ADOS, 0x03), Zero), DSWF))
                        {
                            UPDD ()
                            If (LEqual (DSWF, 0x01))
                            {
                                Or (ShiftLeft (CDVI, 0x02), Or (ShiftLeft
(CCRT, 0x01), CLCD), Local0)
                                Or (ShiftLeft (ADVI, 0x02), Or (ShiftLeft
(ACRT, 0x01), ALCD), Local1)
                                Store (Zero, Local2)
                                Store (0xFF, Local3)
                                While (LAnd (LLess (Local2, 0x0A), LEqual
(Local3, 0xFF)))
                                {
                                    If (LEqual (DerefOf (Index (F10T,
Local2)), Local0))
                                    {
                                        If (LAnd (CTV, ATV))
                                        {
                                            Store (Local2, Local3)
                                        }
                                        Else
                                        {
                                            Add (Local2, 0x01, Local3)
                                        }
                                    }

                                    Increment (Local2)
                                }

                                Store (0xFF, Local2)
                                If (LNot (LEqual (Local3, 0xFF)))
                                {
                                    While (LAnd (LLess (Local3, 0x0A),
LEqual (Local2, 0xFF)))
                                    {
                                        If (LEqual (And (DerefOf (Index
(F10T, Local3)), Local1), DerefOf (Index (F10T, Local3))))
                                        {
                                            Store (DerefOf (Index (F10T,
Local3)), Local2)
                                        }

                                        Increment (Local3)
                                    }
                                }

                                If (LEqual (Local2, 0xFF))
                                {
                                    If (ALCD)
                                    {
                                        Store (0x01, Local2)
                                    }
                                    Else
                                    {
                                        If (ACRT)
                                        {
                                            Store (0x02, Local2)
                                        }
                                        Else
                                        {
                                            If (ADVI)
                                            {
                                                Store (0x04, Local2)
                                            }
                                            Else
                                            {
                                                Store (0x02, Local2)
                                            }
                                        }
                                    }
                                }

                                And (Local2, 0x01, WLCD)
                                ShiftRight (And (Local2, 0x02), 0x01, WCRT)
                                ShiftRight (And (Local2, 0x04), 0x02, WDVI)
                                Store (Zero, WTV)
                                Notify (\_SB.PCI0.AGP.VGA, 0x80)
                            }
                            Else
                            {
                                If (LEqual (DSWF, 0x02))
                                {
                                    And (CLCD, ALCD, WLCD)
                                    And (CCRT, ACRT, WCRT)
                                    And (CDVI, ADVI, WDVI)
                                    And (XOr (CTV, 0x01), ATV, WTV)
                                    If (LOr (LOr (WTV, WDVI), LOr (WCRT,
WLCD)))
                                    {
                                        If (LAnd (LAnd (WLCD, WCRT), WTV))
                                        {
                                            Store (Zero, WCRT)
                                        }

                                        If (LAnd (LAnd (WLCD, WDVI), WTV))
                                        {
                                            Store (Zero, WDVI)
                                        }

                                        If (LAnd (LAnd (WCRT, WDVI), WTV))
                                        {
                                            Store (Zero, WDVI)
                                        }

                                        Notify (\_SB.PCI0.AGP.VGA, 0x80)
                                    }
                                }
                            }
                        }
                    }

                    Method (UPDD, 0, NotSerialized)
                    {
                        Store (0xFF, DVID)
                        Store (0x8E, CMD)
                        Store (Zero, SSMI)
                    }

                    Method (_DOS, 1, NotSerialized)
                    {
                        And (Arg0, 0x07, ADOS)
                    }

                    Method (_DOD, 0, NotSerialized)
                    {
                        Return (Package (0x04)
                        {
                            0x00010100,
                            0x00010110,
                            0x00010200,
                            0x00010210
                        })
                    }

                    Device (CRT)
                    {
                        Method (_ADR, 0, NotSerialized)
                        {
                            Return (0x0100)
                        }

                        Method (_DCS, 0, NotSerialized)
                        {
                            If (XCRT ())
                            {
                                UPDD ()
                                Return (Or (0x0D, Or (ShiftLeft (ACRT,
0x04), ShiftLeft (CCRT, 0x01))))
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }

                        Method (_DGS, 0, NotSerialized)
                        {
                            Return (WCRT)
                        }

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

                    Device (LCD)
                    {
                        Method (_ADR, 0, NotSerialized)
                        {
                            Return (0x0110)
                        }

                        Method (_DCS, 0, NotSerialized)
                        {
                            If (XLCD ())
                            {
                                UPDD ()
                                Return (Or (0x0D, Or (ShiftLeft (ALCD,
0x04), ShiftLeft (CLCD, 0x01))))
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }

                        Method (_DGS, 0, NotSerialized)
                        {
                            Return (WLCD)
                        }

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

                    Device (TV)
                    {
                        Method (_ADR, 0, NotSerialized)
                        {
                            Return (0x0200)
                        }

                        Method (_DCS, 0, NotSerialized)
                        {
                            If (XTV ())
                            {
                                UPDD ()
                                Return (Or (0x0D, Or (ShiftLeft (ATV, 0x04),
ShiftLeft (CTV, 0x01))))
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }

                        Method (_DGS, 0, NotSerialized)
                        {
                            Return (WTV)
                        }

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

                    Device (DVI)
                    {
                        Method (_ADR, 0, NotSerialized)
                        {
                            Return (0x0210)
                        }

                        Method (_DCS, 0, NotSerialized)
                        {
                            If (XDVI ())
                            {
                                UPDD ()
                                Return (Or (0x0D, Or (ShiftLeft (ADVI,
0x04), ShiftLeft (CDVI, 0x01))))
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }

                        Method (_DGS, 0, NotSerialized)
                        {
                            Return (WDVI)
                        }

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

            Device (PCIB)
            {
                Name (_ADR, 0x00140004)
                Method (_PRT, 0, NotSerialized)
                {
                    If (GPIC)
                    {
                        Return (Package (0x05)
                        {
                            Package (0x04)
                            {
                                0x0008FFFF,
                                0x00,
                                0x00,
                                0x14
                            },

                            Package (0x04)
                            {
                                0x0009FFFF,
                                0x00,
                                0x00,
                                0x14
                            },

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

                            Package (0x04)
                            {
                                0x000AFFFF,
                                0x01,
                                0x00,
                                0x17
                            },

                            Package (0x04)
                            {
                                0x000BFFFF,
                                0x00,
                                0x00,
                                0x16
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x05)
                        {
                            Package (0x04)
                            {
                                0x0008FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKE,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0009FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKE,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x000AFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKG,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x000AFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKH,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x000BFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKG,
                                0x00
                            }
                        })
                    }
                }

                Name (_PRW, Package (0x02)
                {
                    0x04,
                    0x04
                })
            }

            Device (MBIO)
            {
                Name (_HID, EisaId ("PNP0C02"))
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x0F)
                }

                Name (RSRC, ResourceTemplate ()
                {
                    IO (Decode16, 0x0010, 0x0010, 0x01, 0x10)
                    IO (Decode16, 0x0024, 0x0024, 0x01, 0x02)
                    IO (Decode16, 0x0028, 0x0028, 0x01, 0x02)
                    IO (Decode16, 0x002C, 0x002C, 0x01, 0x02)
                    IO (Decode16, 0x002E, 0x002E, 0x01, 0x02)
                    IO (Decode16, 0x0030, 0x0030, 0x01, 0x02)
                    IO (Decode16, 0x0034, 0x0034, 0x01, 0x02)
                    IO (Decode16, 0x0038, 0x0038, 0x01, 0x02)
                    IO (Decode16, 0x003C, 0x003C, 0x01, 0x02)
                    IO (Decode16, 0x0050, 0x0050, 0x01, 0x04)
                    IO (Decode16, 0x0062, 0x0062, 0x01, 0x01)
                    IO (Decode16, 0x0066, 0x0066, 0x01, 0x01)
                    IO (Decode16, 0x0072, 0x0072, 0x01, 0x06)
                    IO (Decode16, 0x0080, 0x0080, 0x01, 0x01)
                    IO (Decode16, 0x0090, 0x0090, 0x01, 0x10)
                    IO (Decode16, 0x00A4, 0x00A4, 0x01, 0x02)
                    IO (Decode16, 0x00A8, 0x00A8, 0x01, 0x02)
                    IO (Decode16, 0x00AC, 0x00AC, 0x01, 0x02)
                    IO (Decode16, 0x00B0, 0x00B0, 0x01, 0x02)
                    IO (Decode16, 0x00B4, 0x00B4, 0x01, 0x02)
                    IO (Decode16, 0x00B8, 0x00B8, 0x01, 0x02)
                    IO (Decode16, 0x00BC, 0x00BC, 0x01, 0x02)
                    IO (Decode16, 0x0220, 0x0220, 0x01, 0x10)
                    IO (Decode16, 0x0280, 0x0280, 0x01, 0x14)
                    IO (Decode16, 0x040B, 0x040B, 0x01, 0x01)
                    IO (Decode16, 0x04D0, 0x04D0, 0x01, 0x02)
                    IO (Decode16, 0x04D6, 0x04D6, 0x01, 0x01)
                    IO (Decode16, 0x087F, 0x087F, 0x01, 0x01)
                    IO (Decode16, 0x0C00, 0x0C00, 0x01, 0x02)
                    IO (Decode16, 0x0C14, 0x0C14, 0x01, 0x01)
                    IO (Decode16, 0x0C50, 0x0C50, 0x01, 0x03)
                    IO (Decode16, 0x0C6C, 0x0C6C, 0x01, 0x01)
                    IO (Decode16, 0x0C6F, 0x0C6F, 0x01, 0x01)
                    IO (Decode16, 0x0CD4, 0x0CD4, 0x01, 0x02)
                    IO (Decode16, 0x0CD6, 0x0CD6, 0x01, 0x02)
                    IO (Decode16, 0x0CD8, 0x0CD8, 0x01, 0x08)
                    IO (Decode16, 0x0F40, 0x0F40, 0x01, 0x02)
                    IO (Decode16, 0x1000, 0x1000, 0x01, 0x80)
                    IO (Decode16, 0x1080, 0x1080, 0x01, 0x80)
                    IO (Decode16, 0x1400, 0x1400, 0x01, 0x80)
                    IO (Decode16, 0x1480, 0x1480, 0x01, 0x80)
                    IO (Decode16, 0xF800, 0xF800, 0x01, 0x80)
                    IO (Decode16, 0xF880, 0xF880, 0x01, 0x80)
                    IO (Decode16, 0xFC00, 0xFC00, 0x01, 0x80)
                    IO (Decode16, 0xFC80, 0xFC80, 0x01, 0x80)
                    IO (Decode16, 0xFD00, 0xFD00, 0x01, 0x70)
                    Memory32Fixed (ReadWrite, 0xFEC00000, 0x00001000)
                    Memory32Fixed (ReadWrite, 0xFEE00000, 0x00001000)
                    Memory32Fixed (ReadWrite, 0xFEF00000, 0x00100000)
                    Memory32Fixed (ReadWrite, 0x000CF000, 0x00001000)
                    Memory32Fixed (ReadWrite, 0xFFB00000, 0x00100000)
                })
                Method (_CRS, 0, Serialized)
                {
                    CreateDWordField (RSRC, 0x0198, MBBS)
                    CreateDWordField (RSRC, 0x019C, MBLN)
                    Store (UMST, MBBS)
                    Store (UMSZ, MBLN)
                    Return (RSRC)
                }
            }

            Device (LPCB)
            {
                Name (_ADR, 0x00140003)
                OperationRegion (SIO, SystemIO, 0x2E, 0x02)
                OperationRegion (FJIO, SystemIO, 0xFD60, 0x0D)
                Scope (\)
                {
                    Field (\_SB.PCI0.LPCB.FJIO, ByteAcc, NoLock, Preserve)
                    {
                        AIDC,   8,
                        ADTC,   8,
                        AIDB,   8,
                        ADTB,   8,
                        AIDA,   8,
                        ADTA,   8,
                        AIDD,   8,
                        ADTD,   8,
                        PMID,   8,
                        Offset (0x0C),
                        PMDT,   8
                    }
                }

                OperationRegion (PMIO, SystemIO, 0x0CD6, 0x02)
                OperationRegion (PCTL, SystemIO, 0xFC30, 0x04)
                Scope (\)
                {
                    Field (\_SB.PCI0.LPCB.PMIO, ByteAcc, NoLock, Preserve)
                    {
                        INPM,   8,
                        DAPM,   8
                    }

                    IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x37),
                            ,   6,
                        LPOL,   1
                    }

                    Field (\_SB.PCI0.LPCB.PCTL, ByteAcc, NoLock, Preserve)
                    {
                            ,   1,
                        THDC,   3,
                        THRE,   1
                    }
                }

                Method (_INI, 0, NotSerialized)
                {
                    Store (Zero, NTFY)
                    \_SB.OSTP ()
                    If (LEqual (\_SB.PCI0.LPCB.CMBT._STA (), 0x00))
                    {
                        \_SB.PCI0.LPCB.CMBT.SWCF ()
                    }

                    AINI ()
                    If (CondRefOf (\DC1S, Local0))
                    {
                        Store (One, RPEN)
                        Store (B2TC, RPDS)
                    }
                }

                Scope (\)
                {
                    IndexField (AIDA, ADTA, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x09),
                        RI1M,   1,
                        RI2M,   1,
                        RI3M,   1,
                        RI4M,   1,
                        RI1,    1,
                        RI2,    1,
                        RI3,    1,
                        RI4,    1,
                            ,   2,
                        CVCL,   1,
                            ,   3,
                        BLCT,   2,
                        Offset (0x20),
                        G5P0,   8,
                        G5C0,   8,
                        G3P0,   8,
                        G3C0,   8,
                        Offset (0x40),
                        SSF0,   8,
                        SSF1,   8,
                        SSM0,   8,
                        SSM1,   8,
                        SSI0,   8,
                        SSTM,   8,
                        SSF2,   8,
                        SSM2,   8,
                        SSI1,   8,
                        Offset (0x52),
                        G3P1,   8,
                        G3C1,   8,
                        G3P2,   8,
                        G3C2,   8,
                        QSWC,   8,
                        Offset (0x60),
                        SSS0,   8,
                        SSS1,   8
                    }

                    IndexField (AIDB, ADTB, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x29),
                        BRCL,   8,
                        LCDB,   8,
                        Offset (0x30),
                        LCDC,   8
                    }

                    IndexField (AIDC, ADTC, ByteAcc, NoLock, Preserve)
                    {
                        TASF,   1,
                        TBSF,   1,
                        B1SU,   1,
                        B1SD,   1,
                        B2SU,   1,
                        B2SD,   1,
                        Offset (0x02),
                            ,   4,
                        VSTB,   1,
                        Offset (0x05),
                            ,   6,
                        ACPW,   1,
                        Offset (0x20),
                        BCTL,   8,
                        Offset (0x23),
                        TAF,    1,
                        TASM,   1,
                            ,   2,
                        TBF,    1,
                        TBSM,   1,
                        Offset (0x24),
                        TIMA,   8,
                        TIMB,   8,
                        Offset (0x28),
                        CDLP,   8,
                        HDLP,   8,
                        FDLP,   8,
                        Offset (0x4E),
                        B1UM,   1,
                        B1DM,   1,
                            ,   1,
                        B1TC,   1,
                        B2UM,   1,
                        B2DM,   1,
                            ,   1,
                        B2TC,   1,
                        BAPC,   6
                    }

                    IndexField (AIDC, ADTC, ByteAcc, NoLock, Preserve)
                    {
                        STAE,   8
                    }

                    IndexField (AIDD, ADTD, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x80),
                        GIDI,   8,
                        GIDC,   8,
                        GIDO,   8,
                        Offset (0x90),
                        G3SI,   8,
                        G3SC,   8,
                        G3SO,   8,
                        G3SM,   8,
                        Offset (0xA0),
                        WOXF,   8,
                        WOXE,   8,
                        WOXD,   8,
                        WOXS,   8,
                        Offset (0xB0),
                        AMPV,   6
                    }
                }

                Scope (\)
                {
                    IndexField (PMID, PMDT, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0xA0),
                        UPPR,   1,
                        ERRO,   1,
                        PASS,   1,
                        PSOK,   1,
                        PSNG,   1,
                        TOUT,   1,
                        SIRN,   1,
                        STSC,   1,
                        OVFL,   1,
                        LWMD,   1,
                        TALM,   1,
                        EMGC,   1,
                        OCNT,   4,
                        Offset (0xC0),
                        Offset (0xC1),
                        B1P,    1,
                        B2P,    1,
                        B1C,    1,
                        B2C,    1,
                        B1ER,   1,
                        B2ER,   1,
                        PKSH,   1,
                        CMB,    1,
                        B1CP,   8,
                        B2CP,   8,
                        BAVG,   8,
                        B1VH,   8,
                        B1VL,   8,
                        B2VH,   8,
                        B2VL,   8,
                        B1TM,   8,
                        B2TM,   8,
                        B1CH,   8,
                        B1CL,   8,
                        B2CH,   8,
                        B2CL,   8,
                        BTMH,   8,
                        BTML,   8,
                        B1LH,   8,
                        B1LL,   8,
                        B2LH,   8,
                        B2LL,   8,
                        B1ID,   4,
                        B1NO,   4,
                        B2ID,   4,
                        B2NO,   4,
                        B1DV,   8,
                        B2DV,   8,
                        B1DH,   8,
                        B1DL,   8,
                        B2DH,   8,
                        B2DL,   8,
                        TBSI,   8,
                        TBSH,   8,
                        TBSL,   8
                    }
                }

                Scope (\)
                {
                    IndexField (AIDA, ADTA, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x22),
                            ,   3,
                        BRST,   1,
                        SOUT,   1,
                        Offset (0x52),
                            ,   2,
                        BY1C,   2
                    }

                    IndexField (AIDC, ADTC, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x4F),
                        BY1O,   1
                    }

                    IndexField (AIDD, ADTD, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x80),
                            ,   2,
                        BY1I,   4,
                        Offset (0xB0),
                        MBLB,   8
                    }
                }

                Method (AINI, 0, NotSerialized)
                {
                    If (TTIM)
                    {
                        Store (Zero, TMBF)
                        Store (0x01, TBSM)
                        Store (0x00, TBSF)
                        Store (0xF0, TIMB)
                    }
                    Else
                    {
                        Store (Zero, TBSM)
                    }

                    Store (LWMD, PLWM)
                    If (PLWM)
                    {
                        Store (0x04, THDC)
                        Store (One, THRE)
                    }
                    Else
                    {
                        Store (Zero, THRE)
                    }
                }

                Name (RGSI, 0x19)
                Device (FJEX)
                {
                    Name (_HID, "FUJ02B1")
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Method (RBLL, 0, NotSerialized)
                    {
                        Return (BLLM)
                    }

                    Scope (\)
                    {
                        Name (LBLL, 0x00)
                        Name (LLCD, Ones)
                    }

                    Method (GBLL, 0, NotSerialized)
                    {
                        Store (LBLL, Local2)
                        Store (LCDB, Local1)
                        If (LNot (LEqual (LLCD, Local1)))
                        {
                            Store (Local1, LLCD)
                            Name (BBCT, Buffer (BLLM) {})
                            Store (BLLT, BBCT)
                            Store (BLLM, Local0)
                            While (Local0)
                            {
                                Decrement (Local0)
                                If (LEqual (GBUF (BBCT, Local0), Local1))
                                {
                                    Store (Local0, Local2)
                                    Store (Local0, LBLL)
                                    Store (Zero, Local0)
                                }
                            }
                        }

                        If (BHKF)
                        {
                            Store (Zero, BHKF)
                            Or (Local2, 0x80000000, Local2)
                        }

                        Return (Local2)
                    }

                    Method (SBLL, 1, NotSerialized)
                    {
                        If (NGTF)
                        {
                            Store (Arg0, LSBL)
                            Return (Zero)
                        }

                        If (LLess (Arg0, BLLM))
                        {
                            Name (BBCT, Buffer (BLLM) {})
                            Store (BLLT, BBCT)
                            CreateByteField (BBCT, Arg0, BLL0)
                            Store (BLL0, LCDB)
                            Store (Arg0, DVID)
                            Store (0x82, CMD)
                            Store (Zero, SSMI)
                        }
                    }

                    Method (GBUF, 2, NotSerialized)
                    {
                        CreateByteField (Arg0, Arg1, BLL0)
                        Return (BLL0)
                    }

                    Method (GMOU, 0, NotSerialized)
                    {
                        Store (0x02, DVID)
                        Store (0x91, CMD)
                        Store (Zero, SSMI)
                        Store (DVID, Local0)
                        If (MHKF)
                        {
                            Store (Zero, MHKF)
                            Or (Local0, 0x80000000, Local0)
                        }

                        Return (Local0)
                    }

                    Method (SMOU, 1, NotSerialized)
                    {
                        If (LNot (LGreater (Arg0, One)))
                        {
                            Store (Arg0, DVID)
                            Store (0x91, CMD)
                            Store (Zero, SSMI)
                        }
                    }

                    Method (GHKS, 0, NotSerialized)
                    {
                        Return (AHKF)
                    }

                    Method (GSIF, 0, NotSerialized)
                    {
                        If (IMTF)
                        {
                            Or (RGSI, 0x08, RGSI)
                        }
                        Else
                        {
                            And (RGSI, 0xFFFFFFF7, RGSI)
                        }

                        Return (RGSI)
                    }
                }

                Scope (\)
                {
                    Name (BTWK, Zero)
                    Name (BTBL, Zero)
                    Name (BTST, Zero)
                    IndexField (AIDA, ADTA, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x20),
                            ,   5,
                        ABEX,   1,
                        Offset (0x44),
                            ,   2,
                        WLSW,   1,
                        Offset (0x52),
                            ,   1,
                        WLRF,   1,
                        Offset (0x54),
                            ,   3,
                        ABAT,   1
                    }

                    IndexField (AIDC, ADTC, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x30),
                        ABLC,   1
                    }

                    IndexField (AIDD, ADTD, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x92),
                            ,   3,
                        ABON,   1,
                            ,   1,
                        ABDT,   1
                    }
                }

                Device (CMBT)
                {
                    Name (_HID, "FUJ02E1")
                    Method (_STA, 0, NotSerialized)
                    {
                        If (ABEX)
                        {
                            Return (0x00)
                        }
                        Else
                        {
                            If (BLEN)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        Store (Zero, BTWK)
                        Store (Zero, BTBL)
                        SWCF ()
                    }

                    Method (INFO, 0, NotSerialized)
                    {
                        If (LEqual (_STA (), 0x0F))
                        {
                            Store (0x97, Local0)
                        }
                        Else
                        {
                            Store (0x90, Local0)
                        }

                        Or (Local0, 0x08, Local0)
                        Return (Local0)
                    }

                    Method (STAT, 0, NotSerialized)
                    {
                        Store (0x00, Local0)
                        If (ABON)
                        {
                            Or (Local0, 0x02, Local0)
                        }

                        If (BTWK)
                        {
                            Or (Local0, 0x04, Local0)
                        }

                        If (WLRF)
                        {
                            Or (Local0, 0x08, Local0)
                        }

                        If (LNot (ABAT))
                        {
                            Or (Local0, 0x10, Local0)
                        }

                        If (ABLC)
                        {
                            Or (Local0, 0x20, Local0)
                        }

                        If (BTBL)
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Return (Local0)
                    }

                    Method (CNTL, 2, NotSerialized)
                    {
                        If (And (Arg0, 0x02))
                        {
                            If (LEqual (_STA (), 0x0F))
                            {
                                If (And (Arg1, 0x02))
                                {
                                    Store (One, ABON)
                                }
                                Else
                                {
                                    Store (Zero, ABON)
                                }
                            }
                        }

                        If (And (Arg0, 0x04))
                        {
                            If (LEqual (_STA (), 0x0F))
                            {
                                ShiftRight (And (Arg1, 0x04), 0x02, BTWK)
                            }
                        }

                        If (LAnd (And (Arg0, 0x08), WLEN))
                        {
                            ShiftRight (And (Arg1, 0x08), 0x03, WLRF)
                        }

                        If (And (Arg0, 0x10))
                        {
                            If (And (Arg1, 0x10))
                            {
                                Store (Zero, ABAT)
                            }
                            Else
                            {
                                Store (One, ABAT)
                            }
                        }

                        If (And (Arg0, 0x20))
                        {
                            ShiftRight (And (Arg1, 0x20), 0x05, ABLC)
                        }

                        If (And (Arg0, 0x80))
                        {
                            ShiftRight (And (Arg1, 0x80), 0x07, BTBL)
                            If (BTBL)
                            {
                                If (WLSW)
                                {
                                    Notify (CMBT, 0x81)
                                }
                                Else
                                {
                                    Notify (CMBT, 0x82)
                                }
                            }
                        }
                    }

                    Method (SWCF, 0, NotSerialized)
                    {
                        If (BTBL)
                        {
                            If (WLSW)
                            {
                                Notify (CMBT, 0x81)
                            }
                            Else
                            {
                                Notify (CMBT, 0x82)
                            }
                        }
                        Else
                        {
                            If (WLSW)
                            {
                                If (LEqual (_STA (), 0x0F))
                                {
                                    Store (One, ABON)
                                    Store (Zero, ABDT)
                                    Store (One, ABLC)
                                    If (WLEN)
                                    {
                                        Store (One, WLRF)
                                    }
                                    Else
                                    {
                                        Store (Zero, WLRF)
                                    }

                                    Store (Zero, ABAT)
                                }
                                Else
                                {
                                    Store (Zero, ABON)
                                    Store (Zero, ABDT)
                                    If (WLEN)
                                    {
                                        Store (One, WLRF)
                                        Store (One, ABLC)
                                    }
                                    Else
                                    {
                                        Store (Zero, WLRF)
                                        Store (Zero, ABLC)
                                    }

                                    Store (One, ABAT)
                                }
                            }
                            Else
                            {
                                Store (Zero, ABON)
                                Store (Zero, ABDT)
                                Store (Zero, WLRF)
                                Store (Zero, ABLC)
                                Store (One, ABAT)
                            }
                        }
                    }

                    Method (BPTS, 1, NotSerialized)
                    {
                        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
                        {
                            Store (WLRF, BTST)
                            Or (ShiftLeft (ABAT, 0x01), BTST, BTST)
                            Or (ShiftLeft (WLSW, 0x02), BTST, BTST)
                            Or (ShiftLeft (ABON, 0x03), BTST, BTST)
                            Or (ShiftLeft (ABDT, 0x04), BTST, BTST)
                            If (LAnd (LEqual (_STA (), 0x0F), LAnd (BTWK,
WLSW)))
                            {
                                Store (Zero, WLRF)
                                Store (Zero, ABAT)
                            }
                            Else
                            {
                                Store (Zero, WLRF)
                                Store (One, ABAT)
                            }

                            Store (Zero, ABLC)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x05))
                            {
                                Store (Zero, ABON)
                                Store (Zero, ABDT)
                                Store (Zero, WLRF)
                                Store (Zero, ABLC)
                                Store (One, ABAT)
                            }
                        }
                    }

                    Method (BWAK, 1, NotSerialized)
                    {
                        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
                        {
                            Store (0x94, CMD)
                            Store (Zero, SSMI)
                            If (WBLT)
                            {
                                Notify (\_SB.PWRB, 0x02)
                            }

                            Store (And (BTST, 0x01), WLRF)
                            ShiftRight (And (BTST, 0x02), 0x01, ABAT)
                            ShiftRight (And (BTST, 0x08), 0x03, ABON)
                            ShiftRight (And (BTST, 0x10), 0x04, ABDT)
                            If (LAnd (WLSW, LOr (WLEN, ABON)))
                            {
                                Store (One, ABLC)
                            }

                            If (LNot (LEqual (ShiftRight (And (BTST, 0x04),
0x02), WLSW)))
                            {
                                SWCF ()
                            }
                        }
                    }
                }

                Device (DMAC)
                {
                    Name (_HID, EisaId ("PNP0200"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
                        IO (Decode16, 0x0081, 0x0081, 0x01, 0x0F)
                        IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
                        DMA (Compatibility, NotBusMaster, Transfer16) {4}
                    })
                }

                Device (TIME)
                {
                    Name (_HID, EisaId ("PNP0100"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0040, 0x0040, 0x01, 0x04)
                        IRQNoFlags () {0}
                    })
                }

                Device (PIC)
                {
                    Name (_HID, EisaId ("PNP0000"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0020, 0x0020, 0x01, 0x02)
                        IO (Decode16, 0x00A0, 0x00A0, 0x01, 0x02)
                        IRQNoFlags () {2}
                    })
                }

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0070, 0x0070, 0x01, 0x02)
                        IRQNoFlags () {8}
                    })
                }

                Device (SPKR)
                {
                    Name (_HID, EisaId ("PNP0800"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0061, 0x0061, 0x01, 0x01)
                    })
                }

                Device (MATH)
                {
                    Name (_HID, EisaId ("PNP0C04"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x00F0, 0x00F0, 0x01, 0x0F)
                        IRQNoFlags () {13}
                    })
                }

                Device (KBC)
                {
                    Name (R101, 0x0303D041)
                    Name (R106, 0x2003D041)
                    Method (_HID, 0, NotSerialized)
                    {
                        If (SIDF)
                        {
                            Return (R101)
                        }
                        Else
                        {
                            Return (R106)
                        }
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

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

                Device (PS2M)
                {
                    Name (_HID, EisaId ("PNP0F13"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IRQNoFlags () {12}
                    })
                }

                OperationRegion (LPCR, PCI_Config, 0x44, 0x07)
                Field (LPCR, ByteAcc, NoLock, Preserve)
                {
                    X378,   2,
                    X278,   2,
                    X3BC,   2,
                    X3F8,   1,
                    X2F8,   1,
                    X220,   1,
                    X228,   1,
                    X238,   1,
                    X2E8,   1,
                    X338,   1,
                    X3E8,   1,
                    X230,   1,
                    X240,   1,
                    X260,   1,
                    X280,   1,
                    X300,   1,
                    X310,   1,
                    X320,   1,
                    X330,   1,
                    X530,   1,
                    X604,   1,
                    XE80,   1,
                    XF40,   1,
                    X3F0,   1,
                    X370,   1,
                    X200,   1,
                        ,   1,
                        ,   1,
                    X388,   1,
                    X02E,   1,
                    X04E,   1,
                        ,   1,
                        ,   1,
                        ,   1,
                        ,   1,
                    X070,   1,
                    Offset (0x06),
                    X400,   1,
                    X480,   1,
                    X500,   1,
                    X580,   1,
                        ,   1,
                        ,   1,
                        ,   1,
                    Offset (0x07)
                }

                Method (DENA, 3, Serialized)
                {
                    If (LEqual (Arg0, 0x00))
                    {
                        DDIS (Arg0)
                        If (LEqual (Arg1, 0x03F8))
                        {
                            Store (One, X3F8)
                        }

                        If (LEqual (Arg1, 0x02F8))
                        {
                            Store (One, X2F8)
                        }

                        If (LEqual (Arg1, 0x03E8))
                        {
                            Store (One, X3E8)
                        }

                        If (LEqual (Arg1, 0x02E8))
                        {
                            Store (One, X2E8)
                        }
                    }

                    If (LOr (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x02)),
LEqual (Arg0, 0x03)))
                    {
                        DDIS (Arg0)
                        If (LEqual (Arg1, 0x03F8))
                        {
                            Store (One, X3F8)
                        }

                        If (LEqual (Arg1, 0x02F8))
                        {
                            Store (One, X2F8)
                        }

                        If (LEqual (Arg1, 0x03E8))
                        {
                            Store (One, X3E8)
                        }

                        If (LEqual (Arg1, 0x02E8))
                        {
                            Store (One, X2E8)
                        }

                        If (LEqual (Arg0, 0x03))
                        {
                            If (LEqual (Arg2, 0x0400))
                            {
                                Store (One, X400)
                            }

                            If (LEqual (Arg2, 0x0480))
                            {
                                Store (One, X480)
                            }

                            If (LEqual (Arg2, 0x0500))
                            {
                                Store (One, X500)
                            }

                            If (LEqual (Arg2, 0x0580))
                            {
                                Store (One, X580)
                            }
                        }
                    }

                    If (LOr (LEqual (Arg0, 0x04), LEqual (Arg0, 0x05)))
                    {
                        DDIS (Arg0)
                        If (LEqual (Arg1, 0x0378))
                        {
                            Store (0x03, X378)
                        }

                        If (LEqual (Arg1, 0x0278))
                        {
                            Store (0x03, X278)
                        }

                        If (LEqual (Arg1, 0x03BC))
                        {
                            Store (0x03, X3BC)
                        }
                    }

                    If (LEqual (Arg0, 0x07))
                    {
                        DDIS (Arg0)
                        If (LEqual (Arg1, 0x03F0))
                        {
                            Store (One, X3F0)
                        }

                        If (LEqual (Arg1, 0x0370))
                        {
                            Store (One, X370)
                        }
                    }
                }

                Method (DDIS, 1, Serialized)
                {
                    If (LEqual (Arg0, 0x00))
                    {
                        GETR (0x01, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        If (LNot (LEqual (Local0, 0x03F8)))
                        {
                            Store (Zero, X3F8)
                        }

                        If (LNot (LEqual (Local0, 0x02F8)))
                        {
                            Store (Zero, X2F8)
                        }

                        If (LNot (LEqual (Local0, 0x03E8)))
                        {
                            Store (Zero, X3E8)
                        }

                        If (LNot (LEqual (Local0, 0x02E8)))
                        {
                            Store (Zero, X2E8)
                        }
                    }

                    If (LOr (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x02)),
LEqual (Arg0, 0x03)))
                    {
                        GETR (0x00, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        If (LNot (LEqual (Local0, 0x03F8)))
                        {
                            Store (Zero, X3F8)
                        }

                        If (LNot (LEqual (Local0, 0x02F8)))
                        {
                            Store (Zero, X2F8)
                        }

                        If (LNot (LEqual (Local0, 0x03E8)))
                        {
                            Store (Zero, X3E8)
                        }

                        If (LNot (LEqual (Local0, 0x02E8)))
                        {
                            Store (Zero, X2E8)
                        }

                        If (LEqual (Arg0, 0x03))
                        {
                            Store (Zero, X400)
                            Store (Zero, X480)
                            Store (Zero, X500)
                            Store (Zero, X580)
                        }
                    }

                    If (LOr (LEqual (Arg0, 0x04), LEqual (Arg0, 0x05)))
                    {
                        Store (Zero, X378)
                        Store (Zero, X278)
                        Store (Zero, X3BC)
                    }

                    If (LEqual (Arg0, 0x07))
                    {
                        Store (Zero, X3F0)
                        Store (Zero, X370)
                    }
                }

                Field (SIO, ByteAcc, NoLock, Preserve)
                {
                    SIID,   8,
                    SIDT,   8
                }

                IndexField (SIID, SIDT, ByteAcc, NoLock, Preserve)
                {
                        ,   3,
                    FDCP,   1,
                    Offset (0x01),
                        ,   2,
                    PPP,    1,
                    PPM,    1,
                    Offset (0x02),
                        ,   3,
                    U1P,    1,
                        ,   3,
                    U2P,    1,
                    Offset (0x04),
                    PPEM,   2,
                    Offset (0x0C),
                    U2MD,   6,
                    Offset (0x20),
                    FDA,    8,
                        ,   2,
                    ETOS,   1,
                    Offset (0x23),
                    PPA,    8,
                    U1A,    8,
                    U2A,    8,
                    PPD,    4,
                    FDD,    4,
                    PPI,    4,
                    FDI,    4,
                    U2I,    4,
                    U1I,    4,
                    Offset (0x2B),
                    IRA,    8,
                    IRD,    4
                }

                Mutex (MTXS, 0x00)
                Method (ENTR, 0, NotSerialized)
                {
                    Acquire (MTXS, 0xFFFF)
                    Store (0x55, SIID)
                }

                Method (EXIT, 0, NotSerialized)
                {
                    Store (0xAA, SIID)
                    Release (MTXS)
                }

                Method (SETR, 5, NotSerialized)
                {
                    ENTR ()
                    If (Arg3)
                    {
                        Subtract (FindSetRightBit (Arg3), One, Local0)
                    }
                    Else
                    {
                        Store (Zero, Local0)
                    }

                    If (Arg4)
                    {
                        Subtract (FindSetRightBit (Arg4), One, Local1)
                    }
                    Else
                    {
                        Store (0x0F, Local1)
                    }

                    If (LEqual (Arg0, 0x00))
                    {
                        ShiftRight (Arg1, 0x02, U1A)
                        Store (Local0, U1I)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            ShiftRight (Arg1, 0x02, U2A)
                            Store (Local0, U2I)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                ShiftRight (Arg1, 0x02, U2A)
                                Store (Local0, U2I)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    ShiftRight (Arg1, 0x02, U2A)
                                    ShiftRight (Arg2, 0x03, IRA)
                                    Store (Local0, U2I)
                                    Store (Local1, IRD)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        ShiftRight (Arg1, 0x02, PPA)
                                        Store (Local0, PPI)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            ShiftRight (Arg1, 0x02, PPA)
                                            Store (Local0, PPI)
                                            Store (Local1, PPD)
                                        }
                                        Else
                                        {
                                            If (LEqual (Arg0, 0x07))
                                            {
                                                ShiftRight (Arg1, 0x02, FDA)
                                                Store (Local0, FDI)
                                                Store (Local1, FDD)
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    EXIT ()
                    If (Arg1)
                    {
                        If (CondRefOf (DENA, Local0))
                        {
                            DENA (Arg0, Arg1, Arg2)
                        }

                        SETM (Arg0)
                    }
                    Else
                    {
                        If (CondRefOf (DDIS, Local0))
                        {
                            DDIS (Arg0)
                        }
                    }
                }

                Method (GETR, 5, NotSerialized)
                {
                    ENTR ()
                    Store (Zero, Local0)
                    Store (0x0F, Local1)
                    If (LEqual (Arg0, 0x00))
                    {
                        ShiftLeft (U1A, 0x02, Arg1)
                        Store (U1I, Local0)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            ShiftLeft (U2A, 0x02, Arg1)
                            Store (U2I, Local0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                ShiftLeft (U2A, 0x02, Arg1)
                                Store (U2I, Local0)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    ShiftLeft (U2A, 0x02, Arg1)
                                    ShiftLeft (IRA, 0x03, Arg2)
                                    Store (U2I, Local0)
                                    Store (IRD, Local1)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        ShiftLeft (PPA, 0x02, Arg1)
                                        Store (PPI, Local0)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            ShiftLeft (PPA, 0x02, Arg1)
                                            Store (PPI, Local0)
                                            Store (PPD, Local1)
                                        }
                                        Else
                                        {
                                            If (LEqual (Arg0, 0x07))
                                            {
                                                ShiftLeft (FDA, 0x02, Arg1)
                                                Store (FDI, Local0)
                                                Store (FDD, Local1)
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    If (Local0)
                    {
                        ShiftLeft (One, Local0, Arg3)
                    }
                    Else
                    {
                        Store (Zero, Arg3)
                    }

                    If (LNot (LEqual (Local1, 0x0F)))
                    {
                        ShiftLeft (One, Local1, Arg4)
                    }
                    Else
                    {
                        Store (Zero, Arg4)
                    }

                    EXIT ()
                }

                Method (SETM, 1, NotSerialized)
                {
                    ENTR ()
                    If (LEqual (Arg0, 0x00))
                    {
                        Store (One, U1P)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            Store (0x06, U2MD)
                            Store (One, U2P)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                Store (0x0E, U2MD)
                                Store (One, U2P)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    Store (0x0E, U2MD)
                                    Store (One, U2P)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        If (LEqual (PPF, One))
                                        {
                                            Store (One, PPM)
                                        }
                                        Else
                                        {
                                            Store (Zero, PPM)
                                            Store (Zero, PPEM)
                                        }

                                        Store (One, PPP)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            Store (Zero, PPM)
                                            Store (0x02, PPEM)
                                            Store (One, PPP)
                                        }
                                    }
                                }
                            }
                        }
                    }

                    EXIT ()
                }

                Method (SETP, 2, NotSerialized)
                {
                    ENTR ()
                    If (LEqual (Arg0, 0x00))
                    {
                        Store (Arg1, U1P)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            Store (Arg1, U2P)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                Store (Arg1, U2P)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    Store (Arg1, U2P)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        Store (Arg1, PPP)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            Store (Arg1, PPP)
                                        }
                                    }
                                }
                            }
                        }
                    }

                    EXIT ()
                }

                Method (GETP, 1, NotSerialized)
                {
                    Store (Zero, Local0)
                    ENTR ()
                    If (LEqual (Arg0, 0x00))
                    {
                        Store (U1P, Local0)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            Store (U2P, Local0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                Store (U2P, Local0)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    Store (U2P, Local0)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        Store (PPP, Local0)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            Store (PPP, Local0)
                                        }
                                    }
                                }
                            }
                        }
                    }

                    EXIT ()
                    Return (Local0)
                }

                Method (CHKM, 1, NotSerialized)
                {
                    If (LEqual (Arg0, 0x00))
                    {
                        If (SPAF)
                        {
                            Return (One)
                        }
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            If (LEqual (SPBF, 0x03))
                            {
                                Return (One)
                            }
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                If (LEqual (SPBF, One))
                                {
                                    Return (One)
                                }
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    If (LEqual (SPBF, 0x02))
                                    {
                                        Return (One)
                                    }
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        If (LOr (LEqual (PPF, One), LEqual
(PPF, 0x02)))
                                        {
                                            Return (One)
                                        }
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x05))
                                        {
                                            If (LEqual (PPF, 0x03))
                                            {
                                                Return (One)
                                            }
                                        }
                                        Else
                                        {
                                            If (LEqual (Arg0, 0x07))
                                            {
                                                If (FDCF)
                                                {
                                                    Return (One)
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    Return (Zero)
                }

                Device (UAR1)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x01)
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
                        IRQNoFlags () {4}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x01, 0x08)
                        }
                        EndDependentFn ()
                        IRQNoFlags () {3,4,10,11}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x00))
                        {
                            GETR (0x00, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateWordField (RSRC, 0x09, IRQ1)
                        GETR (0x00, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        Store (Local2, IRQ1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x09, IRQ1)
                        SETR (0x00, IO11, Zero, IRQ1, Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x00, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x00))
                        {
                            SETM (0x00)
                        }
                    }
                }

                Device (UAR2)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x02)
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        IRQNoFlags () {4}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
                        }
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x01, 0x08)
                        }
                        EndDependentFn ()
                        IRQNoFlags () {3,4,10,11}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x01))
                        {
                            GETR (0x01, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateWordField (RSRC, 0x09, IRQ1)
                        GETR (0x01, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        Store (Local2, IRQ1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x09, IRQ1)
                        SETR (0x01, IO11, Zero, IRQ1, Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x01, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x01))
                        {
                            SETM (0x01)
                        }
                    }
                }

                Device (IRDA)
                {
                    Name (_HID, EisaId ("PNP0510"))
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        IRQNoFlags () {3}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
                        }
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x01, 0x08)
                        }
                        EndDependentFn ()
                        IRQNoFlags () {3,4,10,11}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x02))
                        {
                            GETR (0x02, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateWordField (RSRC, 0x09, IRQ1)
                        GETR (0x02, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        Store (Local2, IRQ1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x09, IRQ1)
                        SETR (0x02, IO11, Zero, IRQ1, Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x02, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x02))
                        {
                            SETM (0x02)
                        }
                    }

                    Method (_PSC, 0, NotSerialized)
                    {
                        If (GETP (0x02))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (0x03)
                        }
                    }

                    Method (_PS0, 0, NotSerialized)
                    {
                        SETP (0x02, One)
                    }

                    Method (_PS3, 0, NotSerialized)
                    {
                        SETR (0x02, Zero, Zero, Zero, Zero)
                        SETP (0x02, Zero)
                    }
                }

                Device (FIR)
                {
                    Name (_HID, EisaId ("SMCF010"))
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        IO (Decode16, 0x0400, 0x0400, 0x80, 0x40)
                        IRQNoFlags () {4}
                        DMA (Compatibility, NotBusMaster, Transfer8) {}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
                        }
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x01, 0x08)
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x01, 0x08)
                        }
                        EndDependentFn ()
                        IO (Decode16, 0x0400, 0x0580, 0x80, 0x40)
                        IRQNoFlags () {3,4,10,11}
                        DMA (Compatibility, NotBusMaster, Transfer8) {1,3}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x03))
                        {
                            GETR (0x03, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateWordField (RSRC, 0x0A, IO21)
                        CreateWordField (RSRC, 0x0C, IO22)
                        CreateWordField (RSRC, 0x11, IRQ1)
                        CreateByteField (RSRC, 0x14, DMA1)
                        GETR (0x03, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        Store (Local1, IO21)
                        Store (Local1, IO22)
                        Store (Local2, IRQ1)
                        Store (Local3, DMA1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x0C, IO21)
                        CreateWordField (Arg0, 0x11, IRQ1)
                        CreateByteField (Arg0, 0x14, DMA1)
                        SETR (0x03, IO11, IO21, IRQ1, DMA1)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x03, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x03))
                        {
                            SETM (0x03)
                        }
                    }

                    Method (_PSC, 0, NotSerialized)
                    {
                        If (GETP (0x03))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (0x03)
                        }
                    }

                    Method (_PS0, 0, NotSerialized)
                    {
                        SETP (0x03, One)
                    }

                    Method (_PS3, 0, NotSerialized)
                    {
                        SETR (0x03, Zero, Zero, Zero, Zero)
                        SETP (0x03, Zero)
                    }
                }

                Device (LPT)
                {
                    Name (_HID, EisaId ("PNP0400"))
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                        IRQNoFlags () {7}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                            IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                            IO (Decode16, 0x0678, 0x0678, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                            IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                            IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                            IO (Decode16, 0x0678, 0x0678, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                            IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        EndDependentFn ()
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x04))
                        {
                            GETR (0x04, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateByteField (RSRC, 0x07, IO1L)
                        CreateWordField (RSRC, 0x0A, IO21)
                        CreateWordField (RSRC, 0x0C, IO22)
                        CreateWordField (RSRC, 0x11, IRQ1)
                        GETR (0x04, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        If (LEqual (Local0, 0x03BC))
                        {
                            Store (0x04, IO1L)
                        }
                        Else
                        {
                            Store (0x08, IO1L)
                        }

                        Add (Local0, 0x0400, IO21)
                        Store (IO21, IO22)
                        Store (Local2, IRQ1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x11, IRQ1)
                        SETR (0x04, IO11, Zero, IRQ1, Zero)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x04, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x04))
                        {
                            SETM (0x04)
                        }
                    }
                }

                Device (ECP)
                {
                    Name (_HID, EisaId ("PNP0401"))
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                        IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                        IRQNoFlags () {7}
                        DMA (Compatibility, NotBusMaster, Transfer8) {}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                            IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                            IO (Decode16, 0x0678, 0x0678, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                            IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                            IRQNoFlags () {7}
                        }
                        StartDependentFn (0x00, 0x01)
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x01, 0x08)
                            IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x01, 0x08)
                            IO (Decode16, 0x0678, 0x0678, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x01, 0x04)
                            IO (Decode16, 0x07BC, 0x07BC, 0x01, 0x04)
                            IRQNoFlags () {5}
                        }
                        EndDependentFn ()
                        DMA (Compatibility, NotBusMaster, Transfer8) {1,3}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x05))
                        {
                            GETR (0x05, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateByteField (RSRC, 0x07, IO1L)
                        CreateWordField (RSRC, 0x0A, IO21)
                        CreateWordField (RSRC, 0x0C, IO22)
                        CreateWordField (RSRC, 0x11, IRQ1)
                        CreateByteField (RSRC, 0x14, DMA1)
                        GETR (0x05, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        If (LEqual (Local0, 0x03BC))
                        {
                            Store (0x04, IO1L)
                        }
                        Else
                        {
                            Store (0x08, IO1L)
                        }

                        Add (Local0, 0x0400, IO21)
                        Store (IO21, IO22)
                        Store (Local2, IRQ1)
                        Store (Local3, DMA1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x11, IRQ1)
                        CreateByteField (Arg0, 0x14, DMA1)
                        SETR (0x05, IO11, Zero, IRQ1, DMA1)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x05, Zero, Zero, Zero, Zero)
                    }

                    Method (_INI, 0, NotSerialized)
                    {
                        If (CHKM (0x05))
                        {
                            SETM (0x05)
                        }
                    }
                }

                Device (FDC)
                {
                    Name (_HID, EisaId ("PNP0700"))
                    Name (RSRC, ResourceTemplate ()
                    {
                        IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
                        IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                        IRQNoFlags () {6}
                        DMA (Compatibility, NotBusMaster, Transfer8) {2}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
                        IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                        IRQNoFlags () {6}
                        DMA (Compatibility, NotBusMaster, Transfer8) {2}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (CHKM (0x07))
                        {
                            GETR (0x07, RefOf (Local0), RefOf (Local1),
RefOf (Local2), RefOf (Local3))
                            If (Local0)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x0D)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (RSRC, 0x02, IO11)
                        CreateWordField (RSRC, 0x04, IO12)
                        CreateWordField (RSRC, 0x0A, IO21)
                        CreateWordField (RSRC, 0x0C, IO22)
                        CreateWordField (RSRC, 0x11, IRQ1)
                        CreateByteField (RSRC, 0x14, DMA1)
                        GETR (0x07, RefOf (Local0), RefOf (Local1), RefOf
(Local2), RefOf (Local3))
                        Store (Local0, IO11)
                        Store (Local0, IO12)
                        Add (Local0, 0x07, IO21)
                        Store (IO21, IO22)
                        Store (Local2, IRQ1)
                        Store (Local3, DMA1)
                        Return (RSRC)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x04, IO11)
                        CreateWordField (Arg0, 0x11, IRQ1)
                        CreateByteField (Arg0, 0x14, DMA1)
                        SETR (0x07, IO11, Zero, IRQ1, DMA1)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        SETR (0x07, Zero, Zero, Zero, Zero)
                    }

                    Method (_FDE, 0, NotSerialized)
                    {
                        If (FDS0)
                        {
                            Store (0x01, Index (FDEB, 0x00))
                        }

                        If (FDS1)
                        {
                            Store (0x01, Index (FDEB, 0x04))
                        }

                        Return (FDEB)
                    }

                    Name (FDEB, Buffer (0x14)
                    {
                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                        0x00, 0x00, 0x00, 0x00
                    })
                    Device (DRV0)
                    {
                        Name (_ADR, 0x00)
                        Method (_STA, 0, NotSerialized)
                        {
                            If (FDS0)
                            {
                                Store (0x0F, Local7)
                            }
                            Else
                            {
                                Store (0x00, Local7)
                            }

                            Return (Local7)
                        }

                        Method (_FDI, 0, NotSerialized)
                        {
                            If (LOr (FDS1, LNot (LEqual (FDS0, 0x04))))
                            {
                                MKFP (FDS0)
                            }

                            Return (FPPK)
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, 0x01)
                        Method (_STA, 0, NotSerialized)
                        {
                            If (FDS1)
                            {
                                Store (0x0F, Local7)
                            }
                            Else
                            {
                                Store (0x00, Local7)
                            }

                            Return (Local7)
                        }

                        Method (_FDI, 0, NotSerialized)
                        {
                            MKFP (FDS1)
                            Return (FPPK)
                        }
                    }

                    Method (MKFP, 1, NotSerialized)
                    {
                        If (LEqual (Arg0, 0x01))
                        {
                            Store (FP5D, FPBF)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                Store (FP5H, FPBF)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    Store (FP3D, FPBF)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x04))
                                    {
                                        Store (FP3H, FPBF)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x06))
                                        {
                                            Store (FP3E, FPBF)
                                        }
                                    }
                                }
                            }
                        }

                        If (FDS1)
                        {
                            Store (0x02, Index (FPBF, 0x00))
                        }

                        Store (0x00, Local0)
                        While (LGreater (0x10, Local0))
                        {
                            Store (DerefOf (Index (FPBF, Local0)), Index
(FPPK, Local0))
                            Increment (Local0)
                        }
                    }

                    Name (FPPK, Package (0x10)
                    {
                        0x01,
                        0x04,
                        0x4F,
                        0x12,
                        0x01,
                        0xDF,
                        0x02,
                        0x25,
                        0x02,
                        0x12,
                        0x1B,
                        0xFF,
                        0x6C,
                        0xF6,
                        0x0F,
                        0x05
                    })
                    Name (FPBF, Buffer (0x10) {})
                    Name (FP5D, Buffer (0x10)
                    {
                        0x01, 0x01, 0x27, 0x09, 0x01, 0xDF, 0x02, 0x25,
                        0x02, 0x09, 0x2A, 0xFF, 0x50, 0xF6, 0x0F, 0x06
                    })
                    Name (FP5H, Buffer (0x10)
                    {
                        0x01, 0x02, 0x4F, 0x0F, 0x01, 0xDF, 0x04, 0x25,
                        0x02, 0x0F, 0x1B, 0xFF, 0x54, 0xF6, 0x0F, 0x06
                    })
                    Name (FP3D, Buffer (0x10)
                    {
                        0x01, 0x03, 0x4F, 0x09, 0x01, 0xEF, 0x02, 0x25,
                        0x02, 0x09, 0x1B, 0xFF, 0x50, 0xF6, 0x0F, 0x05
                    })
                    Name (FP3H, Buffer (0x10)
                    {
                        0x01, 0x04, 0x4F, 0x12, 0x01, 0xDF, 0x02, 0x25,
                        0x02, 0x12, 0x1B, 0xFF, 0x6C, 0xF6, 0x0F, 0x05
                    })
                    Name (FP3E, Buffer (0x10)
                    {
                        0x01, 0x06, 0x4F, 0x24, 0x01, 0xAA, 0x08, 0x25,
                        0x02, 0x24, 0x1B, 0xFF, 0x54, 0xF6, 0x0F, 0x05
                    })
                }

                Scope (\_SB.PCI0.LPCB.UAR1)
                {
                    Name (_PRW, Package (0x02)
                    {
                        0x10,
                        0x03
                    })
                    Method (_PSW, 1, NotSerialized)
                    {
                        If (Arg0)
                        {
                            Store (Zero, RI1M)
                        }
                        Else
                        {
                            Store (One, RI1M)
                        }
                    }
                }

                OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
                Field (PIRQ, ByteAcc, NoLock, Preserve)
                {
                    PIID,   8,
                    PIDA,   8
                }

                IndexField (PIID, PIDA, ByteAcc, NoLock, Preserve)
                {
                    PIRA,   8,
                    PIRB,   8,
                    PIRC,   8,
                    PIRD,   8,
                    PIRS,   8,
                    Offset (0x09),
                    PIRE,   8,
                    PIRF,   8,
                    PIRG,   8,
                    PIRH,   8
                }

                Name (IPRS, ResourceTemplate ()
                {
                    IRQ (Level, ActiveLow, Shared) {10,11}
                })
                Method (DSPI, 0, NotSerialized)
                {
                    Store (0x00, PIRA)
                    Store (0x00, PIRB)
                    Store (0x00, PIRC)
                    Store (0x00, PIRD)
                    Store (0x00, PIRS)
                    Store (0x00, PIRE)
                    Store (0x00, PIRF)
                    Store (0x00, PIRG)
                    Store (0x00, PIRH)
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRA, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRA)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRB, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRB)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRC, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRC)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRD, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRD)
                    }
                }

                Device (LNKE)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x05)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (PIRD)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRE, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRE)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRF, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRF)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRG, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRG)
                    }
                }

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

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

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

                    Method (_CRS, 0, NotSerialized)
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRH, IRQ0)
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRH)
                    }
                }
            }

            Device (IDE)
            {
                Name (_ADR, 0x00140001)
                Name (UDMT, Package (0x08)
                {
                    0x78,
                    0x5A,
                    0x3C,
                    0x2D,
                    0x1E,
                    0x14,
                    0x0F,
                    0x00
                })
                Name (PIOT, Package (0x06)
                {
                    0x0258,
                    0x0186,
                    0x010E,
                    0xB4,
                    0x78,
                    0x00
                })
                Name (PITR, Package (0x06)
                {
                    0x99,
                    0x47,
                    0x34,
                    0x22,
                    0x20,
                    0x99
                })
                Name (MDMT, Package (0x04)
                {
                    0x01E0,
                    0x96,
                    0x78,
                    0x00
                })
                Name (MDTR, Package (0x04)
                {
                    0x77,
                    0x21,
                    0x20,
                    0xFF
                })
                OperationRegion (IDE, PCI_Config, 0x40, 0x26)
                Field (IDE, WordAcc, NoLock, Preserve)
                {
                    PPIT,   16,
                    SPIT,   16,
                    PMDT,   16,
                    SMDT,   16,
                    PPIC,   8,
                    SPIC,   8,
                    PPIM,   8,
                    SPIM,   8,
                    Offset (0x14),
                    PUDC,   2,
                    SUDC,   2,
                    Offset (0x16),
                    PUDM,   8,
                    SUDM,   8,
                    Offset (0x24),
                        ,   3,
                    SCTM,   1
                }

                OperationRegion (ATIO, SystemIO, 0x0177, 0x01)
                Field (ATIO, ByteAcc, NoLock, Preserve)
                {
                    STSR,   8
                }

                Name (PMMN, Buffer (0x28) {})
                Name (PSMN, Buffer (0x28) {})
                Name (SMMN, Buffer (0x28) {})
                Name (SSMN, Buffer (0x28) {})
                Name (PMSB, 0x00)
                Name (PSSB, 0x00)
                Name (SMSB, 0x00)
                Name (SSSB, 0x00)
                Method (GETT, 1, NotSerialized)
                {
                    Store (And (Arg0, 0x0F), Local0)
                    Store (ShiftRight (Arg0, 0x04), Local1)
                    Return (Multiply (0x1E, Add (Add (Local0, 0x01), Add
(Local1, 0x01))))
                }

                Method (GTM, 1, NotSerialized)
                {
                    CreateByteField (Arg0, 0x00, PIT1)
                    CreateByteField (Arg0, 0x01, PIT0)
                    CreateByteField (Arg0, 0x02, MDT1)
                    CreateByteField (Arg0, 0x03, MDT0)
                    CreateByteField (Arg0, 0x04, PICX)
                    CreateByteField (Arg0, 0x05, UDCX)
                    CreateByteField (Arg0, 0x06, UDMX)
                    Name (BUF, Buffer (0x14)
                    {
                        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                        0x00, 0x00, 0x00, 0x00
                    })
                    CreateDWordField (BUF, 0x00, PIO0)
                    CreateDWordField (BUF, 0x04, DMA0)
                    CreateDWordField (BUF, 0x08, PIO1)
                    CreateDWordField (BUF, 0x0C, DMA1)
                    CreateDWordField (BUF, 0x10, FLAG)
                    If (And (PICX, 0x01))
                    {
                        Return (BUF)
                    }

                    Store (GETT (PIT0), PIO0)
                    Store (GETT (PIT1), PIO1)
                    If (And (UDCX, 0x01))
                    {
                        Or (FLAG, 0x01, FLAG)
                        Store (DerefOf (Index (^UDMT, And (UDMX, 0x07))),
DMA0)
                    }
                    Else
                    {
                        Store (GETT (MDT0), DMA0)
                    }

                    If (And (UDCX, 0x02))
                    {
                        Or (FLAG, 0x04, FLAG)
                        Store (DerefOf (Index (^UDMT, ShiftRight (And (UDMX,
0x70), 0x04))), DMA1)
                    }
                    Else
                    {
                        Store (GETT (MDT1), DMA1)
                    }

                    Or (FLAG, 0x1A, FLAG)
                    Return (BUF)
                }

                Method (STM, 3, NotSerialized)
                {
                    CreateDWordField (Arg0, 0x00, PIO0)
                    CreateDWordField (Arg0, 0x04, DMA0)
                    CreateDWordField (Arg0, 0x08, PIO1)
                    CreateDWordField (Arg0, 0x0C, DMA1)
                    CreateDWordField (Arg0, 0x10, FLAG)
                    Name (BUF, Buffer (0x07)
                    {
                        0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
                    })
                    CreateByteField (BUF, 0x00, PIT1)
                    CreateByteField (BUF, 0x01, PIT0)
                    CreateByteField (BUF, 0x02, MDT1)
                    CreateByteField (BUF, 0x03, MDT0)
                    CreateByteField (BUF, 0x04, PIMX)
                    CreateByteField (BUF, 0x05, UDCX)
                    CreateByteField (BUF, 0x06, UDMX)
                    Store (Match (^PIOT, MLE, PIO0, MTR, 0x00, 0x00),
Local0)
                    Divide (Local0, 0x05, Local0)
                    Store (Match (^PIOT, MLE, PIO1, MTR, 0x00, 0x00),
Local1)
                    Divide (Local1, 0x05, Local1)
                    Store (Or (ShiftLeft (Local1, 0x04), Local0), PIMX)
                    Store (DerefOf (Index (^PITR, Local0)), PIT0)
                    Store (DerefOf (Index (^PITR, Local1)), PIT1)
                    If (And (FLAG, 0x01))
                    {
                        Store (Match (^UDMT, MLE, DMA0, MTR, 0x00, 0x00),
Local0)
                        Divide (Local0, 0x07, Local0)
                        Or (UDMX, Local0, UDMX)
                        Or (UDCX, 0x01, UDCX)
                    }
                    Else
                    {
                        If (LNot (LEqual (DMA0, 0xFFFFFFFF)))
                        {
                            Store (Match (^MDMT, MLE, DMA0, MTR, 0x00,
0x00), Local0)
                            Store (DerefOf (Index (^MDTR, Local0)), MDT0)
                        }
                    }

                    If (And (FLAG, 0x04))
                    {
                        Store (Match (^UDMT, MLE, DMA1, MTR, 0x00, 0x00),
Local0)
                        Divide (Local0, 0x07, Local0)
                        Or (UDMX, ShiftLeft (Local0, 0x04), UDMX)
                        Or (UDCX, 0x02, UDCX)
                    }
                    Else
                    {
                        If (LNot (LEqual (DMA1, 0xFFFFFFFF)))
                        {
                            Store (Match (^MDMT, MLE, DMA1, MTR, 0x00,
0x00), Local0)
                            Store (DerefOf (Index (^MDTR, Local0)), MDT1)
                        }
                    }

                    Return (BUF)
                }

                Method (GTF, 3, NotSerialized)
                {
                    CreateByteField (Arg1, 0x00, MDT1)
                    CreateByteField (Arg1, 0x01, MDT0)
                    CreateByteField (Arg1, 0x02, PIMX)
                    CreateByteField (Arg1, 0x03, UDCX)
                    CreateByteField (Arg1, 0x04, UDMX)
                    If (LEqual (Arg0, 0xA0))
                    {
                        And (PIMX, 0x07, Local0)
                        Store (MDT0, Local1)
                        And (UDCX, 0x01, Local2)
                        And (UDMX, 0x07, Local3)
                    }
                    Else
                    {
                        ShiftRight (And (PIMX, 0x70), 0x04, Local0)
                        Store (MDT1, Local1)
                        And (UDCX, 0x02, Local2)
                        ShiftRight (And (UDMX, 0x70), 0x04, Local3)
                    }

                    Name (BUF, Buffer (0x15)
                    {
                        0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x03,
                        0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x00, 0x00,
                        0x00, 0x00, 0x00, 0xFF, 0xF5
                    })
                    CreateByteField (BUF, 0x01, PMOD)
                    CreateByteField (BUF, 0x08, DMOD)
                    CreateByteField (BUF, 0x05, CMDA)
                    CreateByteField (BUF, 0x0C, CMDB)
                    CreateByteField (BUF, 0x13, CMDC)
                    CreateByteField (BUF, 0x14, SCMD)
                    Store (Arg0, CMDA)
                    Store (Arg0, CMDB)
                    Store (Arg0, CMDC)
                    If (LNot (Arg2))
                    {
                        Store (0x00, SCMD)
                    }

                    Or (Local0, 0x08, PMOD)
                    If (Local2)
                    {
                        Or (Local3, 0x40, DMOD)
                    }
                    Else
                    {
                        Store (Match (^MDMT, MLE, GETT (Local1), MTR, 0x00,
0x00), Local4)
                        If (LLess (Local4, 0x03))
                        {
                            Or (0x20, Local4, DMOD)
                        }
                    }

                    Return (BUF)
                }

                Device (PRID)
                {
                    Name (_ADR, 0x00)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Name (BUF, Buffer (0x07)
                        {
                            0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIC)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (^^PPIT, VPIT)
                        Store (^^PMDT, VMDT)
                        Store (^^PPIC, VPIC)
                        Store (^^PUDC, VUDC)
                        Store (^^PUDM, VUDM)
                        Return (GTM (BUF))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        CreateField (Arg1, 0x01B0, 0x0140, MBUF)
                        CreateField (Arg2, 0x01B0, 0x0140, SBUF)
                        CreateField (Arg1, 0x0800, 0x01, MSST)
                        CreateField (Arg2, 0x0800, 0x01, SSST)
                        Store (MBUF, ^^PMMN)
                        Store (SBUF, ^^PSMN)
                        Store (MSST, ^^PMSB)
                        Store (SSST, ^^PSSB)
                        Name (BUF, Buffer (0x07)
                        {
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIM)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (STM (Arg0, Arg1, Arg2), BUF)
                        Store (VPIT, ^^PPIT)
                        Store (VMDT, ^^PMDT)
                        Store (VPIM, ^^PPIM)
                        Store (VUDC, ^^PUDC)
                        Store (VUDM, ^^PUDM)
                    }

                    Device (P_D0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^PMDT, VMDT)
                            Store (^^^PPIM, VPIM)
                            Store (^^^PUDC, VUDC)
                            Store (^^^PUDM, VUDM)
                            Return (GTF (0xA0, BUF, ^^^PMSB))
                        }
                    }

                    Device (P_D1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^PMDT, VMDT)
                            Store (^^^PPIM, VPIM)
                            Store (^^^PUDC, VUDC)
                            Store (^^^PUDM, VUDM)
                            Return (GTF (0xB0, BUF, ^^^PSSB))
                        }
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        And (PPIC, 0x01, Local0)
                        If (LAnd (Local0, 0x01))
                        {
                            Return (0x0D)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }
                }

                Device (SECD)
                {
                    Name (_ADR, 0x01)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Name (BUF, Buffer (0x07)
                        {
                            0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIC)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (^^SPIT, VPIT)
                        Store (^^SMDT, VMDT)
                        Store (^^SPIC, VPIC)
                        Store (^^SUDC, VUDC)
                        Store (^^SUDM, VUDM)
                        Return (GTM (BUF))
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        CreateField (Arg1, 0x01B0, 0x0140, MBUF)
                        CreateField (Arg2, 0x01B0, 0x0140, SBUF)
                        CreateField (Arg1, 0x0800, 0x01, MSST)
                        CreateField (Arg2, 0x0800, 0x01, SSST)
                        Store (MBUF, ^^SMMN)
                        Store (SBUF, ^^SSMN)
                        Store (MSST, ^^SMSB)
                        Store (SSST, ^^SSSB)
                        Name (BUF, Buffer (0x07)
                        {
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIM)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (STM (Arg0, Arg1, Arg2), BUF)
                        Store (VPIT, ^^SPIT)
                        Store (VMDT, ^^SMDT)
                        Store (VPIM, ^^SPIM)
                        Store (VUDC, ^^SUDC)
                        Store (VUDM, ^^SUDM)
                    }

                    Device (S_D0)
                    {
                        Name (_ADR, 0x00)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^SMDT, VMDT)
                            Store (^^^SPIM, VPIM)
                            Store (^^^SUDC, VUDC)
                            Store (^^^SUDM, VUDM)
                            Return (GTF (0xA0, BUF, ^^^SMSB))
                        }
                    }

                    Device (S_D1)
                    {
                        Name (_ADR, 0x01)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^SMDT, VMDT)
                            Store (^^^SPIM, VPIM)
                            Store (^^^SUDC, VUDC)
                            Store (^^^SUDM, VUDM)
                            Return (GTF (0xB0, BUF, ^^^SSSB))
                        }
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        And (SPIC, 0x01, Local0)
                        If (LAnd (Local0, 0x01))
                        {
                            Return (0x0D)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }
                }
            }

            Scope (\_SB.PCI0.IDE.PRID.P_D0)
            {
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x0F)
                }

                Name (FWSO, "FWSO")
                Name (_PSC, 0x00)
                Method (_PS0, 0, NotSerialized)
                {
                    Store (_PSC, Local0)
                    Store (0x00, _PSC)
                    If (LEqual (Local0, 0x03))
                    {
                        Store (0x01, INF)
                        While (INF)
                        {
                            Store (0x20, CMD)
                            Store (Zero, SSMI)
                            If (LAnd (LEqual (INF, 0x01), LNot (LLess
(\_SB.OSTP (), 0x04))))
                            {
                                Sleep (0x01F4)
                            }
                        }
                    }
                }

                Method (_PS3, 0, NotSerialized)
                {
                    Store (0x03, _PSC)
                }
            }

            Scope (\_SB.PCI0.IDE.PRID.P_D1)
            {
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x00)
                }
            }

            Scope (\_SB.PCI0.IDE.SECD.S_D0)
            {
                Method (_STA, 0, NotSerialized)
                {
                    If (LAnd (\_SB.PCI0.IDE.SECD.S_D0.BIDE (), LAnd (BRST,
BY1O)))
                    {
                        Store (Zero, BYIF)
                        Return (0x0F)
                    }
                    Else
                    {
                        If (LEqual (BYIF, Ones))
                        {
                            Store (Zero, BYIF)
                            Store (One, BYRF)
                        }

                        Return (0x00)
                    }
                }

                Method (BIDE, 0, NotSerialized)
                {
                    Store (BY1I, Local0)
                    Store (LEqual (Local0, 0x08), Local1)
                    Or (LEqual (Local0, 0x0A), Local1, Local1)
                    Or (LEqual (Local0, 0x0B), Local1, Local1)
                    Or (LEqual (Local0, 0x0D), Local1, Local1)
                    Return (Local1)
                }

                Method (_EJ0, 1, NotSerialized)
                {
                    BOFF ()
                    Return (Zero)
                }

                Method (BON, 0, NotSerialized)
                {
                    Store (Zero, BRST)
                    Store (0x01, SCTM)
                    If (LEqual (BY1C, Zero))
                    {
                        Sleep (0x64)
                        Store (BY1I, Local0)
                        If (LNot (LEqual (Local0, 0x01)))
                        {
                            Store (One, BY1O)
                            Sleep (0x46)
                            Store (0x00, SCTM)
                            Or (SUDC, 0x01, SUDC)
                            And (SUDM, 0xF8, SUDM)
                            Or (SUDM, 0x06, SUDM)
                            And (CDLP, 0xFE, CDLP)
                            And (HDLP, 0xFE, HDLP)
                            And (FDLP, 0xFE, FDLP)
                            If (LEqual (Local0, 0x08))
                            {
                                Or (CDLP, One, CDLP)
                            }

                            If (LEqual (Local0, 0x0A))
                            {
                                Or (HDLP, One, HDLP)
                            }

                            If (LEqual (Local0, 0x0B))
                            {
                                Or (CDLP, One, CDLP)
                            }

                            If (LEqual (Local0, 0x0D))
                            {
                                Or (CDLP, One, CDLP)
                            }

                            Sleep (0x1E)
                            Store (One, BRST)
                            Sleep (0x64)
                            Store (Zero, Local1)
                            While (LAnd (LAnd (And (STSR, 0x80), B1TC),
LLess (Local1, 0x015E)))
                            {
                                Sleep (0x64)
                                Add (Local1, 0x01, Local1)
                            }
                        }
                    }
                }

                Method (BOFF, 0, NotSerialized)
                {
                    Store (Zero, BRST)
                    And (CDLP, 0xFE, CDLP)
                    And (HDLP, 0xFE, HDLP)
                    And (FDLP, 0xFE, FDLP)
                    Sleep (0x1E)
                    TMCL ()
                    Store (0x01, SCTM)
                    Sleep (0x46)
                    Store (Zero, BY1O)
                    Sleep (0x64)
                }

                Method (TMCL, 0, NotSerialized)
                {
                    And (SPIT, 0xFF, SPIT)
                    Or (SPIT, 0x9900, SPIT)
                    And (SMDT, 0xFF, SMDT)
                    Or (SMDT, 0xFF00, SMDT)
                    And (SPIM, 0xF8, SPIM)
                    And (SUDC, 0x02, SUDC)
                    And (SUDM, 0xF8, SUDM)
                }
            }

            Scope (\_SB.PCI0.IDE.SECD.S_D1)
            {
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x00)
                }
            }

            Device (OHC1)
            {
                Name (_ADR, 0x00130000)
            }

            Device (OHC2)
            {
                Name (_ADR, 0x00130001)
            }

            Device (EHCI)
            {
                Name (_ADR, 0x00130002)
            }

            Device (SMB)
            {
                Name (_ADR, 0x00140000)
            }

            Device (AUDO)
            {
                Name (_ADR, 0x00140005)
            }

            Device (MODM)
            {
                Name (_ADR, 0x00140006)
                Name (_PRW, Package (0x02)
                {
                    0x0C,
                    0x03
                })
            }

            Device (PB4)
            {
                Name (_ADR, 0x00040000)
                Name (_PRW, Package (0x02)
                {
                    0x18,
                    0x04
                })
                Method (_PRT, 0, NotSerialized)
                {
                    If (GPIC)
                    {
                        Return (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
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            }
                        })
                    }
                }
            }
        }

        Scope (\)
        {
            Name (WBTN, Zero)
            Name (NGTM, Zero)
            Name (LSBL, Zero)
            Name (BNBF, Buffer (0x20) {})
            Name (BNSP, Zero)
            Name (BNGP, Zero)
            Name (BNCT, Zero)
        }

        Device (FEXT)
        {
            Name (_HID, "FUJ02E3")
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }

            Method (_INI, 0, NotSerialized)
            {
                Store (Zero, BNSP)
                Store (Zero, BNGP)
                Store (Zero, BNCT)
                Store (Zero, IRBC)
                Store (Zero, IRBF)
            }

            Method (FUNC, 4, Serialized)
            {
                Store (0x80000000, Local0)
                If (LEqual (Arg0, 0x1001))
                {
                    Store (S001 (Arg1, Arg2, Arg3), Local0)
                }
                Else
                {
                    If (LEqual (Arg0, 0x1002))
                    {
                        Store (S002 (Arg1, Arg2, Arg3), Local0)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x1004))
                        {
                            Store (S004 (Arg1, Arg2, Arg3), Local0)
                        }
                    }
                }

                Return (Local0)
            }

            Method (S001, 3, NotSerialized)
            {
                Store (0x80000000, Local0)
                If (LEqual (Arg0, Zero))
                {
                    Store (LEDI, Local0)
                }
                Else
                {
                    If (LEqual (Arg0, One))
                    {
                        And (Arg2, 0x03, Local1)
                        If (LAnd (And (Arg1, LEDI), Local1))
                        {
                            Store (0x9B, CMD)
                            ShiftRight (And (Arg2, 0x00030000), 0x08, DVID)
                            Store (Zero, SSMI)
                        }

                        Store (Zero, Local0)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x02))
                        {
                            If (And (Arg1, LEDI))
                            {
                                Store (0x9B, CMD)
                                Store (One, DVID)
                                Store (Zero, SSMI)
                                Or (ShiftLeft (DVID, 0x10), One, Local0)
                            }
                            Else
                            {
                                Store (Zero, Local0)
                            }
                        }
                    }
                }

                Return (Local0)
            }

            Method (S002, 3, NotSerialized)
            {
                Store (0x80000000, Local0)
                If (LEqual (Arg0, Zero))
                {
                    Store (BTNI, Local0)
                }
                Else
                {
                    If (LEqual (Arg0, One))
                    {
                        Store (GIRB (), Local0)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x02))
                        {
                            Store (0x9B, CMD)
                            Store (0x02, DVID)
                            Store (Zero, SSMI)
                            Store (DVID, Local0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x03))
                            {
                                If (Arg1)
                                {
                                    Not (Arg1, Local1)
                                    And (Arg2, Arg1, Local2)
                                    Or (And (WBTN, Local1), Local2, WBTN)
                                    Store (0x9B, CMD)
                                    Or (ShiftLeft (WBTN, 0x08), 0x03, DVID)
                                    Store (Zero, SSMI)
                                }

                                Store (WBTN, Local0)
                            }
                        }
                    }
                }

                Return (Local0)
            }

            Method (SIRB, 1, NotSerialized)
            {
                If (LLess (BNCT, 0x10))
                {
                    CreateWordField (BNBF, BNSP, BNP1)
                    Store (Arg0, BNP1)
                    Increment (BNCT)
                    Add (BNSP, 0x02, BNSP)
                    If (LNot (LLess (BNSP, 0x20)))
                    {
                        Store (Zero, BNSP)
                    }
                }
            }

            Method (GIRB, 0, NotSerialized)
            {
                If (BNCT)
                {
                    CreateWordField (BNBF, BNGP, BNP2)
                    Store (BNP2, Local0)
                    Or (Local0, 0x40000000, Local0)
                    Decrement (BNCT)
                    Add (BNGP, 0x02, BNGP)
                    If (LNot (LLess (BNGP, 0x20)))
                    {
                        Store (Zero, BNGP)
                    }
                }
                Else
                {
                    Store (Zero, Local0)
                }

                Return (Local0)
            }

            Method (S004, 3, NotSerialized)
            {
                Store (0x80000000, Local0)
                If (LEqual (Arg0, Zero))
                {
                    Store (NGTI, Local0)
                }
                Else
                {
                    If (LEqual (Arg0, One))
                    {
                        If (LAnd (LEqual (Arg1, 0x04), And (NGTI, 0x04)))
                        {
                            And (Arg2, 0x03, Local1)
                            If (LOr (LEqual (Local1, 0x03), LEqual (Local1,
0x02)))
                            {
                                If (LNot (NGTF))
                                {
                                    SVBL ()
                                    Store (One, NGTF)
                                }

                                SBLC (Local1)
                                Store (Local1, NGTM)
                                Store (Zero, Local0)
                            }

                            If (LNot (Local1))
                            {
                                If (NGTF)
                                {
                                    Store (Zero, NGTF)
                                    RSBL ()
                                    SBLC (Zero)
                                }

                                Store (Zero, NGTM)
                                Store (Zero, Local0)
                            }
                        }
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x02))
                        {
                            If (LAnd (LEqual (Arg1, 0x04), And (NGTI,
0x04)))
                            {
                                Store (NGTM, Local0)
                            }
                        }
                    }
                }

                Return (Local0)
            }
        }

        Scope (\_SB.FEXT)
        {
            Method (SBLC, 1, NotSerialized)
            {
                If (LNot (Arg0))
                {
                    Store (Zero, BLCT)
                    If (ACPW)
                    {
                        Store (0x00, MBLB)
                    }
                }
                Else
                {
                    If (LEqual (Arg0, 0x03))
                    {
                        Store (One, BLCT)
                        Store (0x36, MBLB)
                    }
                    Else
                    {
                        If (LEqual (Arg0, 0x02))
                        {
                            Name (BBCT, Buffer (BLLM) {})
                            Store (BLLT, BBCT)
                            CreateByteField (BBCT, Zero, BLL0)
                            Store (BLL0, LCDB)
                            Store (Zero, BLCT)
                            Store (0x36, MBLB)
                        }
                    }
                }
            }

            Method (SVBL, 0, NotSerialized)
            {
                And (\_SB.PCI0.LPCB.FJEX.GBLL (), 0x7FFFFFFF, LSBL)
            }

            Method (RSBL, 0, NotSerialized)
            {
                \_SB.PCI0.LPCB.FJEX.SBLL (LSBL)
            }
        }

        Device (LID)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Method (_LID, 0, NotSerialized)
            {
                If (CVCL)
                {
                    Return (Zero)
                }
                Else
                {
                    Return (One)
                }
            }

            Name (_PRW, Package (0x02)
            {
                0x16,
                0x04
            })
            Method (_PSW, 1, NotSerialized)
            {
                Noop
            }
        }

        Device (AC)
        {
            Name (_HID, "ACPI0003")
            Scope (\)
            {
                Name (ACPS, Ones)
            }

            Method (_INI, 0, NotSerialized)
            {
                Store (ACPW, ACPS)
            }

            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }

            Method (_PSR, 0, NotSerialized)
            {
                _INI ()
                If (LGreater (NTFY, 0x00))
                {
                    Notify (\_PR.CPU0, 0x80)
                    Decrement (NTFY)
                }

                If (ACPW)
                {
                    Return (One)
                }
                Else
                {
                    Return (Zero)
                }
            }

            Name (_PCL, Package (0x01)
            {
                \_SB
            })
            Method (ACHK, 0, NotSerialized)
            {
                Store (ACPW, Local0)
                If (LNot (LEqual (Local0, ACPS)))
                {
                    Store (0x04, NTFY)
                    Sleep (0x28)
                    Notify (\_SB.AC, 0x80)
                    Notify (\_PR.CPU0, 0x80)
                    Store (Local0, ACPS)
                }
            }
        }

        Device (CMB1)
        {
            Name (_HID, EisaId ("PNP0C0A"))
            Name (_UID, One)
            Name (_PCL, Package (0x01)
            {
                \_SB
            })
            Scope (\)
            {
                Name (B1PS, Ones)
                Name (B1RS, Ones)
                Name (B1CS, Ones)
                Name (B1LS, Ones)
                Name (BIF1, Package (0x0D)
                {
                    0x01,
                    0x00,
                    0x00,
                    0x01,
                    0x00,
                    0x00,
                    0x00,
                    0x01,
                    0x01,
                    "",
                    "1",
                    "LION",
                    "Fujitsu"
                })
                Name (BST1, Package (0x04) {})
            }

            Method (MKWD, 2, NotSerialized)
            {
                If (And (Arg1, 0x80))
                {
                    Or (0xFFFF0000, Arg0, Local0)
                    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
                    Subtract (Zero, Local0, Local0)
                }
                Else
                {
                    Store (Arg0, Local0)
                    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
                }

                Return (Local0)
            }

            Method (_INI, 0, NotSerialized)
            {
                Store (B1P, B1PS)
                Store (B1CP, B1RS)
                Store (B1C, B1CS)
                Store (MKWD (B1LL, B1LH), B1LS)
            }

            Method (_BIF, 0, NotSerialized)
            {
                Name (BUFF, Buffer (0x0C) {})
                Store (B1NO, Local5)
                CreateByteField (BIDT, B1ID, B1IX)
                Store (MKWD (B1DL, B1DH), Index (BIF1, 0x01))
                Store (MKWD (B1LL, B1LH), Index (BIF1, 0x02))
                Store (Multiply (Add (B1DV, 0x02), 0x0E10), Index (BIF1,
0x04))
                If (Local5)
                {
                    Store (DerefOf (Index (BMST, B1IX)), BUFF)
                    Store (0x07, Local0)
                    Store (Local5, Local2)
                    While (LAnd (Local2, LNot (LLess (Local0, 0x02))))
                    {
                        Store (Subtract (DerefOf (Index (BUFF, Local0)),
0x30), Local1)
                        Divide (Add (Local1, Local2), 0x0A, Local1, Local2)
                        Store (Add (Local1, 0x30), Index (BUFF, Local0))
                        Decrement (Local0)
                    }

                    Store (BUFF, Index (BIF1, 0x09))
                }
                Else
                {
                    Store (DerefOf (Index (BMNT, B1IX)), Index (BIF1, 0x09))
                }

                Return (BIF1)
            }

            Method (_BST, 0, NotSerialized)
            {
                _INI ()
                Store (Zero, Local0)
                If (B1P)
                {
                    If (B1C)
                    {
                        Or (Local0, 0x02, Local0)
                    }
                    Else
                    {
                        Or (Local0, One, Local0)
                    }

                    If (LNot (LGreater (B1CP, One)))
                    {
                        Or (Local0, 0x04, Local0)
                    }
                }

                Store (MKWD (B1CL, B1CH), Local1)
                Divide (Multiply (B1CP, MKWD (B1LL, B1LH)), 0x03E8, Local4,
Local2)
                If (Local4)
                {
                    Increment (Local2)
                }

                Multiply (Local2, 0x0A, Local2)
                Store (MKWD (B1VL, B1VH), Local3)
                Store (Local0, Index (BST1, Zero))
                Store (Local1, Index (BST1, One))
                Store (Local2, Index (BST1, 0x02))
                Store (Local3, Index (BST1, 0x03))
                Return (BST1)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (B1P)
                {
                    Return (0x1F)
                }

                Return (0x0F)
            }

            Method (BCHK, 0, NotSerialized)
            {
                If (LNot (LEqual (B1P, B1PS)))
                {
                    Notify (\_SB.CMB1, 0x81)
                    Store (B1P, B1PS)
                }

                If (B1PS)
                {
                    Store (MKWD (B1LL, B1LH), Local0)
                    If (LNot (LEqual (Local0, B1LS)))
                    {
                        Notify (\_SB.CMB1, 0x81)
                    }

                    If (LOr (LNot (LEqual (B1C, B1CS)), LNot (LEqual (B1CP,
B1RS))))
                    {
                        Notify (\_SB.CMB1, 0x80)
                    }

                    Store (Local0, B1LS)
                    Store (B1C, B1CS)
                    Store (B1CP, B1RS)
                }
            }
        }

        Device (CMB2)
        {
            Name (_HID, EisaId ("PNP0C0A"))
            Name (_UID, 0x02)
            Name (_PCL, Package (0x01)
            {
                \_SB
            })
            Scope (\)
            {
                Name (B2PS, Ones)
                Name (B2RS, Ones)
                Name (B2CS, Ones)
                Name (B2LS, Ones)
                Name (BIF2, Package (0x0D)
                {
                    0x01,
                    0x00,
                    0x00,
                    0x01,
                    0x00,
                    0x00,
                    0x00,
                    0x01,
                    0x01,
                    "",
                    "2",
                    "LION",
                    "Fujitsu"
                })
                Name (BST2, Package (0x04) {})
            }

            Method (MKWD, 2, NotSerialized)
            {
                If (And (Arg1, 0x80))
                {
                    Or (0xFFFF0000, Arg0, Local0)
                    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
                    Subtract (Zero, Local0, Local0)
                }
                Else
                {
                    Store (Arg0, Local0)
                    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
                }

                Return (Local0)
            }

            Method (_INI, 0, NotSerialized)
            {
                Store (B2P, B2PS)
                Store (B2CP, B2RS)
                Store (B2C, B2CS)
                Store (MKWD (B2LL, B2LH), B2LS)
            }

            Method (_BIF, 0, NotSerialized)
            {
                Name (BUFF, Buffer (0x0C) {})
                Store (B2NO, Local5)
                CreateByteField (BIDT, B2ID, B2IX)
                Store (MKWD (B2DL, B2DH), Index (BIF2, 0x01))
                Store (MKWD (B2LL, B2LH), Index (BIF2, 0x02))
                Store (Multiply (Add (B2DV, 0x02), 0x0E10), Index (BIF2,
0x04))
                If (Local5)
                {
                    Store (DerefOf (Index (BMST, B2IX)), BUFF)
                    Store (0x07, Local0)
                    Store (Local5, Local2)
                    While (LAnd (Local2, LNot (LLess (Local0, 0x02))))
                    {
                        Store (Subtract (DerefOf (Index (BUFF, Local0)),
0x30), Local1)
                        Divide (Add (Local1, Local2), 0x0A, Local1, Local2)
                        Store (Add (Local1, 0x30), Index (BUFF, Local0))
                        Decrement (Local0)
                    }

                    Store (BUFF, Index (BIF2, 0x09))
                }
                Else
                {
                    Store (DerefOf (Index (BMNT, B2IX)), Index (BIF2, 0x09))
                }

                Return (BIF2)
            }

            Method (_BST, 0, NotSerialized)
            {
                _INI ()
                Store (Zero, Local0)
                If (B2P)
                {
                    If (B2C)
                    {
                        Or (Local0, 0x02, Local0)
                    }
                    Else
                    {
                        Or (Local0, One, Local0)
                    }

                    If (LNot (LGreater (B2CP, One)))
                    {
                        Or (Local0, 0x04, Local0)
                    }
                }

                Store (MKWD (B2CL, B2CH), Local1)
                Divide (Multiply (B2CP, MKWD (B2LL, B2LH)), 0x03E8, Local4,
Local2)
                If (Local4)
                {
                    Increment (Local2)
                }

                Multiply (Local2, 0x0A, Local2)
                Store (MKWD (B2VL, B2VH), Local3)
                Store (Local0, Index (BST2, Zero))
                Store (Local1, Index (BST2, One))
                Store (Local2, Index (BST2, 0x02))
                Store (Local3, Index (BST2, 0x03))
                Return (BST2)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (B2P)
                {
                    Return (0x1F)
                }

                Return (0x0F)
            }

            Method (BCHK, 0, NotSerialized)
            {
                If (LNot (LEqual (B2P, B2PS)))
                {
                    Notify (\_SB.CMB2, 0x81)
                    Store (B2P, B2PS)
                }

                If (B2PS)
                {
                    Store (MKWD (B2LL, B2LH), Local0)
                    If (LNot (LEqual (Local0, B2LS)))
                    {
                        Notify (\_SB.CMB2, 0x81)
                    }

                    If (LOr (LNot (LEqual (B2C, B2CS)), LNot (LEqual (B2CP,
B2RS))))
                    {
                        Notify (\_SB.CMB2, 0x80)
                    }

                    Store (Local0, B2LS)
                    Store (B2C, B2CS)
                    Store (B2CP, B2RS)
                }
            }
        }

        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C"))
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }
        }
    }

    Scope (_GPE)
    {
        Method (_L04, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.PCIB, 0x02)
        }

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

        Method (_L10, 0, NotSerialized)
        {
            If (LNot (RI1M))
            {
                Notify (\_SB.PCI0.LPCB.UAR1, 0x02)
            }
        }

        Method (_E13, 0, NotSerialized)
        {
            Store (SSM0, SM0S)
            Store (0x3F, SSM0)
            Store (SSM1, SM1S)
            Store (0xFF, SSM1)
            Store (SSM2, SM2S)
            Store (0xF8, SSM2)
            Store (SSF0, Local0)
            Store (Local0, SSF0)
            And (Local0, Not (SM0S), Local0)
            Store (SSF1, Local1)
            Store (Local1, SSF1)
            And (Local1, Not (SM1S), Local1)
            Store (SSF2, Local2)
            Store (Local2, SSF2)
            And (Local2, Not (SM2S), Local2)
            If (And (Local2, 0x10))
            {
                \_SB.AC.ACHK ()
                \_SB.CMB1.BCHK ()
                \_SB.CMB2.BCHK ()
                If (LNot (LEqual (LWMD, PLWM)))
                {
                    Store (LWMD, PLWM)
                    If (PLWM)
                    {
                        Store (0x04, THDC)
                        Store (One, THRE)
                    }
                    Else
                    {
                        Store (Zero, THRE)
                    }
                }

                If (ACPW)
                {
                    If (LNot (NGTF))
                    {
                        Store (0x00, MBLB)
                    }
                }
                Else
                {
                    Store (0x36, MBLB)
                }
            }

            If (And (Local0, 0x01))
            {
                \_SB.PCI0.AGP.VGA.PHTK ()
                Store (0x80, CMD)
                Store (Zero, SSMI)
                \_SB.PCI0.AGP.VGA.AHTK ()
                If (AHKF)
                {
                    Notify (\_SB.PCI0.LPCB.FJEX, 0x80)
                }

                If (IRBF)
                {
                    \_SB.FEXT.SIRB (IRBC)
                    Notify (\_SB.FEXT, 0x80)
                    Store (Zero, IRBF)
                }
            }

            If (And (Local1, 0x30))
            {
                \_SB.PCI0.LPCB.CMBT.SWCF ()
            }

            If (And (Local2, 0x08))
            {
                Store (B1SU, Local3)
                Store (B1SD, Local4)
                Store (TBSF, Local5)
                Store (B2SU, Local6)
                Store (B2SD, Local7)
                Store (Zero, STAE)
                If (LAnd (Local3, LNot (B1TC)))
                {
                    \_SB.PCI0.IDE.SECD.S_D0.BOFF ()
                    Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                }

                If (LOr (LAnd (Local4, B1TC), LAnd (Local5, TMBF)))
                {
                    \_SB.PCI0.IDE.SECD.S_D0.BON ()
                    If (LAnd (LAnd (BRST, BY1O), B1TC))
                    {
                        Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                        If (BYRF)
                        {
                            Sleep (0x07D0)
                            Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                        }
                    }

                    Store (Zero, BYRF)
                }

                If (Local5)
                {
                    If (LNot (TMBF))
                    {
                        Store (0xF0, TIMB)
                        If (LLess (TCNT, 0xFFFFFFFF))
                        {
                            Increment (TCNT)
                        }
                    }
                    Else
                    {
                        Store (Zero, TMBF)
                        If (TTIM)
                        {
                            Store (0xD2, TIMB)
                        }
                        Else
                        {
                            Store (Zero, TBSM)
                        }
                    }
                }

                If (LOr (Local6, Local7))
                {
                    Sleep (0x03E8)
                    Store (Zero, B2SU)
                    Store (Zero, B2SD)
                    If (RPEN)
                    {
                        If (LNot (LEqual (B2TC, RPDS)))
                        {
                            Store (B2TC, RPDS)
                            If (RPDS)
                            {
                                Notify (\_SB.REPL, Zero)
                            }
                            Else
                            {
                                Sleep (0x0FA0)
                                Notify (\_SB.REPL, One)
                            }
                        }
                    }
                }
            }

            Store (SM0S, SSM0)
            Store (SM1S, SSM1)
            Store (SM2S, SSM2)
        }

        Method (_L16, 0, NotSerialized)
        {
            XOr (LPOL, One, LPOL)
            Notify (\_SB.LID, 0x80)
        }

        Method (_L18, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.PB4, 0x02)
        }
    }

    Name (_S0, Package (0x04)
    {
        0x00,
        0x00,
        0x00,
        0x00
    })
    Name (_S3, Package (0x04)
    {
        0x03,
        0x03,
        0x00,
        0x00
    })
    Name (_S4, Package (0x04)
    {
        0x04,
        0x04,
        0x00,
        0x00
    })
    Name (_S5, Package (0x04)
    {
        0x05,
        0x05,
        0x00,
        0x00
    })
    Method (_PTS, 1, NotSerialized)
    {
        If (LAnd (LNot (LLess (Arg0, One)), LNot (LGreater (Arg0, 0x04))))
        {
            Store (G3P2, Local1)
            Or (G3P2, 0x10, G3P2)
            Store (G3P0, Local0)
            Or (G3P0, 0x20, G3P0)
            Sleep (0xC8)
            Store (Local1, G3P2)
            Store (0x6D, BCTL)
            While (And (BCTL, One))
            {
                Sleep (One)
            }

            Store (Local0, G3P0)
            If (\_SB.PCI0.IDE.SECD.S_D0._STA ())
            {
                Store (Zero, BYIS)
            }
            Else
            {
                Store (0xFF, BYIS)
            }

            If (RPEN)
            {
                Store (RPDS, DC1S)
            }
        }

        \_SB.PCI0.LPCB.CMBT.BPTS (Arg0)
        Store (Zero, WAPB)
        If (TTIM)
        {
            Store (0x9A, CMD)
            Store (TCNT, DVID)
            Store (Zero, TCNT)
            Store (Zero, SSMI)
        }
    }

    Method (_WAK, 1, NotSerialized)
    {
        \_SB.PCI0.LPCB.AINI ()
        \_SB.FEXT._INI ()
        \_SB.PCI0.LPCB.CMBT.BWAK (Arg0)
        If (LEqual (Arg0, 0x03))
        {
            Store (0x9B, CMD)
            Store (0x04, DVID)
            Store (Zero, SSMI)
        }

        If (WAPB)
        {
            Notify (\_SB.PWRB, 0x02)
        }

        If (LEqual (Arg0, 0x04))
        {
            \_SB.FEXT.FUNC (0x1002, 0x03, Ones, WBTN)
        }

        If (NGTM)
        {
            \_SB.FEXT.FUNC (0x1004, 0x01, 0x04, 0x00)
        }

        If (LAnd (LNot (LLess (Arg0, One)), LNot (LGreater (Arg0, 0x04))))
        {
            If (LEqual (BYIS, 0xFF))
            {
                If (\_SB.PCI0.IDE.SECD.S_D0.BIDE ())
                {
                    If (BYRF)
                    {
                        If (LNot (\_SB.PCI0.IDE.SECD.S_D0._STA ()))
                        {
                            \_SB.PCI0.IDE.SECD.S_D0.TMCL ()
                        }
                        Else
                        {
                            \_SB.PCI0.IDE.SECD.S_D0.BOFF ()
                        }

                        Store (0x01, TMBF)
                        Store (0x01, TBSM)
                        Store (0x00, TBSF)
                        Store (0x1E, TIMB)
                    }
                    Else
                    {
                        If (LNot (\_SB.PCI0.IDE.SECD.S_D0._STA ()))
                        {
                            \_SB.PCI0.IDE.SECD.S_D0.BON ()
                        }

                        If (LAnd (LAnd (BRST, BY1O), B1TC))
                        {
                            Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                        }
                    }
                }
            }
            Else
            {
                If (LNot (\_SB.PCI0.IDE.SECD.S_D0._STA ()))
                {
                    \_SB.PCI0.IDE.SECD.S_D0.TMCL ()
                    Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                }
                Else
                {
                    If (LEqual (Arg0, 0x04))
                    {
                        Store (0x87, CMD)
                        Store (0x02, DVID)
                        Store (Zero, SSMI)
                        Name (BFMN, Buffer (0x28) {})
                        Store (PIID, BFMN)
                        Store (Zero, Local0)
                        Store (Zero, Local1)
                        While (LAnd (LNot (Local0), LLess (Local1, 0x28)))
                        {
                            If (LEqual (DerefOf (Index (\_SB.PCI0.IDE.SMMN,
Local1)), DerefOf (Index (BFMN, Local1))))
                            {
                                Increment (Local1)
                            }
                            Else
                            {
                                Store (0x01, Local0)
                            }
                        }

                        If (Local0)
                        {
                            \_SB.PCI0.IDE.SECD.S_D0.BOFF ()
                            Notify (\_SB.PCI0.IDE.SECD.S_D0, One)
                        }
                    }
                }

                If (LAnd (\_SB.PCI0.IDE.SECD.S_D0.BIDE (), LNot
(\_SB.PCI0.IDE.SECD.S_D0._STA ())))
                {
                    Store (0x01, TMBF)
                    Store (0x01, TBSM)
                    Store (0x00, TBSF)
                    Store (0x1E, TIMB)
                }
            }

            If (RPEN)
            {
                If (LNot (LEqual (B2TC, DC1S)))
                {
                    Store (B2TC, RPDS)
                    If (RPDS)
                    {
                        Notify (\_SB.REPL, Zero)
                    }
                    Else
                    {
                        Notify (\_SB.REPL, One)
                    }
                }
            }
        }
    }

    Scope (\_PR.CPU0)
    {
        Name (_PCT, Package (0x02)
        {
            ResourceTemplate ()
            {
                Register (FFixedHW, 0x00, 0x00, 0x0000000000000000)
            },

            ResourceTemplate ()
            {
                Register (FFixedHW, 0x00, 0x00, 0x0000000000000000)
            }
        })
        Method (_PPC, 0, NotSerialized)
        {
            If (ACPW)
            {
                Return (0x00)
            }
            Else
            {
                Return (0x00)
            }
        }

        Name (_PSS, Package (0x02)
        {
            Package (0x06)
            {
                0x00000640,
                0x000061A8,
                0x00000064,
                0x00000007,
                0xE0202A88,
                0x00000288
            },

            Package (0x06)
            {
                0x00000320,
                0x00002198,
                0x00000064,
                0x00000007,
                0xE0202D80,
                0x00000580
            }
        })
    }
}


--
If UNIX doesn't have the solution you have the wrong problem.
UNIX is simple, but it takes a genius to understand it's simplicity.