Re: 5.3-BETA3 and up acpi fails with ABIT BH-6 motherboard

From: Mateusz Jędrasik <imachine_at_toya.net.pl>
Date: Mon, 18 Oct 2004 11:03:01 +0200
W li¶cie z Pi±, 24-09-2004, godz. 17:16, None pisze: 
> hello,
> 
> since BETA3 of 5.3 enabling acpi hard locks my machine on boot.
> 
> here is the exact message jotted down on paper from the boot screen:
> 
> 
> Fatal trap 12:		page fault while in kernel mode
> 
> fault virtual address	=	0x24
> fault code 		=	supervisor read, page not present
> instruction provider	=	0x8:0xc04e35d6
> stack pointer		=	0x10:0xc0c2198c
> frame pointer		=	0x10:0xc0c2198c
> code segment		=	base 0x0, limit 0xfffff, type 0x1b /or 0x16/
> 			=	DPL 0, pres 1, def32 1, gran 1
> processor eflags	=	interrupt enabled, resume, IOPL:0
> current process		=	0 (swapper)
> trap number		=	12
> 
> panic: page fault
> 
> Uptime <some random bullshit here, 1s say>
> 
> shutting down ACPI
> 
> 
> i attach my dmesg without acpi on beta5 /its broken since beta3, i
> unfrotunately have no longer sources for beta2 so cannot reproduce any
> messages/, and also i attach some info here from the dmesg with acpi
> enabled on beta5 - mainly the acpi0 info from it.
> 
> it reads:
> 
> acpi0: <ABIT AWRDACPI>
> acpi0: reservation at f00000, 40000 (3) failed
> acpi0: reservation at f00000, 7ef0000 (3) failed
> 
> the second value im not too sure on <the 7ef0000> cuz it scrolls really
> fast - i videocammed the boot process :D and still searched it but i
> cannot really read clearly the info of the small screen on the camera,
> its a really oldskool one :]
> 
> cheers i hope it helps solving some problems :]]
> 
> //imachine

I also would like to mention that I have done an acpidump (acpidump -t
-d).

I attach it with this reply to my post.

I hope maybe someone reads this as the acpi issue is terrible. I am
willing to provide any information regarding this. BTW, i now run -BETA7
and the error persists.

cheers,

//Mateusz aka imachine.

/*
  RSD PTR: OEM=ABIT, ACPI_Rev=1.0x (0)
	RSDT=0x07ff3000, cksum=75
 */
/*
  RSDT: Length=40, Revision=1, Checksum=122,
	OEMID=ABIT, OEM Table ID=AWRDACPI, OEM Revision=0x42302e31,
	Creator ID=AWRD, Creator Revision=0x0
	Entries={ 0x07ff3040 }
 */
/*
  FACP: Length=116, Revision=1, Checksum=52,
	OEMID=ABIT, OEM Table ID=AWRDACPI, OEM Revision=0x42302e31,
	Creator ID=AWRD, Creator Revision=0x0
 	FACS=0x7ff0000, DSDT=0x7ff30c0
	INT_MODEL=PIC
	Preferred_PM_Profile=Unspecified (0)
	SCI_INT=9
	SMI_CMD=0xb2, ACPI_ENABLE=0xa1, ACPI_DISABLE=0xa0, S4BIOS_REQ=0xa4
	PSTATE_CNT=0x0
	PM1a_EVT_BLK=0x4000-0x4003
	PM1a_CNT_BLK=0x4040-0x4041
	PM_TMR_BLK=0x4008-0x400b
	GPE0_BLK=0x400c-0x400f
	P_LVL2_LAT=90 us, P_LVL3_LAT=900 us
	FLUSH_SIZE=0, FLUSH_STRIDE=0
	DUTY_OFFSET=1, DUTY_WIDTH=1
	DAY_ALRM=13, MON_ALRM=0, CENTURY=0
	IAPC_BOOT_ARCH=
	Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4}
 */
/*
  FACS:	Length=64, HwSig=0x00000000, Firm_Wake_Vec=0x00000000
	Global_Lock=
	Flags=S4BIOS
	Version=0
 */
/*
  DSDT: Length=7781, Revision=1, Checksum=174,
	OEMID=ABIT, OEM Table ID=AWRDACPI, OEM Revision=0x1000,
	Creator ID=MSFT, Creator Revision=0x100000c
 */
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20040527
 *
 * Disassembly of /tmp/acpidump.kBZlok, Mon Oct 18 10:33:36 2004
 */
