Re: IRQ problem with VAIO laptop again

From: Vladimir B. Grebenschikov <vova_at_fbsd.ru>
Date: Thu, 04 Dec 2003 12:30:13 +0300
÷ ÓÒ, 03.12.2003, × 01:50, John Baldwin ÐÉÛÅÔ:

> > The problem is that your _PRS values are incorrect.  Actually, I think jhb
> > committed some code to deal with extended irq resources.  Send me the
> > output of acpidump -t -d > pete-SonyVaio.asl
> > 
> > Also, does booting without ACPI fix things?
> 
> I fixed this bug a while ago.  Messed up a test for the type
> of _PRS.  (Used || instead of &&)

I have may be similar problem with pccard on VAIO z505S.

If I've book with pcmci card (say, lucent wi0) inserted - it works.

But if I try insert card (or eject if boot with card inserted) system
lookups hard. Only ddb rcan be called (stack trace of ddb call).

If I have command ddb 'call boot(2)' it process any pending input on
terminal (many enter in my case - so I have got many prompts) and then
lockup entirely, even debugger can't be called.

I have tried magic like:
hw.pci.allow_unsupported_io_range="1"

or like:
hw.pci.allow_unsupported_io_range="1"
hw.cbb.start_memory="0x20000000"

My guess, after card insertion something wrong happens with spl and only
few interrupts processed.

Also I have note that irq 9 is used by lot of devices (may be it is
reason ?):
# dmesg | fgrep irq\ 9
pcib0: slot 6 INTA is routed to irq 9
pcib0: slot 7 INTD is routed to irq 9
pcib0: slot 8 INTA is routed to irq 9
pcib0: slot 8 INTB is routed to irq 9
pcib0: slot 9 INTA is routed to irq 9
pcib0: slot 11 INTA is routed to irq 9
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xfca0-0xfcbf irq
9 at device 7.2 on pci0
intpm0: <Intel 82371AB Power management controller> port 0x2180-0x218f
irq 9 at device 7.3 on pci0
pcm0: <NeoMagic 256AV> mem 0xfea00000-0xfeafffff,0xfe000000-0xfe3fffff
irq 9 at device 8.1 on pci0
pcib0: slot 10 INTA is routed to irq 9
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xfcc0-0xfcff mem
0xfec00000-0xfecfffff,0xfedef000-0xfedeffff irq 9 at device 6.0 on pci0

So I can't use pcmci cards without reboot :(

# uname -a
FreeBSD vbook.fbsd.ru 5.2-BETA FreeBSD 5.2-BETA #6: Wed Nov 26 08:32:06
MSK 2003     root_at_walder.asplinux.ru:/ext/obj/ext/current/src/sys/VBOOK 
i386

A bit of history

First it works with both 4.x and 5-CURRENT (long ago), then it stop work
on 5-CURRENT with acpi, then (after pccard changes) it start freeze with
and without acpi on 5-CURRENT and on 4-STABLE.

Please help.

-- 
Vladimir B. Grebenschikov <vova_at_fbsd.ru>
SWsoft Inc.

Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 5.2-BETA #6: Wed Nov 26 08:32:06 MSK 2003
    root_at_walder.asplinux.ru:/ext/obj/ext/current/src/sys/VBOOK