DefinitionBlock ("DSDT.aml", "DSDT", 1, "ABIT  ", "AWRDACPI", 4096)
{
    Scope (\_PR)
    {
        Processor (\_PR.CPU0, 0x01, 0x00004010, 0x06) {}
    }

    Name (\_S0, Package (0x04)
    {
        0x05, 
        0x05, 
        0x05, 
        0x05
    })
    Name (\_S1, Package (0x04)
    {
        0x04, 
        0x04, 
        0x04, 
        0x04
    })
    Name (\_S4, Package (0x04)
    {
        Zero, 
        Zero, 
        Zero, 
        Zero
    })
    Name (\_S5, Package (0x04)
    {
        Zero, 
        Zero, 
        Zero, 
        Zero
    })
    OperationRegion (\DEBG, SystemIO, 0x80, 0x01)
    Field (\DEBG, ByteAcc, NoLock, Preserve)
    {
        DBG1,   8
    }

    OperationRegion (EXTM, SystemMemory, 0x000FF830, 0x10)
    Field (EXTM, WordAcc, NoLock, Preserve)
    {
        ROM1,   16, 
        RMS1,   16, 
        ROM2,   16, 
        RMS2,   16, 
        ROM3,   16, 
        RMS3,   16, 
        AMEM,   32
    }

    OperationRegion (VGAM, SystemMemory, 0x000C0002, 0x01)
    Field (VGAM, ByteAcc, NoLock, Preserve)
    {
        VGA1,   8
    }

    OperationRegion (\SMIC, SystemIO, 0xB2, 0x01)
    Field (\SMIC, ByteAcc, NoLock, Preserve)
    {
        SCP,    8
    }

    OperationRegion (\TRAP, SystemIO, 0x402F, 0x01)
    Field (\TRAP, ByteAcc, NoLock, Preserve)
    {
            ,   1, 
        TR13,   1
    }

    OperationRegion (\GBLE, SystemIO, 0x4021, 0x01)
    Field (\GBLE, ByteAcc, NoLock, Preserve)
    {
        ESMI,   8
    }

    Name (CMDB, Buffer (0x08) {})
    CreateByteField (CMDB, 0x00, BYT0)
    CreateByteField (CMDB, 0x01, BYT1)
    CreateByteField (CMDB, 0x02, BYT2)
    CreateByteField (CMDB, 0x03, BYT3)
    CreateByteField (CMDB, 0x04, BYT4)
    CreateByteField (CMDB, 0x05, BYT5)
    CreateByteField (CMDB, 0x06, BYT6)
    CreateByteField (CMDB, 0x07, BYT7)
    Name (IDEB, Buffer (0x38) {})
    CreateField (IDEB, 0x00, 0x38, CMD0)
    CreateField (IDEB, 0x38, 0x38, CMD1)
    CreateField (IDEB, 0x70, 0x38, CMD2)
    CreateField (IDEB, 0xA8, 0x38, CMD3)
    CreateField (IDEB, 0xE0, 0x38, CMD4)
    CreateField (IDEB, 0x0118, 0x38, CMD5)
    CreateField (IDEB, 0x0150, 0x38, CMD6)
    CreateField (IDEB, 0x0188, 0x38, CMD7)
    OperationRegion (APMP, SystemIO, 0xB2, 0x02)
    Field (APMP, ByteAcc, NoLock, Preserve)
    {
        APMC,   8, 
        APMD,   8
    }

    OperationRegion (ELCR, SystemIO, 0x04D0, 0x02)
    Field (ELCR, ByteAcc, NoLock, Preserve)
    {
        ELC1,   8, 
        ELC2,   8
    }

    OperationRegion (GPOB, SystemIO, 0x4034, 0x04)
    Field (GPOB, ByteAcc, NoLock, Preserve)
    {
        GP00,   1, 
        GP01,   1, 
        GP02,   1, 
        GP03,   1, 
        GP04,   1, 
        GP05,   1, 
        GP06,   1, 
        GP07,   1, 
        GP08,   1, 
        GP09,   1, 
        GP0A,   1, 
        GP0B,   1, 
        GP0C,   1, 
        GP0D,   1, 
        GP0E,   1, 
        GP0F,   1, 
        GP10,   1, 
        GP11,   1, 
        GP12,   1, 
        GP13,   1, 
        GP14,   1, 
        GP15,   1, 
        GP16,   1, 
        GP17,   1, 
        GP18,   1, 
        GP19,   1, 
        GP1A,   1, 
        GP1B,   1, 
        GP1C,   1, 
        GP1D,   1, 
        GP1E,   1, 
        GP1F,   1
    }

    Name (OSFL, 0x01)
    Method (STRC, 2, NotSerialized)
    {
        If (LNot (LEqual (SizeOf (Arg0), SizeOf (Arg1))))
        {
            Return (0x00)
        }

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

        Return (One)
    }

    OperationRegion (RTCM, SystemIO, 0x70, 0x02)
    Field (RTCM, ByteAcc, NoLock, Preserve)
    {
        CMIN,   8, 
        CMDA,   8
    }

    IndexField (CMIN, CMDA, ByteAcc, NoLock, Preserve)
    {
        Offset (0x0F), 
        SHUT,   8
    }

    OperationRegion (\GRAM, SystemMemory, 0x0400, 0x0100)
    Field (\GRAM, ByteAcc, NoLock, Preserve)
    {
        Offset (0x10), 
        FLG0,   8, 
        Offset (0xBA), 
        SFLG,   8
    }

    OperationRegion (INFO, SystemMemory, 0x000FF840, 0x01)
    Field (INFO, ByteAcc, NoLock, Preserve)
    {
        KBDI,   1, 
        RTCW,   1, 
        PS2F,   1, 
        IRFL,   2, 
        DISE,   1, 
        SSHU,   1
    }

    OperationRegion (BEEP, SystemIO, 0x61, 0x01)
    Field (BEEP, ByteAcc, NoLock, Preserve)
    {
        S1B,    8
    }

    OperationRegion (CONT, SystemIO, 0x40, 0x04)
    Field (CONT, ByteAcc, NoLock, Preserve)
    {
        CNT0,   8, 
        CNT1,   8, 
        CNT2,   8, 
        CTRL,   8
    }

    Method (SPKR, 1, NotSerialized)
    {
        Store (S1B, Local0)
        Store (0xB6, CTRL)
        Store (0x55, CNT2)
        Store (0x03, CNT2)
        Store (Arg0, Local2)
        While (LGreater (Local2, 0x00))
        {
            Or (S1B, 0x03, S1B)
            Store (0x5FFF, Local3)
            While (LGreater (Local3, 0x00))
            {
                Decrement (Local3)
            }

            And (S1B, 0xFC, S1B)
            Store (0x0EFF, Local3)
            While (LGreater (Local3, 0x00))
            {
                Decrement (Local3)
            }

            Decrement (Local2)
        }

        Store (Local0, S1B)
    }

    Method (\_PTS, 1, NotSerialized)
    {
        If (LEqual (Arg0, 0x05))
        {
            Store (ESMI, Local0)
            And (Local0, 0xFB, Local0)
            Store (Local0, ESMI)
            Store (One, TR13)
        }

        If (LEqual (Arg0, 0x01))
        {
            Store (One, TR13)
            Store (Zero, GP1B)
        }

        If (LEqual (Arg0, 0x02))
        {
            Store (One, TR13)
        }

        Or (Arg0, 0xF0, Local0)
        Store (Local0, DBG1)
        Store (Zero, GP00)
        If (LEqual (Arg0, 0x04)) {}
        If (LEqual (Arg0, 0x05))
        {
            Store (One, GP00)
        }
    }

    Method (\_WAK, 1, NotSerialized)
    {
        Store (0xFF, DBG1)
        Store (One, GP1B)
        Store (One, GP00)
        If (LEqual (RTCW, 0x00))
        {
            Notify (\_SB.PWRB, 0x02)
        }
    }

    Scope (\_SI)
    {
        Method (_MSG, 1, NotSerialized)
        {
            Store (Local0, Local0)
        }

        Method (_SST, 1, NotSerialized)
        {
            If (LEqual (Arg0, 0x00))
            {
                Store (One, GP1B)
            }

            If (LEqual (Arg0, 0x01))
            {
                Store (One, GP1B)
            }

            If (LEqual (Arg0, 0x03))
            {
                Store (Zero, GP1B)
            }

            If (LEqual (Arg0, 0x03)) {}
            If (LEqual (Arg0, 0x01)) {}
            If (LEqual (Arg0, 0x00)) {}
            Store (Local0, Local0)
        }
    }

    Scope (\_GPE)
    {
    }

    Scope (\_SB)
    {
        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C"))
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0B)
            }
        }

        Device (MEM)
        {
            Name (_HID, EisaId ("PNP0C01"))
            Method (_CRS, 0, NotSerialized)
            {
                Name (BUF0, ResourceTemplate ()
                {
                    Memory32Fixed (ReadWrite, 0x000F0000, 0x00004000)
                    Memory32Fixed (ReadWrite, 0x000F4000, 0x00004000)
                    Memory32Fixed (ReadWrite, 0x000F8000, 0x00004000)
                    Memory32Fixed (ReadWrite, 0x000FC000, 0x00004000)
                    Memory32Fixed (ReadWrite, 0x00000000, 0x00010000)
                    Memory32Fixed (ReadWrite, 0xFFFF0000, 0x00010000)
                    Memory32Fixed (ReadWrite, 0x00000000, 0x000A0000)
                    Memory32Fixed (ReadWrite, 0x00100000, 0x00000000)
                })
                CreateDWordField (BUF0, 0x34, ACMM)
                CreateDWordField (BUF0, 0x04, RMA1)
                CreateDWordField (BUF0, 0x08, RSS1)
                CreateDWordField (BUF0, 0x10, RMA2)
                CreateDWordField (BUF0, 0x14, RSS2)
                CreateDWordField (BUF0, 0x1C, RMA3)
                CreateDWordField (BUF0, 0x20, RSS3)
                CreateDWordField (BUF0, 0x28, RMA4)
                CreateDWordField (BUF0, 0x2C, RSS4)
                CreateDWordField (BUF0, 0x5C, EXTM)
                Subtract (AMEM, 0x00100000, EXTM)
                If (LNot (LEqual (ROM1, Zero)))
                {
                    Store (RMA1, RMA2)
                    ShiftLeft (ROM1, 0x08, Local0)
                    Store (Local0, RMA1)
                    ShiftLeft (RMS1, 0x08, Local0)
                    Store (Local0, RSS1)
                    Store (0x8000, RSS2)
                }

                If (LNot (LEqual (ROM2, Zero)))
                {
                    Store (RMA2, RMA3)
                    ShiftLeft (ROM2, 0x08, Local0)
                    Store (Local0, RMA2)
                    ShiftLeft (RMS2, 0x08, Local0)
                    Store (Local0, RSS2)
                    Store (0xC000, RSS3)
                }

                If (LNot (LEqual (ROM3, Zero)))
                {
                    Store (RMA3, RMA4)
                    ShiftLeft (ROM3, 0x08, Local0)
                    Store (Local0, RMA3)
                    ShiftLeft (RMS3, 0x08, Local0)
                    Store (Local0, RSS3)
                    Store (0x00010000, RSS4)
                }

                Store (AMEM, ACMM)
                Return (BUF0)
            }
        }

        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A03"))
            Name (_ADR, 0x00)
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }

            Method (_CRS, 0, NotSerialized)
            {
                Name (BUF0, ResourceTemplate ()
                {
                    WordBusNumber (ResourceConsumer, MinNotFixed, MaxNotFixed, PosDecode,
                        0x0000,
                        0x0000,
                        0x00FF,
                        0x0000,
                        0x0100)
                    IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,
                        0x0000,
                        0x0CF7,
                        0x0000,
                        0x0CF8)
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,
                        0x0D00,
                        0x3FFF,
                        0x0000,
                        0x3300)
                    IO (Decode16, 0x4000, 0x4000, 0x01, 0x42)
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,
                        0x4042,
                        0x4FFF,
                        0x0000,
                        0x0FBE)
                    IO (Decode16, 0x5000, 0x5000, 0x01, 0x10)
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,
                        0x5010,
                        0xFFFF,
                        0x0000,
                        0xAFF0)
                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                        0x00000000,
                        0x000A0000,
                        0x000C7FFF,
                        0x00000000,
                        0x00028000)
                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                        0x00000000,
                        0x00100000,
                        0xFFEFFFFF,
                        0x00000000,
                        0xFFF00000)
                })
                CreateDWordField (BUF0, 0x76, VMAX)
                CreateDWordField (BUF0, 0x7E, VLEN)
                ShiftLeft (VGA1, 0x09, Local0)
                Add (Local0, 0x000BFFFF, VMAX)
                Add (Local0, 0x00020000, VLEN)
                CreateDWordField (BUF0, 0x8C, TCMM)
                CreateDWordField (BUF0, 0x98, TOMM)
                Add (AMEM, 0x00010000, TCMM)
                Subtract (0xFFF00000, TCMM, TOMM)
                Return (BUF0)
            }

            Name (_PRT, Package (0x1C)
            {
                Package (0x04)
                {
                    0x000FFFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000FFFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000FFFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000FFFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000DFFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000DFFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000DFFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000DFFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000BFFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000BFFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000BFFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x000BFFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0009FFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0009FFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0009FFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0009FFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0011FFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0011FFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0011FFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0011FFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0007FFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0007FFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0007FFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0007FFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0001FFFF, 
                    0x00, 
                    \_SB.PCI0.ISA.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0001FFFF, 
                    0x01, 
                    \_SB.PCI0.ISA.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0001FFFF, 
                    0x02, 
                    \_SB.PCI0.ISA.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0001FFFF, 
                    0x03, 
                    \_SB.PCI0.ISA.LNKD, 
                    0x00
                }
            })
            Device (FAN0)
            {
                Name (_HID, EisaId ("PNP0C0B"))
            }

            Device (PX40)
            {
                Name (_ADR, 0x00070000)
                OperationRegion (PIRQ, PCI_Config, 0x60, 0x04)
                Scope (\)
                {
                    Field (\_SB.PCI0.PX40.PIRQ, ByteAcc, NoLock, Preserve)
                    {
                        PIRA,   8, 
                        PIRB,   8, 
                        PIRC,   8, 
                        PIRD,   8
                    }
                }
            }

            Device (USB0)
            {
                Name (_ADR, 0x00070002)
                Name (_PRW, Package (0x02)
                {
                    0x08, 
                    0x04
                })
            }

            Device (PX43)
            {
                Name (_ADR, 0x00070003)
            }

            Device (ISA)
            {
                Name (_ADR, 0x00070000)
                Method (_STA, 0, NotSerialized)
                {
                    Return (0x0B)
                }

                Name (BUFA, ResourceTemplate ()
                {
                    IRQ (Level, ActiveLow, Shared) {3,4,5,6,7,10,11,12,14,15}
                })
                Name (BUFB, ResourceTemplate ()
                {
                    IRQ (Level, ActiveLow, Shared) {}
                })
                CreateWordField (BUFB, 0x01, IRQV)
                Device (LNKA)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        And (PIRA, 0x80, Local0)
                        If (LEqual (Local0, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRA, 0x80, PIRA)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        And (PIRA, 0x0F, Local0)
                        ShiftLeft (0x01, Local0, IRQV)
                        Return (BUFB)
                    }

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

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

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

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRB, 0x80, PIRB)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        And (PIRB, 0x0F, Local0)
                        ShiftLeft (0x01, Local0, IRQV)
                        Return (BUFB)
                    }

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

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

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

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRC, 0x80, PIRC)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        And (PIRC, 0x0F, Local0)
                        ShiftLeft (0x01, Local0, IRQV)
                        Return (BUFB)
                    }

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

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

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

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRD, 0x80, PIRD)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        And (PIRD, 0x0F, Local0)
                        ShiftLeft (0x01, Local0, IRQV)
                        Return (BUFB)
                    }

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

                Device (SYSR)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x01)
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0010, 0x0010, 0x01, 0x10)
                        IO (Decode16, 0x0022, 0x0022, 0x01, 0x1E)
                        IO (Decode16, 0x0044, 0x0044, 0x01, 0x1C)
                        IO (Decode16, 0x0062, 0x0062, 0x01, 0x02)
                        IO (Decode16, 0x0065, 0x0065, 0x01, 0x0B)
                        IO (Decode16, 0x0074, 0x0074, 0x01, 0x0C)
                        IO (Decode16, 0x0091, 0x0091, 0x01, 0x03)
                        IO (Decode16, 0x00A2, 0x00A2, 0x01, 0x1E)
                        IO (Decode16, 0x00E0, 0x00E0, 0x01, 0x10)
                        IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x02)
                        IO (Decode16, 0x04D0, 0x04D0, 0x01, 0x02)
                        IO (Decode16, 0x0294, 0x0294, 0x01, 0x04)
                    })
                }

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

                Device (DMA1)
                {
                    Name (_HID, EisaId ("PNP0200"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        DMA (Compatibility, BusMaster, Transfer8) {4}
                        IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
                        IO (Decode16, 0x0080, 0x0080, 0x01, 0x11)
                        IO (Decode16, 0x0094, 0x0094, 0x01, 0x0C)
                        IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
                    })
                }

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

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0070, 0x0070, 0x04, 0x04)
                        IRQNoFlags () {8}
                    })
                }

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

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

                Scope (\)
                {
                    OperationRegion (SIO1, SystemIO, 0x03F0, 0x02)
                    Field (SIO1, ByteAcc, NoLock, Preserve)
                    {
                        INDP,   8, 
                        DATP,   8
                    }

                    IndexField (INDP, DATP, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0x02), 
                        CR02,   8, 
                        Offset (0x07), 
                        CR07,   8, 
                        Offset (0x20), 
                        CR20,   8, 
                        CR21,   8, 
                        CR22,   8, 
                        CR23,   8, 
                        CR24,   8, 
                        CR25,   8, 
                        CR26,   8, 
                        Offset (0x28), 
                        CR28,   8, 
                        Offset (0x2A), 
                        CR2A,   8, 
                        CR2B,   8, 
                        CR2C,   8, 
                        Offset (0x30), 
                        CR30,   8, 
                        Offset (0x60), 
                        CR60,   8, 
                        CR61,   8, 
                        CR62,   8, 
                        CR63,   8, 
                        CR64,   8, 
                        CR65,   8, 
                        Offset (0x70), 
                        CR70,   8, 
                        Offset (0x72), 
                        CR72,   8, 
                        Offset (0x74), 
                        CR74,   8, 
                        Offset (0xE0), 
                        CRE0,   8, 
                        CRE1,   8, 
                        CRE2,   8, 
                        CRE3,   8, 
                        CRE4,   8, 
                        CRE5,   8, 
                        CRE6,   8, 
                        CRE7,   8, 
                        CRE8,   8, 
                        CRE9,   8, 
                        CREA,   8, 
                        CREB,   8, 
                        CREC,   8, 
                        CRED,   8, 
                        Offset (0xF0), 
                        CRF0,   8, 
                        CRF1,   8, 
                        CRF2,   8, 
                        CRF3,   8, 
                        CRF4,   8, 
                        Offset (0xF6), 
                        CRF6,   8, 
                        CRF7,   8, 
                        Offset (0xF9), 
                        CRF9,   8
                    }

                    Method (ENF1, 0, NotSerialized)
                    {
                        Store (0x87, INDP)
                        Store (0x87, INDP)
                    }

                    Method (EXF1, 0, NotSerialized)
                    {
                        Store (0xAA, INDP)
                    }
                }

                Device (FDC0)
                {
                    Name (_HID, EisaId ("PNP0700"))
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (Zero, CR07)
                        If (CR30)
                        {
                            EXF1 ()
                            Return (0x0F)
                        }
                        Else
                        {
                            If (LOr (CR60, CR61))
                            {
                                EXF1 ()
                                Return (0x0D)
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x00, CR07)
                        Store (Zero, CR30)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IO (Decode16, 0x03F2, 0x03F2, 0x01, 0x04)
                            IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                            IRQNoFlags () {6}
                            DMA (Compatibility, NotBusMaster, Transfer8) {2}
                        })
                        Store (Local0, Local0)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F2, 0x03F2, 0x01, 0x04)
                            IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
                            IRQNoFlags () {6}
                            DMA (Compatibility, NotBusMaster, Transfer8) {2}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateWordField (Arg0, 0x19, IRQL)
                        CreateByteField (Arg0, 0x1C, DMAV)
                        ENF1 ()
                        Store (Zero, CR07)
                        Store (One, CR30)
                        EXF1 ()
                    }
                }

                Device (UAR1)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x02, CR07)
                        If (CR30)
                        {
                            EXF1 ()
                            Return (0x0F)
                        }
                        Else
                        {
                            If (LOr (CR60, CR61))
                            {
                                EXF1 ()
                                Return (0x0D)
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x02, CR07)
                        Store (Zero, CR30)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF1, ResourceTemplate ()
                        {
                            IO (Decode16, 0x0000, 0x0000, 0x08, 0x08)
                            IRQNoFlags () {}
                        })
                        CreateByteField (BUF1, 0x02, IOLO)
                        CreateByteField (BUF1, 0x03, IOHI)
                        CreateByteField (BUF1, 0x04, IORL)
                        CreateByteField (BUF1, 0x05, IORH)
                        CreateWordField (BUF1, 0x09, IRQW)
                        ENF1 ()
                        Store (0x02, CR07)
                        Store (CR61, IOLO)
                        Store (CR61, IORL)
                        Store (CR60, IOHI)
                        Store (CR60, IORH)
                        Store (One, Local0)
                        ShiftLeft (Local0, CR70, IRQW)
                        EXF1 ()
                        Return (BUF1)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
                            IRQNoFlags () {4}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
                            IRQNoFlags () {3}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
                            IRQNoFlags () {4}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
                            IRQNoFlags () {3}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateWordField (Arg0, 0x09, IRQW)
                        ENF1 ()
                        Store (0x02, CR07)
                        Store (One, CR30)
                        Store (IOLO, CR61)
                        Store (IOHI, CR60)
                        FindSetRightBit (IRQW, Local0)
                        Subtract (Local0, 0x01, CR70)
                        EXF1 ()
                    }
                }

                Device (UAR2)
                {
                    Name (_HID, EisaId ("PNP0501"))
                    Name (_UID, 0x02)
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        If (LEqual (CKID (), 0x9771))
                        {
                            Store (0x03, CR07)
                            If (LEqual (CR30, 0x01))
                            {
                                EXF1 ()
                                Return (0x0F)
                            }
                            Else
                            {
                                If (LOr (CR60, CR61))
                                {
                                    EXF1 ()
                                    Return (0x0D)
                                }
                            }

                            If (LEqual (IRFL, 0x00))
                            {
                                Store (0x06, CR07)
                                If (LEqual (CR30, 0x01))
                                {
                                    EXF1 ()
                                    Return (0x0F)
                                }
                                Else
                                {
                                    If (LOr (CR60, CR61))
                                    {
                                        EXF1 ()
                                        Return (0x0D)
                                    }
                                }
                            }
                        }
                        Else
                        {
                            Store (0x03, CR07)
                            And (CRF1, 0x38, Local0)
                            If (LEqual (Local0, 0x00))
                            {
                                If (LEqual (CR30, 0x01))
                                {
                                    EXF1 ()
                                    Return (0x0F)
                                }
                                Else
                                {
                                    If (LOr (CR60, CR61))
                                    {
                                        EXF1 ()
                                        Return (0x0D)
                                    }
                                }
                            }

                            And (CRF1, 0x38, Local0)
                            If (LNot (LLess (Local0, 0x20)))
                            {
                                If (LEqual (CR30, 0x01))
                                {
                                    EXF1 ()
                                    Return (0x0F)
                                }
                                Else
                                {
                                    If (LOr (CR60, CR61))
                                    {
                                        EXF1 ()
                                        Return (0x0D)
                                    }
                                }
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x03, CR07)
                        If (LEqual (CKID (), 0x9771))
                        {
                            If (LOr (CR60, CR61))
                            {
                                Store (0x00, CR30)
                            }
                            Else
                            {
                                Store (0x06, CR07)
                            }
                        }

                        Store (0x00, CR30)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF2, ResourceTemplate ()
                        {
                            IO (Decode16, 0x0000, 0x0000, 0x08, 0x08)
                            IRQNoFlags () {4}
                        })
                        CreateByteField (BUF2, 0x02, IOLO)
                        CreateByteField (BUF2, 0x03, IOHI)
                        CreateByteField (BUF2, 0x04, IORL)
                        CreateByteField (BUF2, 0x05, IORH)
                        CreateWordField (BUF2, 0x09, IRQW)
                        ENF1 ()
                        Store (0x03, CR07)
                        If (LEqual (CKID (), 0x9771))
                        {
                            If (LOr (CR60, CR61))
                            {
                                Store (0x03, CR07)
                            }
                            Else
                            {
                                Store (0x06, CR07)
                            }
                        }

                        Store (CR61, IOLO)
                        Store (CR61, IORL)
                        Store (CR60, IOHI)
                        Store (CR60, IORH)
                        Store (One, Local0)
                        ShiftLeft (Local0, CR70, IRQW)
                        EXF1 ()
                        Return (BUF2)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
                            IRQNoFlags () {4}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
                            IRQNoFlags () {3}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
                            IRQNoFlags () {4}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
                            IRQNoFlags () {3}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateWordField (Arg0, 0x09, IRQW)
                        ENF1 ()
                        Store (0x03, CR07)
                        If (LEqual (CKID (), 0x9771))
                        {
                            If (LOr (CR60, CR61))
                            {
                                Store (0x03, CR07)
                            }
                            Else
                            {
                                Store (0x06, CR07)
                            }
                        }

                        Store (One, CR30)
                        Store (IOLO, CR61)
                        Store (IOHI, CR60)
                        FindSetRightBit (IRQW, Local0)
                        Subtract (Local0, 0x01, CR70)
                        EXF1 ()
                    }
                }

                Device (IRDA)
                {
                    Name (_HID, EisaId ("PNP0510"))
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        If (LEqual (CKID (), 0x9771))
                        {
                            If (LEqual (IRFL, 0x01))
                            {
                                Store (0x06, CR07)
                                If (LEqual (CR30, 0x01))
                                {
                                    EXF1 ()
                                    Return (0x0F)
                                }
                                Else
                                {
                                    If (LOr (CR60, CR61))
                                    {
                                        EXF1 ()
                                        Return (0x0D)
                                    }
                                }
                            }
                        }
                        Else
                        {
                            Store (0x03, CR07)
                            And (CRF1, 0x30, Local0)
                            If (LEqual (Local0, 0x10))
                            {
                                If (LEqual (CR30, 0x01))
                                {
                                    EXF1 ()
                                    Return (0x0F)
                                }
                                Else
                                {
                                    If (LOr (CR60, CR61))
                                    {
                                        EXF1 ()
                                        Return (0x0D)
                                    }
                                }
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        If (LEqual (DISE, 0x01))
                        {
                            ENF1 ()
                            Store (0x03, CR07)
                            If (LEqual (CKID (), 0x9771))
                            {
                                Store (0x06, CR07)
                            }

                            Store (0x00, CR30)
                            EXF1 ()
                        }

                        Store (Local0, Local0)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF4, ResourceTemplate ()
                        {
                            IO (Decode16, 0x0000, 0x0000, 0x08, 0x08)
                            IRQNoFlags () {}
                        })
                        CreateByteField (BUF4, 0x02, IOLO)
                        CreateByteField (BUF4, 0x03, IOHI)
                        CreateByteField (BUF4, 0x04, IORL)
                        CreateByteField (BUF4, 0x05, IORH)
                        CreateWordField (BUF4, 0x09, IRQW)
                        ENF1 ()
                        Store (0x03, CR07)
                        If (LEqual (CKID (), 0x9771))
                        {
                            Store (0x06, CR07)
                        }

                        Store (CR61, IOLO)
                        Store (CR61, IORL)
                        Store (CR60, IOHI)
                        Store (CR60, IORH)
                        Store (0x00, IRQW)
                        ShiftLeft (0x01, CR70, IRQW)
                        EXF1 ()
                        Return (BUF4)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
                            IRQNoFlags () {3,4,10,11}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
                            IRQNoFlags () {3,4,10,11}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
                            IRQNoFlags () {3,4,10,11}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
                            IRQNoFlags () {3,4,10,11}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateWordField (Arg0, 0x09, IRQW)
                        ENF1 ()
                        Store (0x03, CR07)
                        If (LEqual (CKID (), 0x9771))
                        {
                            Store (0x06, CR07)
                        }

                        Store (One, CR30)
                        Store (IOLO, CR61)
                        Store (IOHI, CR60)
                        FindSetRightBit (IRQW, Local0)
                        Subtract (Local0, 0x01, CR70)
                        EXF1 ()
                    }
                }

                Method (CKID, 0, NotSerialized)
                {
                    Store (CR20, Local0)
                    Store (CR21, Local1)
                    ShiftLeft (Local0, 0x08, Local0)
                    Or (Local0, Local1, Local0)
                    Return (Local0)
                }

                Device (LPT1)
                {
                    Name (_HID, EisaId ("PNP0400"))
                    Name (_UID, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x01, CR07)
                        And (CRF0, 0x02, Local0)
                        If (LNot (LEqual (Local0, 0x02)))
                        {
                            If (CR30)
                            {
                                EXF1 ()
                                Return (0x0F)
                            }
                            Else
                            {
                                If (LOr (CR60, CR61))
                                {
                                    EXF1 ()
                                    Return (0x0D)
                                }
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (Zero, CR30)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF5, ResourceTemplate ()
                        {
                            IO (Decode16, 0x0000, 0x0000, 0x08, 0x00)
                            IRQNoFlags () {}
                        })
                        CreateByteField (BUF5, 0x02, IOLO)
                        CreateByteField (BUF5, 0x03, IOHI)
                        CreateByteField (BUF5, 0x04, IORL)
                        CreateByteField (BUF5, 0x05, IORH)
                        CreateByteField (BUF5, 0x07, IOLE)
                        CreateWordField (BUF5, 0x09, IRQW)
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (CR61, IOLO)
                        Store (IOLO, IORL)
                        Store (CR60, IOHI)
                        Store (IOHI, IORH)
                        If (LEqual (IOLO, 0xBC))
                        {
                            Store (0x04, IOLE)
                        }
                        Else
                        {
                            Store (0x08, IOLE)
                        }

                        Store (One, Local0)
                        Store (CR70, Local5)
                        ShiftLeft (Local0, Local5, IRQW)
                        EXF1 ()
                        Return (BUF5)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                            IRQNoFlags () {3,4,5,7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x08, 0x08)
                            IRQNoFlags () {3,4,5,7}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x08, 0x04)
                            IRQNoFlags () {3,4,5,7}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateByteField (Arg0, 0x04, IORL)
                        CreateByteField (Arg0, 0x05, IORH)
                        CreateWordField (Arg0, 0x09, IRQW)
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (One, CR30)
                        Store (IOLO, CR61)
                        Store (IOHI, CR60)
                        FindSetLeftBit (IRQW, Local0)
                        Subtract (Local0, 0x01, Local0)
                        Store (Local0, CR70)
                        EXF1 ()
                    }
                }

                Device (ECP1)
                {
                    Name (_HID, EisaId ("PNP0401"))
                    Name (_UID, 0x01)
                    Method (_STA, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x01, CR07)
                        And (CRF0, 0x02, Local0)
                        If (LEqual (Local0, 0x02))
                        {
                            If (CR30)
                            {
                                EXF1 ()
                                Return (0x0F)
                            }
                            Else
                            {
                                If (LOr (CR60, CR61))
                                {
                                    EXF1 ()
                                    Return (0x0D)
                                }
                            }
                        }

                        EXF1 ()
                        Return (0x00)
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (Zero, CR30)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF6, ResourceTemplate ()
                        {
                            IO (Decode16, 0x0000, 0x0000, 0x08, 0x08)
                            IO (Decode16, 0x0000, 0x0000, 0x04, 0x04)
                            IRQNoFlags () {}
                            DMA (Compatibility, NotBusMaster, Transfer8) {}
                        })
                        CreateByteField (BUF6, 0x02, IOLO)
                        CreateByteField (BUF6, 0x03, IOHI)
                        CreateByteField (BUF6, 0x04, IORL)
                        CreateByteField (BUF6, 0x05, IORH)
                        CreateByteField (BUF6, 0x06, ALGN)
                        CreateByteField (BUF6, 0x07, LENG)
                        CreateByteField (BUF6, 0x0A, IOEL)
                        CreateByteField (BUF6, 0x0B, IOEH)
                        CreateByteField (BUF6, 0x0C, IOML)
                        CreateByteField (BUF6, 0x0D, IOMH)
                        CreateWordField (BUF6, 0x11, IRQW)
                        CreateByteField (BUF6, 0x14, DMAC)
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (CR61, Local2)
                        Store (Local2, IOLO)
                        Store (CR60, Local3)
                        Store (Local3, IOHI)
                        Or (Local3, 0x04, Local3)
                        Store (Local3, IOEH)
                        Store (Local3, IOMH)
                        Store (IOLO, IORL)
                        Store (IOLO, IOEL)
                        Store (IOLO, IOML)
                        Store (IOHI, IORH)
                        Store (One, Local0)
                        Store (CR70, Local5)
                        ShiftLeft (Local0, Local5, IRQW)
                        Store (One, Local0)
                        Store (CR74, Local5)
                        ShiftLeft (Local0, Local5, DMAC)
                        Store (IOHI, Local0)
                        ShiftLeft (Local0, 0x08, Local0)
                        Or (Local0, IOLO, Local0)
                        If (LEqual (Local0, 0x03BC))
                        {
                            Store (0x04, ALGN)
                            Store (0x04, LENG)
                        }

                        EXF1 ()
                        Return (BUF6)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                            IO (Decode16, 0x0778, 0x0778, 0x04, 0x04)
                            IRQNoFlags () {4,5,7}
                            DMA (Compatibility, NotBusMaster, Transfer8) {0,1,3}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x0278, 0x0278, 0x08, 0x08)
                            IO (Decode16, 0x0678, 0x0678, 0x04, 0x04)
                            IRQNoFlags () {3,4,5,7}
                            DMA (Compatibility, NotBusMaster, Transfer8) {0,1,3}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16, 0x03BC, 0x03BC, 0x04, 0x04)
                            IO (Decode16, 0x07BC, 0x07BC, 0x04, 0x04)
                            IRQNoFlags () {4,5,7}
                            DMA (Compatibility, NotBusMaster, Transfer8) {0,1,3}
                        }
                        EndDependentFn ()
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateByteField (Arg0, 0x02, IOLO)
                        CreateByteField (Arg0, 0x03, IOHI)
                        CreateWordField (Arg0, 0x11, IRQW)
                        CreateByteField (Arg0, 0x14, DMAC)
                        ENF1 ()
                        Store (0x01, CR07)
                        Store (One, CR30)
                        Store (IOLO, CR61)
                        Store (IOHI, CR60)
                        FindSetLeftBit (IRQW, Local0)
                        Subtract (Local0, 0x01, Local0)
                        Store (Local0, CR70)
                        FindSetLeftBit (DMAC, Local1)
                        Subtract (Local1, 0x01, CR74)
                        EXF1 ()
                    }
                }

                Device (PS2M)
                {
                    Name (_HID, EisaId ("PNP0F13"))
                    Method (_STA, 0, NotSerialized)
                    {
                        If (LEqual (PS2F, 0x00))
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

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

                Device (PS2K)
                {
                    Name (_HID, EisaId ("PNP0303"))
                    Method (_STA, 0, NotSerialized)
                    {
                        If (LEqual (KBDI, 0x01))
                        {
                            Return (0x00)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }

                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
                        IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
                        IRQNoFlags () {1}
                    })
                }
            }
        }
    }
}
Received on Mon Oct 18 2004 - 07:01:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:18 UTC