Preloaded elf kernel "/boot/kernel/kernel" at 0xc07f1000.
Preloaded elf module "/boot/kernel/if_wi.ko" at 0xc07f11f4.
Preloaded elf module "/boot/kernel/wlan.ko" at 0xc07f12a0.
Preloaded elf module "/boot/kernel/rc4.ko" at 0xc07f134c.
Preloaded elf module "/boot/kernel/pccard.ko" at 0xc07f13f4.
Preloaded elf module "/boot/kernel/snd_pcm.ko" at 0xc07f14a0.
Preloaded elf module "/boot/kernel/snd_neomagic.ko" at 0xc07f154c.
Preloaded elf module "/boot/kernel/usb.ko" at 0xc07f1600.
Preloaded elf module "/boot/kernel/ukbd.ko" at 0xc07f16a8.
Preloaded elf module "/boot/kernel/ulpt.ko" at 0xc07f1754.
Preloaded elf module "/boot/kernel/ums.ko" at 0xc07f1800.
Preloaded elf module "/boot/kernel/umass.ko" at 0xc07f18a8.
Preloaded elf module "/boot/kernel/sysvmsg.ko" at 0xc07f1954.
Preloaded elf module "/boot/kernel/sysvsem.ko" at 0xc07f1a00.
Preloaded elf module "/boot/kernel/sysvshm.ko" at 0xc07f1aac.
Preloaded elf module "/boot/kernel/cbb.ko" at 0xc07f1b58.
Preloaded elf module "/boot/kernel/exca.ko" at 0xc07f1c00.
Preloaded elf module "/boot/kernel/cardbus.ko" at 0xc07f1cac.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Pentium II/Pentium II Xeon/Celeron (331.58-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x66a  Stepping = 10
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
real memory  = 201261056 (191 MB)
avail memory = 189964288 (181 MB)
Pentium Pro MTRR support enabled
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <SONY   Z0      > on motherboard
pcibios: BIOS version 2.10
Using $PIR table, 7 entries at 0xc00fdf50
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0
acpi_cpu0: <CPU> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib0: slot 6 INTA is routed to irq 9
pcib0: slot 7 INTD is routed to irq 9
pcib0: slot 8 INTA is routed to irq 9
pcib0: slot 8 INTB is routed to irq 9
pcib0: slot 9 INTA is routed to irq 9
pcib0: slot 11 INTA is routed to irq 9
pci0: <network, ethernet> at device 6.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0xfc90-0xfc9f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata0: [MPSAFE]
ata1: at 0x170 irq 15 on atapci0
ata1: [MPSAFE]
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xfca0-0xfcbf irq 9 at device 7.2 on pci0
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1: Texas Instruments UT-USB41 hub, class 9/0, rev 1.10/1.10, addr 2
uhub1: 4 ports with 4 removable, self powered
ums0: Microsoft Microsoft IntelliMouse® Explorer, rev 1.10/1.14, addr 3, iclass 3/1
ums0: 5 buttons and Z dir.
ukbd0: Behavior Tech. Computer Keyboard with mouse port, rev 1.00/1.00, addr 4, iclass 3/1
kbd1 at ukbd0
ums1: Behavior Tech. Computer Keyboard with mouse port, rev 1.00/1.00, addr 4, iclass 3/1
ums1: 3 buttons
intpm0: <Intel 82371AB Power management controller> port 0x2180-0x218f irq 9 at device 7.3 on pci0
intpm0: I/O mapped 2180
intpm0: intr IRQ 9 enabled revision 0
intsmb0: <Intel PIIX4 SMBUS Interface> on intpm0
smbus0: <System Management Bus> on intsmb0
smb0: <SMBus generic I/O> on smbus0
intpm0: PM I/O mapped 8000 
pci0: <display, VGA> at device 8.0 (no driver attached)
pcm0: <NeoMagic 256AV> mem 0xfea00000-0xfeafffff,0xfe000000-0xfe3fffff irq 9 at device 8.1 on pci0
pcm0: <Asahi Kasei AK4542 AC97 Codec>
pci0: <serial bus, FireWire> at device 9.0 (no driver attached)
cbb0: <RF5C475 PCI-CardBus Bridge> at device 10.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pcib0: slot 10 INTA is routed to irq 9
cbb0: [MPSAFE]
pci0: <simple comms> at device 11.0 (no driver attached)
speaker0 port 0x61 on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model GlidePoint, device ID 0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x140-0x147,0x3e8-0x3ef irq 10 drq 0 on acpi0
sio1: type 16550A
acpi_cmbat0: <Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
pmtimer0 on isa0
orm0: <Option ROMs> at iomem 0xdc000-0xdffff,0xc0000-0xcbfff on isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 331581287 Hz quality 800
Timecounters tick every 10.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to deny, logging unlimited
acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0%
GEOM: create disk ad0 dp=0xc2337460
ad0: 38154MB <TOSHIBA MK4019GAX> [77520/16/63] at ata0-master UDMA33
ata1-master: FAILURE - SETFEATURES status=51<READY,DSC,ERROR> error=4<ABORTED>
ata1-master: FAILURE - SETFEATURES status=51<READY,DSC,ERROR> error=4<ABORTED>
ad1: FAILURE - SETFEATURES status=51<READY,DSC,ERROR> error=4<ABORTED>
ad1: FAILURE - SETFEATURES status=51<READY,DSC,ERROR> error=4<ABORTED>
GEOM: create disk ad1 dp=0xc236a560
ad1: 3MB <MEMORYSTICK 4M 8K> [247/2/16] at ata1-master BIOSPIO
Mounting root from ufs:/dev/ad0s3a
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
/usr: mount pending error: blocks 2 files 1
WARNING: /usr/local was not properly dismounted
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xfcc0-0xfcff mem 0xfec00000-0xfecfffff,0xfedef000-0xfedeffff irq 9 at device 6.0 on pci0
fxp0: Ethernet address 08:00:46:04:31:b3
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
/*
  RSD PTR: OEM=SONY, ACPI_Rev=1.0x (0)
	RSDT=0x0bffcb2a, cksum=89
 */
/*
  RSDT: Length=40, Revision=1, Checksum=232,
	OEMID=SONY, OEM Table ID=Z0, OEM Revision=0x20000121,
	Creator ID= LTP, Creator Revision=0x0
	Entries={ 0x0bfff78c }
 */
/*
  FADT:	FACS=0xbffffc0, DSDT=0xbffcb52
	INT_MODEL=PIC
	Preferred_PM_Profile=Unspecified (0)
	SCI_INT=9
	SMI_CMD=0xb2, ACPI_ENABLE=0xf0, ACPI_DISABLE=0xf1, S4BIOS_REQ=0xf2
	PSTATE_CNT=0x0
	PM1a_EVT_BLK=0x8000-0x8003
	PM1a_CNT_BLK=0x8042-0x8043
	PM_TMR_BLK=0x8008-0x800b
	GPE0_BLK=0x800c-0x800f
	P_LVL2_LAT=10 us, P_LVL3_LAT=20 us
	FLUSH_SIZE=0, FLUSH_STRIDE=0
	DUTY_OFFSET=1, DUTY_WIDTH=3
	DAY_ALRM=13, MON_ALRM=0, CENTURY=50
	IAPC_BOOT_ARCH=
	Flags={WBINVD,SLP_BUTTON}
 */
/*
  FACS:	Length=64, HwSig=0x00000000, Firm_Wake_Vec=0x00000000
	Global_Lock=
	Flags=S4BIOS
	Version=0
 */
/*
  DSDT: Length=11322, Revision=1, Checksum=113,
	OEMID=SONY, OEM Table ID=Z0, OEM Revision=0x20000121,
	Creator ID=MSFT, Creator Revision=0x1000007
 */
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20030619
 *
 * Disassembly of /tmp/acpidump.ctT5cC, Thu Dec  4 12:23:46 2003
 */
DefinitionBlock ("DSDT.aml", "DSDT", 1, "SONY  ", "Z0      ", 536871201)
{
    Scope (_PR)
    {
        Processor (CPU0, 0x00, 0x00008010, 0x06) {}
    }

    Name (_S0, Package (0x02)
    {
        0x05, 
        0x05
    })
    Name (_S1, Package (0x02)
    {
        0x04, 
        0x04
    })
    Name (_S3, Package (0x02)
    {
        0x01, 
        0x01
    })
    Name (_S4, Package (0x02)
    {
        0x00, 
        0x00
    })
    Name (_S5, Package (0x02)
    {
        0x00, 
        0x00
    })
    OperationRegion (GPO, SystemIO, 0x8034, 0x04)
    Field (GPO, DWordAcc, NoLock, Preserve)
    {
        GO00,   1, 
        GO01,   1, 
        GO02,   1, 
        GO03,   1, 
        GO04,   1, 
        GO05,   1, 
        GO06,   1, 
        GO07,   1, 
        GO08,   1, 
        GO09,   1, 
        GO10,   1, 
        GO11,   1, 
        GO12,   1, 
        GO13,   1, 
        GO14,   1, 
        GO15,   1, 
        GO16,   1, 
        GO17,   1, 
        GO18,   1, 
        GO19,   1, 
        GO20,   1, 
        GO21,   1, 
        GO22,   1, 
        GO23,   1, 
        GO24,   1, 
        GO25,   1, 
        GO26,   1, 
        GO27,   1, 
        GO28,   1, 
        GO29,   1, 
        GO30,   1, 
        GO31,   1
    }

    Mutex (MLAT, 0x00)
    Method (GLAT, 0, NotSerialized)
    {
        Acquire (MLAT, 0xFFFF)
        Store (One, GO14)
        Store (Zero, GO14)
        Release (MLAT)
    }

    OperationRegion (GLBL, SystemIO, 0x8028, 0x04)
    Field (GLBL, DWordAcc, NoLock, Preserve)
    {
        Offset (0x03), 
            ,   1, 
        LPOL,   1
    }

    OperationRegion (SMI0, SystemMemory, 0x0BFFFBA7, 0x00000415)
    Field (SMI0, AnyAcc, NoLock, Preserve)
    {
        BCMD,   8, 
        DID,    32, 
        INFO,   4096
    }

    Field (SMI0, AnyAcc, NoLock, Preserve)
    {
        Offset (0x05), 
        INFB,   8
    }

    Field (SMI0, AnyAcc, NoLock, Preserve)
    {
        Offset (0x05), 
        INFD,   32
    }

    Field (SMI0, AnyAcc, NoLock, Preserve)
    {
        Offset (0x05), 
        SXBF,   8320
    }

    OperationRegion (SMI1, SystemIO, 0x00008040, 0x00000002)
    Field (SMI1, AnyAcc, NoLock, Preserve)
    {
        SMIC,   8
    }

    Mutex (MPHS, 0x00)
    Method (PHS0, 1, NotSerialized)
    {
        Store (Arg0, BCMD)
        Store (Zero, SMIC)
        While (LEqual (BCMD, Arg0)) {}
        Store (0x00, BCMD)
    }

    Method (PHS, 1, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (0x00, DID)
        PHS0 (Arg0)
        Store (INFD, Local0)
        Release (MPHS)
        Return (Local0)
    }

    Method (PHSB, 2, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (0x00, DID)
        Store (Arg1, INFB)
        PHS0 (Arg0)
        Store (INFB, Local0)
        Release (MPHS)
        Return (Local0)
    }

    Method (PSCS, 1, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (Arg0, DID)
        PHS0 (0x00)
        Store (INFO, Local0)
        Release (MPHS)
        Return (Local0)
    }

    Method (PSSS, 2, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (Arg0, DID)
        Store (Arg1, INFO)
        PHS0 (0x01)
        Release (MPHS)
    }

    Method (PSPS, 1, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (Arg0, DID)
        PHS0 (0x02)
        Store (INFO, Local0)
        Release (MPHS)
        Return (Local0)
    }

    Method (PSDI, 1, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (Arg0, DID)
        PHS0 (0x03)
        Release (MPHS)
    }

    Method (PSST, 1, Serialized)
    {
        Acquire (MPHS, 0xFFFF)
        Store (Arg0, DID)
        PHS0 (0x04)
        Store (INFB, Local0)
        Release (MPHS)
        Return (Local0)
    }

    Scope (\_GPE)
    {
        Method (_E09, 0, NotSerialized)
        {
            \_SB.PCI0.ISA.EC.SCID ()
        }

        Method (_L0A, 0, NotSerialized)
        {
            Store ("Generated SWI", Debug)
            Notify (\_SB.PCI0, 0x02)
        }

        Name (_PRW, Package (0x02)
        {
            0x0B, 
            0x04
        })
        Method (_L08, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.USB0, 0x02)
        }

        Method (_L0B, 0, NotSerialized)
        {
            Notify (\_SB.PWRB, 0x02)
        }
    }

    Method (MIN, 2, NotSerialized)
    {
        If (LLess (Arg0, Arg1))
        {
            Return (Arg0)
        }
        Else
        {
            Return (Arg1)
        }
    }

    Method (SLEN, 1, NotSerialized)
    {
        Return (SizeOf (Arg0))
    }

    Method (S2BF, 1, Serialized)
    {
        Add (SLEN (Arg0), One, Local0)
        Name (BUFF, Buffer (Local0) {})
        Store (Arg0, BUFF)
        Return (BUFF)
    }

    Method (SCMP, 2, NotSerialized)
    {
        Store (S2BF (Arg0), Local0)
        Store (S2BF (Arg1), Local1)
        Store (Zero, Local4)
        Store (SLEN (Arg0), Local5)
        Store (SLEN (Arg1), Local6)
        Store (MIN (Local5, Local6), Local7)
        While (LLess (Local4, Local7))
        {
            Store (DerefOf (Index (Local0, Local4)), Local2)
            Store (DerefOf (Index (Local1, Local4)), Local3)
            If (LGreater (Local2, Local3))
            {
                Return (One)
            }
            Else
            {
                If (LLess (Local2, Local3))
                {
                    Return (Ones)
                }
            }

            Increment (Local4)
        }

        If (LLess (Local4, Local5))
        {
            Return (One)
        }
        Else
        {
            If (LLess (Local4, Local6))
            {
                Return (Ones)
            }
            Else
            {
                Return (Zero)
            }
        }
    }

    Scope (_SB)
    {
        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C"))
            Name (_PRW, Package (0x02)
            {
                0x0B, 
                0x04
            })
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }

            Method (_PS0, 0, NotSerialized)
            {
            }

            Method (_PS3, 0, NotSerialized)
            {
                Store (One, GO11)
            }
        }

        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A03"))
            Name (_ADR, 0x00)
            Name (_BBN, 0x00)
            Name (_PRT, Package (0x07)
            {
                Package (0x04)
                {
                    0x0007FFFF, 
                    0x03, 
                    LNKD, 
                    0x00
                }, 

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

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

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

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

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

                Package (0x04)
                {
                    0x0006FFFF, 
                    0x00, 
                    LNKA, 
                    0x00
                }
            })
            OperationRegion (REGS, PCI_Config, 0x40, 0xC0)
            Field (REGS, DWordAcc, NoLock, Preserve)
            {
                Offset (0x19), 
                PAM0,   8, 
                PAM1,   8, 
                PAM2,   8, 
                PAM3,   8, 
                PAM4,   8, 
                PAM5,   8, 
                PAM6,   8, 
                DRB0,   8, 
                DRB1,   8, 
                DRB2,   8, 
                DRB3,   8, 
                DRB4,   8, 
                DRB5,   8, 
                DRB6,   8, 
                DRB7,   8, 
                    ,   6, 
                HEN,    2, 
                Offset (0x33), 
                T_EN,   1, 
                T_SZ,   2, 
                Offset (0x3A), 
                CRST,   1
            }

            Name (RSRC, Buffer (0x01D2)
            {
                0x88, 0x0E, 0x00, 0x02, 0x0C, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x01, 
                0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xFF, 
                0xFF, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x02, 0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 
                0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x0C, 0x00, 0xFF, 0x3F, 0x0C, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 
                0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x40, 0x0C, 0x00, 0xFF, 0x7F, 0x0C, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 
                0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0C, 0x00, 
                0xFF, 0xBF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 0x18, 0x00, 
                0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 
                0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0xFF, 0x3F, 
                0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 
                0x00, 0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 
                0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0D, 
                0x00, 0xFF, 0x7F, 0x0D, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 0x18, 
                0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x80, 0x0D, 0x00, 0xFF, 0xBF, 0x0D, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 
                0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0xC0, 0x0D, 0x00, 0xFF, 
                0xFF, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x40, 0x00, 0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 
                0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x0E, 0x00, 0xFF, 0x3F, 0x0E, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 
                0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x40, 0x0E, 0x00, 0xFF, 0x7F, 0x0E, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 
                0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0E, 0x00, 
                0xFF, 0xBF, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 0x18, 0x00, 
                0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0xC0, 0x0E, 0x00, 0xFF, 0xFF, 0x0E, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 
                0x87, 0x18, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x87, 0x18, 0x00, 0x00, 0x0C, 
                0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x01, 
                0xF8, 0x0C, 0xF8, 0x0C, 0x01, 0x08, 0x88, 0x0E, 
                0x00, 0x01, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 
                0xF7, 0x0C, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x88, 
                0x0E, 0x00, 0x01, 0x0C, 0x03, 0x00, 0x00, 0x00, 
                0x0D, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xF3, 0x00, 
                0x79, 0x00
            })
            Method (_CRS, 0, Serialized)
            {
                Store (Zero, Local1)
                If (T_EN)
                {
                    ShiftLeft (0x01, Add (T_SZ, 0x11), Local1)
                }

                CreateDWordField (RSRC, 0x017A, BTMN)
                CreateDWordField (RSRC, 0x017E, BTMX)
                CreateDWordField (RSRC, 0x0186, BTLN)
                Multiply (DRB7, 0x00800000, Local0)
                If (T_EN)
                {
                    Subtract (Local0, Local1, Local2)
                    Store (Local2, BTMN)
                    Subtract (Add (Local0, 0x10000000), BTMN, BTLN)
                }
                Else
                {
                    Store (Local0, BTMN)
                    Subtract (0xFFE00000, Local0, BTLN)
                    Subtract (Add (BTMN, BTLN), 0x01, BTMX)
                }

                CreateDWordField (RSRC, 0x0195, ATMN)
                CreateDWordField (RSRC, 0x0199, ATMX)
                CreateDWordField (RSRC, 0x01A1, ATLN)
                If (T_EN)
                {
                    Add (Add (BTMN, BTLN), Local1, ATMN)
                    Subtract (0xFFE00000, ATMN, ATLN)
                    Subtract (Add (ATMN, ATLN), 0x01, ATMX)
                }
                Else
                {
                    Store (Zero, ATLN)
                }

                CreateBitField (RSRC, 0x0188, C0RW)
                CreateDWordField (RSRC, 0x36, C0MN)
                CreateDWordField (RSRC, 0x3A, C0MX)
                CreateDWordField (RSRC, 0x42, C0LN)
                Store (One, C0RW)
                If (LEqual (And (PAM1, 0x03), 0x01))
                {
                    Store (Zero, C0RW)
                }

                Store (Zero, C0LN)
                If (LNot (And (PAM1, 0x03)))
                {
                    Store (0x4000, C0LN)
                }

                CreateBitField (RSRC, 0x0260, C4RW)
                CreateDWordField (RSRC, 0x51, C4MN)
                CreateDWordField (RSRC, 0x55, C4MX)
                CreateDWordField (RSRC, 0x5D, C4LN)
                Store (One, C4RW)
                If (LEqual (And (PAM1, 0x30), 0x10))
                {
                    Store (Zero, C4RW)
                }

                Store (Zero, C4LN)
                If (LNot (And (PAM1, 0x30)))
                {
                    Store (0x4000, C4LN)
                }

                CreateBitField (RSRC, 0x0338, C8RW)
                CreateDWordField (RSRC, 0x6C, C8MN)
                CreateDWordField (RSRC, 0x70, C8MX)
                CreateDWordField (RSRC, 0x78, C8LN)
                Store (One, C8RW)
                If (LEqual (And (PAM2, 0x03), 0x01))
                {
                    Store (Zero, C8RW)
                }

                Store (Zero, C8LN)
                If (LNot (And (PAM2, 0x03)))
                {
                    Store (0x4000, C8LN)
                }

                CreateBitField (RSRC, 0x0410, CCRW)
                CreateDWordField (RSRC, 0x87, CCMN)
                CreateDWordField (RSRC, 0x8B, CCMX)
                CreateDWordField (RSRC, 0x93, CCLN)
                Store (One, CCRW)
                If (LEqual (And (PAM2, 0x30), 0x10))
                {
                    Store (Zero, CCRW)
                }

                Store (Zero, CCLN)
                If (LNot (And (PAM2, 0x30)))
                {
                    Store (0x4000, CCLN)
                }

                CreateBitField (RSRC, 0x04E8, D0RW)
                CreateDWordField (RSRC, 0xA2, D0MN)
                CreateDWordField (RSRC, 0xA6, D0MX)
                CreateDWordField (RSRC, 0xAE, D0LN)
                Store (One, D0RW)
                If (LEqual (And (PAM3, 0x03), 0x01))
                {
                    Store (Zero, D0RW)
                }

                Store (Zero, D0LN)
                If (LNot (And (PAM3, 0x03)))
                {
                    Store (0x4000, D0LN)
                }

                CreateBitField (RSRC, 0x05C0, D4RW)
                CreateDWordField (RSRC, 0xBD, D4MN)
                CreateDWordField (RSRC, 0xC1, D4MX)
                CreateDWordField (RSRC, 0xC9, D4LN)
                Store (One, D4RW)
                If (LEqual (And (PAM3, 0x30), 0x10))
                {
                    Store (Zero, D4RW)
                }

                Store (Zero, D4LN)
                If (LNot (And (PAM3, 0x30)))
                {
                    Store (0x4000, D4LN)
                }

                CreateBitField (RSRC, 0x0698, D8RW)
                CreateDWordField (RSRC, 0xD8, D8MN)
                CreateDWordField (RSRC, 0xDC, D8MX)
                CreateDWordField (RSRC, 0xE4, D8LN)
                Store (One, D8RW)
                If (LEqual (And (PAM4, 0x03), 0x01))
                {
                    Store (Zero, D8RW)
                }

                Store (Zero, D8LN)
                If (LNot (And (PAM4, 0x03)))
                {
                    Store (0x4000, D8LN)
                }

                CreateBitField (RSRC, 0x0770, DCRW)
                CreateDWordField (RSRC, 0xF3, DCMN)
                CreateDWordField (RSRC, 0xF7, DCMX)
                CreateDWordField (RSRC, 0xFF, DCLN)
                Store (Zero, DCRW)
                Store (0x4000, DCLN)
                CreateBitField (RSRC, 0x0848, E0RW)
                CreateDWordField (RSRC, 0x010E, E0MN)
                CreateDWordField (RSRC, 0x0112, E0MX)
                CreateDWordField (RSRC, 0x011A, E0LN)
                Store (One, E0RW)
                If (LEqual (And (PAM5, 0x03), 0x01))
                {
                    Store (Zero, E0RW)
                }

                Store (Zero, E0LN)
                If (LNot (And (PAM5, 0x03)))
                {
                    Store (0x4000, E0LN)
                }

                CreateBitField (RSRC, 0x0920, E4RW)
                CreateDWordField (RSRC, 0x0129, E4MN)
                CreateDWordField (RSRC, 0x012D, E4MX)
                CreateDWordField (RSRC, 0x0135, E4LN)
                Store (One, E4RW)
                If (LEqual (And (PAM5, 0x30), 0x10))
                {
                    Store (Zero, E4RW)
                }

                Store (Zero, E4LN)
                If (LNot (And (PAM5, 0x30)))
                {
                    Store (0x4000, E4LN)
                }

                CreateBitField (RSRC, 0x09F8, E8RW)
                CreateDWordField (RSRC, 0x0144, E8MN)
                CreateDWordField (RSRC, 0x0148, E8MX)
                CreateDWordField (RSRC, 0x0150, E8LN)
                Store (One, E8RW)
                If (LEqual (And (PAM6, 0x03), 0x01))
                {
                    Store (Zero, E8RW)
                }

                Store (Zero, E8LN)
                If (LNot (And (PAM6, 0x03)))
                {
                    Store (0x4000, E8LN)
                }

                CreateBitField (RSRC, 0x0AD0, ECRW)
                CreateDWordField (RSRC, 0x015F, ECMN)
                CreateDWordField (RSRC, 0x0163, ECMX)
                CreateDWordField (RSRC, 0x016B, ECLN)
                Store (One, ECRW)
                If (LEqual (And (PAM6, 0x30), 0x10))
                {
                    Store (Zero, ECRW)
                }

                Store (Zero, ECLN)
                If (LNot (And (PAM6, 0x30)))
                {
                    Store (0x4000, ECLN)
                }

                Return (RSRC)
            }

            Device (USB0)
            {
                Name (_ADR, 0x00070002)
                OperationRegion (CFG2, PCI_Config, 0x00, 0x0100)
                Field (CFG2, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x20), 
                    USBB,   16
                }

                Method (_STA, 0, NotSerialized)
                {
                    And (USBB, 0xFFE0, Local0)
                    If (LEqual (Local0, 0x00))
                    {
                        Return (0x00)
                    }
                    Else
                    {
                        Return (0x0F)
                    }
                }

                Name (_PSC, 0x00)
                Method (_PS0, 0, NotSerialized)
                {
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                    {
                        Noop
                    }
                    Else
                    {
                        If (LEqual (_PSC, 0x03))
                        {
                            PHS (0xF2)
                            Store (0x00, _PSC)
                        }
                    }
                }

                Method (_PS3, 0, NotSerialized)
                {
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                    {
                        Noop
                    }
                    Else
                    {
                        If (LEqual (_PSC, 0x00))
                        {
                            PHS (0xF1)
                            Store (0x03, _PSC)
                        }
                    }
                }

                Name (_PRW, Package (0x02)
                {
                    0x08, 
                    0x01
                })
            }

            Device (PWR)
            {
                Name (_ADR, 0x00070003)
                OperationRegion (PCI, PCI_Config, 0x50, 0x28)
                Field (PCI, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x01), 
                        ,   4, 
                    FDCM,   1, 
                        ,   1, 
                    U1M,    1, 
                    Offset (0x02), 
                    U2M,    1, 
                        ,   1, 
                    LPTM,   1, 
                    Offset (0x0C), 
                    MDIE,   1, 
                    MDIA,   2, 
                    SBE,    1, 
                    GME,    1, 
                    SBA,    2, 
                    MSSE,   1, 
                    MSSA,   2, 
                    Offset (0x0F), 
                        ,   1, 
                    AUDM,   1, 
                        ,   2, 
                    KBCM,   1, 
                    G12M,   1, 
                    G13M,   1, 
                    LPTE,   1, 
                    G09A,   16, 
                    G09L,   4, 
                        ,   1, 
                    G09M,   1, 
                    G09E,   1, 
                    Offset (0x13), 
                        ,   1, 
                    LPTA,   2, 
                        ,   1, 
                    FDCA,   1, 
                    FDCE,   1, 
                    KBCE,   1, 
                    GMM,    1, 
                    G10A,   16, 
                    G10L,   4, 
                        ,   1, 
                    G10M,   1, 
                    G10E,   1, 
                    G10C,   1, 
                    U1A,    3, 
                    U1E,    1, 
                    U2A,    3, 
                    U2E,    1, 
                    G12A,   16, 
                    G12L,   4, 
                    G12E,   1, 
                    Offset (0x20), 
                    G13A,   16, 
                    G13L,   4, 
                    G13E,   1
                }
            }

            Device (IDE)
            {
                Name (_ADR, 0x00070001)
                OperationRegion (PCI, PCI_Config, 0x40, 0x10)
                Field (PCI, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x03), 
                        ,   7, 
                    SIDE,   1
                }

                Field (PCI, DWordAcc, NoLock, Preserve)
                {
                    R40,    32, 
                    Offset (0x08), 
                    R48,    32
                }

                Device (PRIM)
                {
                    Name (_ADR, 0x00)
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Method (_STM, 2, NotSerialized)
                    {
                    }

                    Device (MAST)
                    {
                        Name (_ADR, 0x00)
                        Method (_STA, 0, NotSerialized)
                        {
                            Return (PHSB (0xE3, 0x00))
                        }

                        Name (_PSC, 0x00)
                    }
                }

                Device (SECN)
                {
                    Name (_ADR, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                        {
                            Return (0x00)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }

                    Method (_STM, 2, NotSerialized)
                    {
                    }

                    Device (MAST)
                    {
                        Name (_ADR, 0x00)
                        Method (_STA, 0, NotSerialized)
                        {
                            If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                            {
                                Return (0x00)
                            }
                            Else
                            {
                                Return (PHSB (0xE3, 0x01))
                            }
                        }

                        Name (_PSC, 0x00)
                    }
                }

                Name (_PSC, 0x00)
                Name (IDET, 0x00)
                Name (UDMA, 0x00)
                Method (_PS0, 0, NotSerialized)
                {
                    If (LEqual (_PSC, 0x03))
                    {
                        Store (IDET, R40)
                        Store (UDMA, R48)
                        PHS (0xF0)
                        If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero)) {}
                        Else
                        {
                            PHS (0xF9)
                        }
                    }

                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                    {
                        Store (\_SB.PCI0.ISA.SIDE, Local0)
                        Or (Local0, 0x1000, \_SB.PCI0.ISA.SIDE)
                    }

                    Store (0x00, _PSC)
                }

                Method (_PS3, 0, NotSerialized)
                {
                    Store (R40, IDET)
                    Store (R48, UDMA)
                    Store (0x03, _PSC)
                }
            }

            Device (VID0)
            {
                Name (_ADR, 0x00080000)
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x0F)
                }
            }

            Device (AUD0)
            {
                Name (_ADR, 0x00080001)
                Name (_STA, 0x0F)
                Name (_PSC, 0x00)
                Method (_PS0, 0, NotSerialized)
                {
                    Store (Zero, GO11)
                    Store (0x00, _PSC)
                }

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

            Device (SD94)
            {
                Name (_ADR, 0x00090000)
                Name (_STA, 0x0F)
                OperationRegion (SPCI, PCI_Config, 0x00, 0x0100)
                Field (SPCI, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x04), 
                    COMD,   8, 
                    Offset (0x0C), 
                    CALS,   8, 
                    LATI,   8, 
                    Offset (0x10), 
                    MADR,   32, 
                    Offset (0x2C), 
                    SSID,   32, 
                    Offset (0x3C), 
                    IRQN,   8, 
                    Offset (0x4C), 
                    ESID,   8, 
                    Offset (0xE0), 
                    PWST,   8
                }

                Name (SSAV, Package (0x03) {})
                Name (_PSC, 0x00)
                Method (_PS0, 0, NotSerialized)
                {
                    Store (0x01, ESID)
                    Store (0x8054104D, SSID)
                    Store (0x00, ESID)
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero)) {}
                    Else
                    {
                        Store (0x00, PWST)
                        Sleep (0x01)
                        Store (0x08, CALS)
                        Store (0x40, LATI)
                        If (LEqual (_PSC, 0x03))
                        {
                            Store (DerefOf (Index (SSAV, 0x00)), COMD)
                            Store (DerefOf (Index (SSAV, 0x01)), MADR)
                            Store (DerefOf (Index (SSAV, 0x02)), IRQN)
                        }
                    }

                    Store (0x00, _PSC)
                }

                Method (_PS3, 0, NotSerialized)
                {
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero)) {}
                    Else
                    {
                        If (LEqual (_PSC, 0x00))
                        {
                            Store (COMD, Index (SSAV, 0x00))
                            Store (MADR, Index (SSAV, 0x01))
                            Store (IRQN, Index (SSAV, 0x02))
                        }
                    }

                    Store (0x03, _PSC)
                }
            }

            Device (CRD0)
            {
                Name (_ADR, 0x000A0000)
                Name (_PRW, Package (0x02)
                {
                    0x0A, 
                    0x03
                })
                OperationRegion (CCRD, PCI_Config, 0x00, 0xE4)
                Field (CCRD, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x04), 
                    CD04,   32, 
                    Offset (0x3E), 
                    CD3E,   32, 
                    Offset (0x44), 
                    CD44,   32, 
                    Offset (0x82), 
                    CD82,   8, 
                    Offset (0xE0), 
                    CDE0,   8, 
                    CDE1,   8
                }

                OperationRegion (EXCA, SystemIO, 0x03E0, 0x02)
                Field (EXCA, ByteAcc, NoLock, Preserve)
                {
                    INDX,   8, 
                    DATA,   8
                }

                IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
                {
                    Offset (0x03), 
                        ,   7, 
                    ERIB,   1
                }

                Method (_INI, 0, NotSerialized)
                {
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                    {
                        Noop
                    }
                    Else
                    {
                        Store (Zero, CDE0)
                        Store (Zero, CD04)
                        Store (Zero, CD3E)
                        Store (One, CD44)
                    }
                }

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

                Name (_PSC, 0x00)
                Method (PSX, 1, NotSerialized)
                {
                    Store (0x00, CDE0)
                    Store (0x03E0, CD44)
                    Store (One, ERIB)
                    Store (0x00, CD44)
                    Store (Arg0, CDE0)
                    Store (Arg0, _PSC)
                }

                Method (_PS0, 0, NotSerialized)
                {
                    Store (0x00, _PSC)
                }

                Method (_PS1, 0, NotSerialized)
                {
                    PSX (0x01)
                    Or (CDE1, 0x01, CDE1)
                }

                Method (_PS2, 0, NotSerialized)
                {
                    PSX (0x02)
                    Or (CDE1, 0x01, CDE1)
                }

                Method (_PS3, 0, NotSerialized)
                {
                    PSX (0x03)
                    Or (CDE1, 0x01, CDE1)
                }

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

                    GLAT ()
                }
            }

            Device (MODE)
            {
                Name (_ADR, 0x000B0000)
                Name (_STA, 0x0F)
                Method (_PRW, 0, NotSerialized)
                {
                    If (LEqual (SCMP (\_OS, "Microsoft Windows NT"), Zero))
                    {
                        Return (Package (0x02)
                        {
                            0x0A, 
                            0x03
                        })
                    }
                    Else
                    {
                        Return (Package (0x02)
                        {
                            0x0A, 
                            0x04
                        })
                    }
                }
            }

            Name (_PRW, Package (0x02)
            {
                0x0A, 
                0x04
            })
            Device (ISA)
            {
                Name (_ADR, 0x00070000)
                OperationRegion (PIRX, PCI_Config, 0x60, 0x04)
                Field (PIRX, ByteAcc, NoLock, Preserve)
                {
                    PIRA,   8, 
                    PIRB,   8, 
                    PIRC,   8, 
                    PIRD,   8
                }

                OperationRegion (GCFG, PCI_Config, 0xB0, 0x04)
                Field (GCFG, DWordAcc, NoLock, Preserve)
                {
                    SIDE,   32
                }

                Device (MOTH)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_CRS, Buffer (0x32)
                    {
                        0x47, 0x01, 0x80, 0x00, 0x80, 0x00, 0x01, 0x01, 
                        0x47, 0x01, 0xB2, 0x00, 0xB2, 0x00, 0x01, 0x02, 
                        0x47, 0x01, 0xD0, 0x04, 0xD0, 0x04, 0x01, 0x02, 
                        0x47, 0x01, 0x80, 0x21, 0x80, 0x21, 0x01, 0x10, 
                        0x47, 0x01, 0x00, 0x80, 0x00, 0x80, 0x01, 0x50, 
                        0x47, 0x01, 0x72, 0x00, 0x72, 0x00, 0x01, 0x02, 
                        0x79, 0x00
                    })
                }

                Device (MEM)
                {
                    Name (_HID, EisaId ("PNP0C01"))
                    Name (MSRC, Buffer (0x3E)
                    {
                        0x86, 0x09, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 
                        0x00, 0x00, 0x00, 0x00, 0x86, 0x09, 0x00, 0x01, 
                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 
                        0x86, 0x09, 0x00, 0x00, 0x00, 0xC0, 0x0D, 0x00, 
                        0x00, 0x40, 0x00, 0x00, 0x86, 0x09, 0x00, 0x00, 
                        0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x02, 0x00, 
                        0x86, 0x09, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 
                        0x00, 0x00, 0x08, 0x00, 0x79, 0x00
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateDWordField (MSRC, 0x08, MEMS)
                        If (LNot (MEMS))
                        {
                            Store (PHS (0xEF), MEMS)
                        }

                        Return (MSRC)
                    }

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

                Device (DMAC)
                {
                    Name (_HID, EisaId ("PNP0200"))
                    Name (_CRS, Buffer (0x1D)
                    {
                        0x47, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 
                        0x47, 0x01, 0x81, 0x00, 0x81, 0x00, 0x01, 0x0F, 
                        0x47, 0x01, 0xC0, 0x00, 0xC0, 0x00, 0x01, 0x20, 
                        0x2A, 0x10, 0x00, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Name (_CRS, Buffer (0x0D)
                    {
                        0x47, 0x01, 0x70, 0x00, 0x70, 0x00, 0x01, 0x02, 
                        0x22, 0x00, 0x01, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (PIC)
                {
                    Name (_HID, EisaId ("PNP0000"))
                    Name (_CRS, Buffer (0x15)
                    {
                        0x47, 0x01, 0x20, 0x00, 0x20, 0x00, 0x01, 0x02, 
                        0x47, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x01, 0x02, 
                        0x22, 0x04, 0x00, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (FPU)
                {
                    Name (_HID, EisaId ("PNP0C04"))
                    Name (_CRS, Buffer (0x0D)
                    {
                        0x47, 0x01, 0xF0, 0x00, 0xF0, 0x00, 0x01, 0x10, 
                        0x22, 0x00, 0x20, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (TMR)
                {
                    Name (_HID, EisaId ("PNP0100"))
                    Name (_CRS, Buffer (0x0D)
                    {
                        0x47, 0x01, 0x40, 0x00, 0x40, 0x00, 0x01, 0x04, 
                        0x22, 0x01, 0x00, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (SPKR)
                {
                    Name (_HID, EisaId ("PNP0800"))
                    Name (_CRS, Buffer (0x0A)
                    {
                        0x47, 0x01, 0x61, 0x00, 0x61, 0x00, 0x01, 0x01, 
                        0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (KBC)
                {
                    Name (_HID, EisaId ("PNP0303"))
                    Name (_CRS, Buffer (0x15)
                    {
                        0x47, 0x01, 0x60, 0x00, 0x60, 0x00, 0x01, 0x01, 
                        0x47, 0x01, 0x64, 0x00, 0x64, 0x00, 0x01, 0x01, 
                        0x22, 0x02, 0x00, 0x79, 0x00
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (MOUE)
                {
                    Name (_HID, EisaId ("PNP0F13"))
                    Name (_CRS, Buffer (0x05)
                    {
                        0x22, 0x00, 0x10, 0x79, 0x00
                    })
                }

                Device (EC)
                {
                    Name (_HID, EisaId ("PNP0A05"))
                    OperationRegion (SMC1, SystemIO, 0x0370, 0x02)
                    Field (SMC1, ByteAcc, NoLock, Preserve)
                    {
                        INDX,   8, 
                        DATA,   8
                    }

                    IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x02), 
                        CFG,    8, 
                        Offset (0x07), 
                        LDN,    8, 
                        Offset (0x22), 
                        PCFD,   1, 
                            ,   2, 
                        PCPP,   1, 
                        PCU1,   1, 
                        PCU2,   1, 
                        Offset (0x23), 
                        Offset (0x30), 
                        ACTR,   8, 
                        Offset (0x60), 
                        IOAH,   8, 
                        IOAL,   8, 
                        FIRH,   8, 
                        FIRL,   8, 
                        Offset (0x70), 
                        INTR,   8, 
                        INT1,   8, 
                        Offset (0x74), 
                        DMCH,   8, 
                        Offset (0xC0), 
                        GP40,   8, 
                        Offset (0xF0), 
                        OPT1,   8, 
                        OPT2,   8, 
                        OPT3,   8
                    }

                    Mutex (MUIO, 0x00)
                    Method (ENFG, 0, NotSerialized)
                    {
                        Acquire (MUIO, 0xFFFF)
                        Store (0x55, INDX)
                    }

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

                    Name (_PRW, Package (0x02)
                    {
                        0x0B, 
                        0x04
                    })
                    Method (_PSW, 1, NotSerialized)
                    {
                        OperationRegion (GPO, SystemIO, 0x800E, 0x02)
                        Field (GPO, ByteAcc, NoLock, Preserve)
                        {
                                ,   10, 
                            RIEN,   1
                        }

                        Store (Arg0, RIEN)
                    }

                    Method (RDMB, 1, NotSerialized)
                    {
                        ENFG ()
                        Store (0x07, LDN)
                        Store (Arg0, INDX)
                        Store (DATA, Local0)
                        EXFG ()
                        Return (Local0)
                    }

                    Method (WRMB, 2, NotSerialized)
                    {
                        ENFG ()
                        Store (0x07, LDN)
                        Store (Arg0, INDX)
                        Store (Arg1, DATA)
                        EXFG ()
                    }

                    Method (WIBE, 0, NotSerialized)
                    {
                        While (RDMB (0x82)) {}
                    }

                    Method (WOBF, 0, NotSerialized)
                    {
                        Store (Zero, Local0)
                        While (LNot (Local0))
                        {
                            And (RDMB (0x86), 0x02, Local0)
                        }
                    }

                    Mutex (MSCI, 0x00)
                    Method (SCID, 0, NotSerialized)
                    {
                        Store ("SCI generated", Debug)
                        Store (Ones, Local7)
                        While (Local7)
                        {
                            And (RDMB (0x86), 0x01, Local0)
                            If (Local0)
                            {
                                Acquire (MSCI, 0xFFFF)
                                WIBE ()
                                WRMB (0x82, 0x84)
                                WOBF ()
                                Store (RDMB (0x83), Local0)
                                Store (RDMB (0x86), Local1)
                                And (Local1, 0xFD, Local1)
                                WRMB (0x86, Local1)
                                Release (MSCI)
                                Store (Local0, Debug)
                                QREC (Local0)
                            }
                            Else
                            {
                                Store (Zero, Local7)
                            }
                        }
                    }

                    Name (LCDT, Ones)
                    Name (LID, One)
                    Method (QREC, 1, NotSerialized)
                    {
                        If (LEqual (Arg0, 0x51))
                        {
                            Notify (\_SB.PCI0.ISA.SNC, 0xA0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x53))
                            {
                                Notify (\_SB.PCI0.ISA.SNC, 0xAC)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x54))
                                {
                                    EXCD (0x20)
                                    Notify (\_SB.PCI0.ISA.SNC, 0xA2)
                                }
                                Else
                                {
                                    If (LEqual (Arg0, 0x55))
                                    {
                                        EXCD (0x1F)
                                        Notify (\_SB.PCI0.ISA.SNC, 0xA3)
                                    }
                                    Else
                                    {
                                        If (LEqual (Arg0, 0x56))
                                        {
                                            Notify (\_SB.PCI0.ISA.SNC, 0xB3)
                                        }
                                        Else
                                        {
                                            If (LEqual (Arg0, 0x57))
                                            {
                                                Store (RDMB (0x8E), Local0)
                                                Store (RDMB (0x8F), Local1)
                                                WRMB (0x8F, Local0)
                                                XOr (Local0, Local1, Local2)
                                                If (And (Local2, 0x01))
                                                {
                                                    Notify (BAT1, 0x81)
                                                }

                                                If (And (Local2, 0x20))
                                                {
                                                    Notify (ACAD, 0x80)
                                                    Notify (\_SB.PCI0.ISA.SNC, 0xBA)
                                                }

                                                If (And (Local2, 0x80))
                                                {
                                                    If (And (Local0, 0x80))
                                                    {
                                                        Notify (\_SB.PCI0.ISA.SNC, 0xB7)
                                                        Store (Zero, LID)
                                                    }
                                                    Else
                                                    {
                                                        Notify (\_SB.PCI0.ISA.SNC, 0xB9)
                                                        Store (One, LID)
                                                    }
                                                }
                                            }
                                            Else
                                            {
                                                If (LEqual (Arg0, 0x58))
                                                {
                                                    EXCD (0x1F)
                                                    Notify (\_SB.PCI0.ISA.SNC, 0xA4)
                                                }
                                                Else
                                                {
                                                    If (LEqual (Arg0, 0x59))
                                                    {
                                                        EXCD (0x1F)
                                                        Notify (\_SB.PCI0.ISA.SNC, 0xA5)
                                                    }
                                                    Else
                                                    {
                                                        If (LEqual (Arg0, 0x5A))
                                                        {
                                                            If (LEqual (LCDT, Ones))
                                                            {
                                                                Store (PHSB (0xEE, 0x00), LCDT)
                                                            }

                                                            If (LEqual (LCDT, 0x00))
                                                            {
                                                                EXCD (0x1F)
                                                                Notify (\_SB.PCI0.ISA.SNC, 0xA6)
                                                            }
                                                        }
                                                        Else
                                                        {
                                                            If (LEqual (Arg0, 0x5B))
                                                            {
                                                                Notify (\_SB.PCI0.ISA.SNC, 0xB6)
                                                            }
                                                            Else
                                                            {
                                                                If (LEqual (Arg0, 0x5F))
                                                                {
                                                                    Notify (\_SB.PCI0.ISA.SNC, 0xAD)
                                                                }
                                                                Else
                                                                {
                                                                    If (LEqual (Arg0, 0x61))
                                                                    {
                                                                        Notify (\_SB.PCI0.ISA.SNC, 0xB1)
                                                                    }
                                                                    Else
                                                                    {
                                                                        If (LEqual (Arg0, 0x64))
                                                                        {
                                                                            Notify (\_SB.PCI0.ISA.SNC, 0xB0)
                                                                        }
                                                                        Else
                                                                        {
                                                                            If (LEqual (Arg0, 0x65))
                                                                            {
                                                                                EXCD (0x21)
                                                                                Notify (\_SB.PCI0.ISA.SNC, 0xB4)
                                                                            }
                                                                            Else
                                                                            {
                                                                                If (LEqual (Arg0, 0x66))
                                                                                {
                                                                                    EXCD (0x21)
                                                                                    Notify (\_SB.PCI0.ISA.SNC, 0xB5)
                                                                                }
                                                                                Else
                                                                                {
                                                                                    If (LEqual (Arg0, 0x67)) {}
                                                                                    Else
                                                                                    {
                                                                                        If (LEqual (Arg0, 0x68))
                                                                                        {
                                                                                            Notify (\_SB.PCI0.ISA.SNC, 0xB8)
                                                                                        }
                                                                                        Else
                                                                                        {
                                                                                            If (LEqual (Arg0, 0x76))
                                                                                            {
                                                                                                Store (Zero, \_SB.PCI0.ISA.SNC.PPST)
                                                                                                Notify (\_SB.PWRB, 0x80)
                                                                                            }
                                                                                            Else
                                                                                            {
                                                                                                If (LEqual (Arg0, 0x78))
                                                                                                {
                                                                                                    Notify (\_SB.PCI0.ISA.SNC, 0x90)
                                                                                                }
                                                                                                Else
                                                                                                {
                                                                                                    If (LEqual (Arg0, 0x79))
                                                                                                    {
                                                                                                        EXCD (0x20)
                                                                                                        Notify (\_SB.PCI0.ISA.SNC, 0xBB)
                                                                                                    }
                                                                                                    Else
                                                                                                    {
                                                                                                        If (LEqual (Arg0, 0x80))
                                                                                                        {
                                                                                                            Notify (\_TZ.ATF0, 0x80)
                                                                                                        }
                                                                                                        Else
                                                                                                        {
                                                                                                            If (LEqual (Arg0, 0x81))
                                                                                                            {
                                                                                                                Notify (\_TZ.ATF0, 0x81)
                                                                                                            }
                                                                                                            Else
                                                                                                            {
                                                                                                                Add (Arg0, 0x30, Local0)
                                                                                                                PHS (Local0)
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    Mutex (MEEC, 0x00)
                    Method (EXCD, 1, NotSerialized)
                    {
                        Store ("Notify State to EC", Debug)
                        Acquire (MEEC, 0xFFFF)
                        WIBE ()
                        WRMB (0x84, Arg0)
                        WRMB (0x82, 0x87)
                        WOBF ()
                        And (RDMB (0x86), 0xFD, Local0)
                        WRMB (0x86, Local0)
                        Release (MEEC)
                    }

                    Method (EXRD, 1, NotSerialized)
                    {
                        Store ("extended command to EC", Debug)
                        Acquire (MEEC, 0xFFFF)
                        WIBE ()
                        WRMB (0x84, Arg0)
                        WRMB (0x82, 0x87)
                        WOBF ()
                        Add (Multiply (RDMB (0x84), 0x0100, Local0), Store (RDMB (0x83), Local1), Local2)
                        And (RDMB (0x86), 0xFD, Local0)
                        WRMB (0x86, Local0)
                        Release (MEEC)
                        Return (Local2)
                    }

                    Method (EXWT, 2, NotSerialized)
                    {
                        Store ("extended write command to EC", Debug)
                        Acquire (MEEC, 0xFFFF)
                        WIBE ()
                        WRMB (0x84, Arg0)
                        WRMB (0x85, Arg1)
                        WRMB (0x82, 0x87)
                        WOBF ()
                        And (RDMB (0x86), 0xFD, Local0)
                        WRMB (0x86, Local0)
                        Release (MEEC)
                    }

                    Method (PPK, 0, NotSerialized)
                    {
                        Store ("PPK_STATUS", Debug)
                        Store (RDMB (0x8C), Local1)
                        If (LEqual (And (Local1, 0x02, Local0), 0x02))
                        {
                            Store (One, Local0)
                        }
                        Else
                        {
                            If (LEqual (And (Local1, 0x04, Local0), 0x04))
                            {
                                Store (0x02, Local0)
                            }
                            Else
                            {
                                If (LEqual (And (Local1, 0x08, Local0), 0x08))
                                {
                                    Store (0x03, Local0)
                                }
                                Else
                                {
                                    If (LEqual (And (Local1, 0x20, Local0), 0x20))
                                    {
                                        Store (0x10, Local0)
                                    }
                                    Else
                                    {
                                        Store (Zero, Local0)
                                    }
                                }
                            }
                        }

                        Return (Local0)
                    }

                    Device (BAT1)
                    {
                        Name (_HID, EisaId ("PNP0C0A"))
                        Name (_UID, 0x01)
                        Name (_PCL, Package (0x01)
                        {
                            \_SB
                        })
                        Name (BATI, Package (0x0D)
                        {
                            0x00, 
                            0xFFFFFFFF, 
                            0xFFFFFFFF, 
                            0x00, 
                            0x39D0, 
                            0x00, 
                            0x78, 
                            0x00, 
                            0x0A, 
                            "", 
                            "", 
                            "LION", 
                            "Sony Corp."
                        })
                        Name (BATS, Package (0x04)
                        {
                            0x02, 
                            0xFFFFFFFF, 
                            0x0D7A, 
                            0x3840
                        })
                        Method (_STA, 0, NotSerialized)
                        {
                            Store ("BAT1 _STA", Debug)
                            If (And (RDMB (0x8F), 0x01))
                            {
                                Store (0x0F, Local0)
                            }
                            Else
                            {
                                Store (0x1F, Local0)
                            }

                            Store (Local0, Debug)
                            Return (Local0)
                        }

                        Method (_BIF, 0, NotSerialized)
                        {
                            Store ("BAT1 _BIF", Debug)
                            If (And (RDMB (0x8F), 0x01)) {}
                            Else
                            {
                                Multiply (EXRD (0x31), 0x0A, Local0)
                                Store (Local0, Index (BATI, 0x01))
                                Store (Local0, Index (BATI, 0x02))
                            }

                            Return (BATI)
                        }

                        Method (_BST, 0, NotSerialized)
                        {
                            Store ("BAT1 _BST", Debug)
                            Store (EXRD (0x0C), Index (BATS, 0x00))
                            Store (EXRD (0x0D), Index (BATS, 0x01))
                            Multiply (EXRD (0x0E), 0x0A, Index (BATS, 0x02))
                            Store (EXRD (0x0F), Index (BATS, 0x03))
                            Return (BATS)
                        }
                    }

                    Device (ACAD)
                    {
                        Name (_HID, "ACPI0003")
                        Name (_PCL, Package (0x01)
                        {
                            \_SB
                        })
                        Method (_PSR, 0, NotSerialized)
                        {
                            Store (RDMB (0x8F), Local0)
                            If (And (Local0, 0x20))
                            {
                                Return (0x00)
                            }

                            Return (0x01)
                        }

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

                Device (COMA)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x01)
                    Name (MCD, 0x10)
                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PSCS (0x10))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSSS (0x10, Arg0)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (PSPS (0x10))
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        PSDI (0x10)
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (PSST (0x10))
                    }

                    Method (_PS0, 0, NotSerialized)
                    {
                        Store (One, GO30)
                        Store (0x00, _PSC)
                    }

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

                    Name (_PSC, 0x00)
                }

                Device (FIR)
                {
                    Name (_HID, EisaId ("SMCF010"))
                    Name (_CID, 0x1005D041)
                    Name (_UID, 0x02)
                    Name (MCD, 0x13)
                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PSCS (0x13))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSSS (0x13, Arg0)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (PSPS (0x13))
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        PSDI (0x13)
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (PSST (0x13))
                    }

                    Method (_PS0, 0, NotSerialized)
                    {
                        \_SB.PCI0.ISA.EC.EXWT (0x2A, One)
                        Store (0x00, _PSC)
                    }

                    Method (_PS3, 0, NotSerialized)
                    {
                        \_SB.PCI0.ISA.EC.EXWT (0x2A, Zero)
                        Store (0x03, _PSC)
                    }

                    Name (_PSC, 0x00)
                }

                Device (LPTA)
                {
                    Name (_HID, EisaId ("PNP0400"))
                    Name (_UID, 0x01)
                    Name (MCD, 0x0D)
                    Method (B_CR, 0, NotSerialized)
                    {
                        Return (PSCS (0x0D))
                    }

                    Method (B_SR, 1, NotSerialized)
                    {
                        PSSS (0x0D, Arg0)
                    }

                    Method (B_PR, 0, NotSerialized)
                    {
                        Return (PSPS (0x0D))
                    }

                    Method (B_DI, 0, NotSerialized)
                    {
                        PSDI (0x0D)
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (PSST (0x0D))
                    }

                    Name (_PSC, 0x00)
                }

                Device (LPTB)
                {
                    Name (_HID, EisaId ("PNP0400"))
                    Name (_UID, 0x02)
                    Name (MCD, 0x0E)
                    Method (B_CR, 0, NotSerialized)
                    {
                        Return (PSCS (0x0E))
                    }

                    Method (B_SR, 1, NotSerialized)
                    {
                        PSSS (0x0E, Arg0)
                    }

                    Method (B_PR, 0, NotSerialized)
                    {
                        Return (PSPS (0x0E))
                    }

                    Method (B_DI, 0, NotSerialized)
                    {
                        PSDI (0x0E)
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (PSST (0x0E))
                    }

                    Name (_PSC, 0x00)
                }

                Device (ECP)
                {
                    Name (_HID, EisaId ("PNP0401"))
                    Name (MCD, 0x0F)
                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (PSCS (0x0F))
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        PSSS (0x0F, Arg0)
                    }

                    Method (_PRS, 0, NotSerialized)
                    {
                        Return (PSPS (0x0F))
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        PSDI (0x0F)
                    }

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

                    Name (_PSC, 0x00)
                }

                Device (FDC)
                {
                    Name (_HID, EisaId ("PNP0700"))
                    Name (MCD, 0x0C)
                    Method (B_CR, 0, NotSerialized)
                    {
                        Return (PSCS (0x0C))
                    }

                    Method (B_SR, 1, NotSerialized)
                    {
                        PSSS (0x0C, Arg0)
                    }

                    Method (B_PR, 0, NotSerialized)
                    {
                        Return (PSPS (0x0C))
                    }

                    Method (B_DI, 0, NotSerialized)
                    {
                        PSDI (0x0C)
                    }

                    Method (_STA, 0, NotSerialized)
                    {
                        Return (PSST (0x0C))
                    }

                    Name (_PSC, 0x00)
                }

                Device (SNC)
                {
                    Name (_HID, EisaId ("SNY5001"))
                    Name (PPST, 0x00)
                    Method (PWAK, 0, NotSerialized)
                    {
                        Store (\_SB.PCI0.ISA.EC.PPK (), Local0)
                        Store (Local0, PPST)
                        \_SB.PCI0.ISA.EC.EXCD (0x1C)
                        Return (PPST)
                    }

                    Method (STCS, 1, NotSerialized)
                    {
                        \_SB.PCI0.ISA.EC.EXWT (0x0B, Arg0)
                        Notify (\_TZ.ATF0, 0x81)
                    }

                    Method (GBRT, 0, NotSerialized)
                    {
                        Return (PHSB (0xE6, 0x00))
                    }

                    Method (SBRT, 1, NotSerialized)
                    {
                        Store (PHSB (0xE7, Arg0), Local0)
                        \_SB.PCI0.ISA.EC.EXWT (0x24, Local0)
                    }

                    Method (SPBR, 1, NotSerialized)
                    {
                        PHSB (0xE8, Arg0)
                    }

                    Method (GCTR, 0, NotSerialized)
                    {
                        Return (PHSB (0xE9, 0x00))
                    }

                    Method (SCTR, 1, NotSerialized)
                    {
                        Store (PHSB (0xEA, Arg0), Local0)
                        \_SB.PCI0.ISA.EC.EXWT (0x23, Local0)
                    }

                    Method (SPCR, 1, NotSerialized)
                    {
                        PHSB (0xEB, Arg0)
                    }

                    Method (GMGB, 0, NotSerialized)
                    {
                        PHS (0xF3)
                        Return (INFB)
                    }

                    Method (CMGB, 1, NotSerialized)
                    {
                        If (Arg0)
                        {
                            Store (Zero, GO23)
                        }
                        Else
                        {
                            Store (One, GO23)
                        }
                    }

                    Method (SMGB, 1, NotSerialized)
                    {
                        Store (Arg0, INFB)
                        PHS (0xF4)
                    }

                    Method (GPKC, 0, NotSerialized)
                    {
                        PHS (0xF5)
                        Return (INFB)
                    }

                    Method (SPKC, 1, NotSerialized)
                    {
                        Store (Arg0, INFB)
                        PHS (0xF6)
                        \_SB.PCI0.ISA.EC.EXWT (0x25, Arg0)
                        \_SB.PCI0.ISA.EC.EXCD (0x1C)
                    }

                    Method (GPLR, 0, NotSerialized)
                    {
                        PHS (0xF7)
                        Return (INFB)
                    }

                    Method (SPLR, 1, NotSerialized)
                    {
                        Store (Arg0, INFB)
                        PHS (0xF8)
                        \_SB.PCI0.ISA.EC.EXWT (0x26, Arg0)
                        \_SB.PCI0.ISA.EC.EXCD (0x1C)
                    }

                    Method (GILS, 0, NotSerialized)
                    {
                        Return (\_SB.PCI0.ISA.EC.EXRD (0x28))
                    }

                    Method (SILS, 1, NotSerialized)
                    {
                        \_SB.PCI0.ISA.EC.EXWT (0x27, Arg0)
                    }

                    Method (GLID, 0, NotSerialized)
                    {
                        Return (\_SB.PCI0.ISA.EC.LID)
                    }

                    Method (SLBH, 1, NotSerialized)
                    {
                        \_SB.PCI0.ISA.EC.EXWT (0x2B, Arg0)
                    }

                    Method (PWRN, 0, NotSerialized)
                    {
                        Notify (\_SB.PWRB, 0x80)
                    }

                    Method (CSXB, 1, NotSerialized)
                    {
                        Acquire (MPHS, 0xFFFF)
                        Store (Arg0, SXBF)
                        PHS0 (0xFA)
                        Store (SXBF, Local0)
                        Release (MPHS)
                        Return (Local0)
                    }
                }
            }
        }
    }

    Scope (\_SI)
    {
        Method (_SST, 1, NotSerialized)
        {
            If (LEqual (Arg0, 0x00)) {}
            If (LEqual (Arg0, 0x01)) {}
            If (LEqual (Arg0, 0x02)) {}
            If (LEqual (Arg0, 0x03)) {}
            If (LEqual (Arg0, 0x04)) {}
            If (LEqual (Arg0, 0x05)) {}
        }
    }

    Method (_WAK, 1, NotSerialized)
    {
        If (LEqual (SCMP (\_OS, "Microsoft Windows"), Zero))
        {
            Notify (\_SB.PWRB, 0x02)
        }

        Return (Zero)
    }

    Scope (\_TZ)
    {
        Method (KELV, 1, NotSerialized)
        {
            Store ("Converted Kelvin", Debug)
            Store (Arg0, Local0)
            Multiply (Local0, 0x0A, Local0)
            Add (Local0, 0x0AAB, Local0)
            Return (Local0)
        }

        ThermalZone (ATF0)
        {
            Method (_TMP, 0, NotSerialized)
            {
                Store ("Get ATF0 Tempareture", Debug)
                Return (KELV (\_SB.PCI0.ISA.EC.EXRD (0x02)))
            }

            Method (_PSV, 0, NotSerialized)
            {
                Store ("Get ATF0 Passive Trip point", Debug)
                Return (KELV (\_SB.PCI0.ISA.EC.EXRD (0x18)))
            }

            Name (_PSL, Package (0x01)
            {
                \_PR.CPU0
            })
            Method (_CRT, 0, NotSerialized)
            {
                Store ("Get ATF0 Critical Trip point", Debug)
                Return (KELV (\_SB.PCI0.ISA.EC.EXRD (0x19)))
            }

            Method (_SCP, 1, NotSerialized)
            {
                \_SB.PCI0.ISA.EC.EXWT (0x0B, Arg0)
            }

            Name (_TC1, 0x01)
            Name (_TC2, 0x01)
            Name (_TSP, 0x64)
        }
    }

    Scope (_SB)
    {
        Name (IRQP, Package (0x10)
        {
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x0200, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00, 
            0x00
        })
        Device (LNKA)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x01)
            Name (_PRS, Buffer (0x06)
            {
                0x23, 0x00, 0x02, 0x18, 0x79, 0x00
            })
            Method (_DIS, 0, NotSerialized)
            {
                Or (\_SB.PCI0.ISA.PIRA, 0x80, \_SB.PCI0.ISA.PIRA)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Name (BUFA, Buffer (0x06)
                {
                    0x23, 0x00, 0x00, 0x18, 0x79, 0x00
                })
                CreateWordField (BUFA, 0x01, IRA1)
                And (\_SB.PCI0.ISA.PIRA, 0x8F, Local0)
                If (LLess (Local0, 0x80))
                {
                    And (Local0, 0x0F, Local0)
                    Store (DerefOf (Index (IRQP, Local0)), Local4)
                    Store (Local4, IRA1)
                }

                Return (BUFA)
            }

            Method (_SRS, 1, NotSerialized)
            {
                CreateWordField (Arg0, 0x01, IRA1)
                Store (IRA1, Local0)
                Store (Match (IRQP, MEQ, Local0, MTR, 0x00, 0x00), Local1)
                And (\_SB.PCI0.ISA.PIRA, 0x70, Local0)
                Or (Local1, Local0, \_SB.PCI0.ISA.PIRA)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (LEqual (\_SB.PCI0.ISA.PIRA, 0x80))
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }
        }

        Device (LNKB)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x02)
            Name (_PRS, Buffer (0x06)
            {
                0x23, 0x00, 0x02, 0x18, 0x79, 0x00
            })
            Method (_DIS, 0, NotSerialized)
            {
                Or (\_SB.PCI0.ISA.PIRB, 0x80, \_SB.PCI0.ISA.PIRB)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Name (BUFA, Buffer (0x06)
                {
                    0x23, 0x00, 0x00, 0x18, 0x79, 0x00
                })
                CreateWordField (BUFA, 0x01, IRA1)
                And (\_SB.PCI0.ISA.PIRB, 0x8F, Local0)
                If (LLess (Local0, 0x80))
                {
                    And (Local0, 0x0F, Local0)
                    Store (DerefOf (Index (IRQP, Local0)), Local4)
                    Store (Local4, IRA1)
                }

                Return (BUFA)
            }

            Method (_SRS, 1, NotSerialized)
            {
                CreateWordField (Arg0, 0x01, IRA1)
                Store (IRA1, Local0)
                Store (Match (IRQP, MEQ, Local0, MTR, 0x00, 0x00), Local1)
                And (\_SB.PCI0.ISA.PIRB, 0x70, Local0)
                Or (Local1, Local0, \_SB.PCI0.ISA.PIRB)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (LEqual (\_SB.PCI0.ISA.PIRB, 0x80))
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }
        }

        Device (LNKC)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x03)
            Name (_PRS, Buffer (0x06)
            {
                0x23, 0x00, 0x02, 0x18, 0x79, 0x00
            })
            Method (_DIS, 0, NotSerialized)
            {
                Or (\_SB.PCI0.ISA.PIRC, 0x80, \_SB.PCI0.ISA.PIRC)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Name (BUFA, Buffer (0x06)
                {
                    0x23, 0x00, 0x00, 0x18, 0x79, 0x00
                })
                CreateWordField (BUFA, 0x01, IRA1)
                And (\_SB.PCI0.ISA.PIRC, 0x8F, Local0)
                If (LLess (Local0, 0x80))
                {
                    And (Local0, 0x0F, Local0)
                    Store (DerefOf (Index (IRQP, Local0)), Local4)
                    Store (Local4, IRA1)
                }

                Return (BUFA)
            }

            Method (_SRS, 1, NotSerialized)
            {
                CreateWordField (Arg0, 0x01, IRA1)
                Store (IRA1, Local0)
                Store (Match (IRQP, MEQ, Local0, MTR, 0x00, 0x00), Local1)
                And (\_SB.PCI0.ISA.PIRC, 0x70, Local0)
                Or (Local1, Local0, \_SB.PCI0.ISA.PIRC)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (LEqual (\_SB.PCI0.ISA.PIRC, 0x80))
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }
        }

        Device (LNKD)
        {
            Name (_HID, EisaId ("PNP0C0F"))
            Name (_UID, 0x04)
            Name (_PRS, Buffer (0x06)
            {
                0x23, 0x00, 0x02, 0x18, 0x79, 0x00
            })
            Method (_DIS, 0, NotSerialized)
            {
                Or (\_SB.PCI0.ISA.PIRD, 0x80, \_SB.PCI0.ISA.PIRD)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Name (BUFA, Buffer (0x06)
                {
                    0x23, 0x00, 0x00, 0x18, 0x79, 0x00
                })
                CreateWordField (BUFA, 0x01, IRA1)
                And (\_SB.PCI0.ISA.PIRD, 0x8F, Local0)
                If (LLess (Local0, 0x80))
                {
                    And (Local0, 0x0F, Local0)
                    Store (DerefOf (Index (IRQP, Local0)), Local4)
                    Store (Local4, IRA1)
                }

                Return (BUFA)
            }

            Method (_SRS, 1, NotSerialized)
            {
                CreateWordField (Arg0, 0x01, IRA1)
                Store (IRA1, Local0)
                Store (Match (IRQP, MEQ, Local0, MTR, 0x00, 0x00), Local1)
                And (\_SB.PCI0.ISA.PIRD, 0x70, Local0)
                Or (Local1, Local0, \_SB.PCI0.ISA.PIRD)
            }

            Method (_STA, 0, NotSerialized)
            {
                If (LEqual (\_SB.PCI0.ISA.PIRD, 0x80))
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }
        }
    }
}

Received on Thu Dec 04 2003 - 00:27:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC