lo all, i have a laptop with a buggy acpi DSDT the code has 82 errors in it, if anyone can fix it then please do, i will submit it to the linux acpi dev mailinglist which maintains repaird dsdts for many laptops. here is the code (a list of the errors can be found at the end in annother code block):

[code:1:3488897712]/*
* Intel ACPI Component Architecture
* AML Disassembler version 20050513
*
* Disassembly of dsdt.dat, Sat Jun 4 18:19:16 2005
*/
DefinitionBlock ("DSDT.aml", "DSDT", 1, "TOSINV", "Avani2", 4100)
{
Name (VERS, Package (0x03)
{
"Project: OEMx",
"Date: 10/11/2001",
"Vers: 4.00.00"
})
Name (\GPIC, 0x00)
Name (\PDC0, 0x80000000)
Name (\PDC1, 0x80000000)
Scope (\_PR)
{
Processor (CPU0, 0x00, 0x00004010, 0x06) {}
Processor (CPU1, 0x01, 0x00004010, 0x06) {}
}

Scope (\_GPE)
{
Method (_L01, 0, NotSerialized)

{
\_SB.GSMI (0x06)
}

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

Method (_L04, 0, NotSerialized)
{
Noop
}

Method (_L05, 0, NotSerialized)
{
Noop
}

Method (_L0B, 0, NotSerialized)
{
Notify (\_SB.PCI0.USB0, 0x02)
Notify (\_SB.PCI0.USB1, 0x02)
}

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

Name (\ECON, 0x00)
Name (\DFEC, 0x00)
Name (\MYOS, 0x00)
Name (\ACPS, 0x00)
Name (\SACP, 0x00)
Name (\SMIS, 0x00)
Name (\PIOE, 0x00)
Name (\SR18, 0x00)
Name (\SR19, 0x00)
Name (\ECSY, 0x00)
Name (\ASTA, 0x00)
Name (\BSTA, 0x00)
Name (\SCCT, 0x00)
Name (\TPOK, 0x00)
OperationRegion (SMIO, SystemIO, 0xB0, 0x02)
Field (SMIO, ByteAcc, NoLock, Preserve)
{
APMC, 8,
APMD, 8
}

OperationRegion (ECMB, SystemIO, 0x0300, 0x02)
Field (ECMB, ByteAcc, NoLock, Preserve)
{
MINX, 8,
MDAT, 8
}

IndexField (MINX, MDAT, ByteAcc, NoLock, Preserve)
{
Offset (0x82),
MBCD, 8,
Offset (0x8E),
O_RB, 1,
, 3,
MBS3, 1,
, 2,
MBS4, 1,
, 2,
DKAP, 1,
, 3,
S_AC, 1,
Offset (0x90),
, 5,
MBTS, 1,
Offset (0x91),
Offset (0x92),
, 1,
BPW0, 6,
Offset (0x93),
, 1,
FPW1, 6,
Offset (0x94),
Offset (0x95),
, 1,
LPW2, 6,
Offset (0x96),
Offset (0xA0),
SC_R, 8,
BINX, 8,
BDAT, 8,
BCMD, 8
}

OperationRegion (CPIO, SystemIO, 0x4000, 0x80)
Field (CPIO, DWordAcc, NoLock, Preserve)
{
Offset (0x10),
, 1,
THRO, 3,
ETHR, 1
}

OperationRegion (PMIO, SystemIO, 0x4000, 0x05)
Field (PMIO, ByteAcc, NoLock, Preserve)
{
Offset (0x01),
PBST, 1,
SBST, 1,
RTCS, 1,
, 1,
, 1,
, 1,
, 1,
WAKS, 1,
Offset (0x03),
PBEN, 1,
SPEN, 1,
PMRT, 1,
Offset (0x04)
}

OperationRegion (PMRG, SystemIO, 0x0CD6, 0x60)
Field (PMRG, ByteAcc, NoLock, Preserve)
{
PMRI, 8,
PMRD, 8
}

IndexField (PMRI, PMRD, ByteAcc, NoLock, Preserve)
{
, 2,
PSMI, 1,
Offset (0x01),
Offset (0x14),
IO0M, 8,
IO0H, 8,
IO1M, 8,
IO1H, 8,
IO2M, 8,
IO2H, 8,
IO3M, 8,
IO3H, 8,
, 4,
PIO3, 1,
PIO2, 1,
PIO1, 1,
PIO0, 1,
, 5,
PIOS, 1,
Offset (0x1E),
Offset (0x50),
C3C4, 1
}

OperationRegion (P80, SystemIO, 0x1080, 0x01)
Field (P80, ByteAcc, NoLock, Preserve)
{
DBGP, 8
}

OperationRegion (IO_T, SystemIO, 0x0280, 0x10)
Field (IO_T, ByteAcc, NoLock, Preserve)
{
Offset (0x02),
Offset (0x04),
Offset (0x06),
Offset (0x08),
Offset (0x09),
Offset (0x0A),
Offset (0x0B),
Offset (0x0C),
Offset (0x0D),
Offset (0x0E),
Offset (0x0F),
Offset (0x10)
}

OperationRegion (MBOX, SystemMemory, 0x0BFFFC00, 0x30)
Field (MBOX, AnyAcc, Lock, Preserve)
{
DTLO, 8,
DTHI, 8,
UTYP, 2,
, 2,
GMOD, 3,
Offset (0x03),
CMAD, 3,
, 1,
CMBD, 3,
Offset (0x04),
PTYP, 2,
EPDA, 1,
, 1,
LPTE, 2,
, 1,
EPPT, 1,
ETLO, 8,

ETHI, 8,
EHT, 8,
CFGD, 16,
, 7,
KBDW, 1,
CLMT, 2,
Offset (0x0C),
, 6,
WLAN, 1,
Offset (0x0D),
E_TV, 1,
EPRT, 1,
EFIR, 1,
E394, 1
}

Name (\_S0, Package (0x04)
{
0x00,
0x00,
0x00,
0x00
})
Name (\_S3, Package (0x04)
{
0x03,
0x03,
0x00,
0x00
})
Name (\_S4, Package (0x04)
{
0x04,
0x04,
0x00,
0x00
})
Name (\_S5, Package (0x04)
{
0x05,
0x05,
0x00,
0x00
})
Method (\_PTS, 1, NotSerialized)
{
If (LEqual (Arg0, 0x03))
{
Store (0x43, DBGP)
Store (IO2M, SR18)
Store (IO2H, SR19)
Store (PSMI, SMIS)
Store (PIO2, PIOE)
Store (0x00, PIO2)
Store (0x00, PSMI)
Store (0x01, MBS3)
Store (0x00, MBS4)
Store (\_SB.RDEC (0x94), Local0)
Store (And (Local0, 0x01), BSTA)
If (LEqual (MYOS, 0x01))
{
\_SB.GSMI (0x33)
}

If (WLAN)
{
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x01), Local0)
Store (And (Local0, 0xFB), Local0)
}
Else
{
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x05), Local0)
}

\_SB.WREC (0xB6, Local0)
\_SB.GSMI (0x22)
Store (0x00, TPOK)
\_SB.GSMI (0x1F)
\_SB.GSMI (0x0D)
\_SB.GSMI (0x2B)
\_SB.GSMI (0x16)
Store (0x53, DBGP)
}
Else
{
If (LEqual (Arg0, 0x04))
{
Store (0x44, DBGP)
Store (0x00, PIO2)
Store (0x00, PSMI)
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x01), Local0)
\_SB.WREC (0xB6, Local0)
Store (\_SB.RDEC (0xB8), Local0)
Store (Or (Local0, 0x02), Local0)
\_SB.WREC (0xB8, Local0)
If (WLAN)
{
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x01), Local0)
Store (And (Local0, 0xFB), Local0)
}
Else
{
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x05), Local0)
}

\_SB.WREC (0xB6, Local0)
Store (0x00, MBS3)
Store (0x01, MBS4)
\_SB.GSMI (0x23)
\_SB.GSMI (0x1F)
\_SB.GSMI (0x0A)
Store (0x54, DBGP)
}
Else
{
If (LEqual (Arg0, 0x05))
{
Store (0x45, DBGP)
Store (0x00, PIO2)
Store (0x00, PSMI)
If (WLAN)
{
Store (\_SB.RDEC (0xB6), Local0)
Store (And (Local0, 0xFB), Local0)
}
Else
{
Store (\_SB.RDEC (0xB6), Local0)
Store (Or (Local0, 0x04), Local0)
}

\_SB.WREC (0xB6, Local0)
Store (0x00, MBS3)
Store (0x00, MBS4)
Store (0x01, O_RB)
\_SB.GSMI (0x2A)
\_SB.GSMI (0x1F)
\_SB.GSMI (0x0A)
\_SB.GSMI (0x32)
Store (0x55, DBGP)
}
}
}
}

Method (\_WAK, 1, NotSerialized)
{
Store (\_SB.RDEC (0x92), Local0)
Store (And (Local0, 0x20), Local0)
If (Local0)
{
Notify (\_SB.BAT1, 0x80)
}

If (LEqual (Arg0, 0x01))
{
Store (0xE1, DBGP)
}
Else
{
If (LEqual (Arg0, 0x03))
{
Store (0x00, SCCT)
Store (0x00, MBS3)
Store (\_SB.RDEC (0x92), Local0)
Store (And (Local0, 0x08), Local0)
ShiftRight (Local0, 0x03, S_AC)
\_SB.GSMI (0x2C)
Sleep (0x0A)
Notify (\_SB.AC, 0x00)
Notify (\_SB.BAT1, 0x81)
Notify (\_SB.PCI0.USB0, 0x00)
Notify (\_SB.PCI0.USB1, 0x00)
Notify (\_SB.PCI0.USB2, 0x00)
Store (And (\_SB.PCI0.RSMF, 0x01), Local0)
If (Local0)
{
Notify (\_SB.PWRB, 0x02)
}

Store (SR18, IO2M)
Store (SR19, IO2H)
Store (0x01, PIOS)
Store (PIOE, PIO2)
Store (SMIS, PSMI)
Store (0xE3, DBGP)
}
Else
{
If (LEqual (Arg0, 0x04))
{
Store (0x00, SCCT)
Store (0x00, MBS4)
\_SB.GSMI (0x2D)
Sleep (0x0A)
Store (\_SB.RDEC (0x92), Local0)
Store (And (Local0, 0x08), S_AC)
ShiftRight (Local0, 0x03, S_AC)
Notify (\_SB.AC, 0x00)
Notify (\_SB.BAT1, 0x81)
Notify (\_SB.PCI0.USB0, 0x00)
Notify (\_SB.PCI0.USB1, 0x00)
Notify (\_SB.PCI0.USB2, 0x00)
Notify (\_SB.PWRB, 0x02)
Store (0xE4, DBGP)
Sleep (0x64)
}
}
}

Return (0x00)
}

Method (_SST, 1, NotSerialized)
{
Store (Arg0, DBGP)
}

Method (\_PIC, 1, NotSerialized)
{
Store (Arg0, GPIC)
}

Name (PLCY, 0x01)
Name (CTMP, 0x00)
Name (TFST, 0x00)
Name (EAC0, 0x2D)
Name (TMPL, 0x2D)
Name (TMPH, 0x46)
Name (CFSP, 0x00)
Name (PTMP, 0x68)
Name (PASH, 0x5A)
Name (PASL, 0x5A)
Name (CTTP, 0x69)
Name (CPUT, 0x00)
Name (BATT, 0x00)
Name (NFLO, 0x48)
Name (NFHI, 0x4C)
Name (CPUM, 0x00)
Name (ACOF, 0x00)
Name (CTPB, Buffer (0x0B)
{
0x23, 0x28, 0x2D, 0x32, 0x38, 0x3E, 0x40, 0x46,
0x4E, 0x53, 0x69
})
Name (MPPB, Buffer (0x0B)
{
0x23, 0x28, 0x2D, 0x32, 0x38, 0x3E, 0x40, 0x46,
0x4E, 0x53, 0x69
})
Name (MCPB, Buffer (0x0B)
{
0x23, 0x28, 0x2D, 0x32, 0x35, 0x39, 0x3B, 0x3F,
0x46, 0x4C, 0x69
})
Name (MNPB, Buffer (0x0B)
{
0x28, 0x2D, 0x31, 0x36, 0x39, 0x3E, 0x41, 0x46,
0x49, 0x50, 0x69
})
Name (BPPB, Buffer (0x0B)
{
0x3C, 0x41, 0x43, 0x48, 0x4A, 0x4E, 0x4A, 0x4E,
0x32, 0x37, 0x69
})
Name (BCPB, Buffer (0x0B)
{
0x37, 0x3C, 0x3E, 0x42, 0x46, 0x48, 0x46, 0x48,
0x2F, 0x34, 0x69
})
Name (BNPB, Buffer (0x0B)
{
0x39, 0x3E, 0x3F, 0x44, 0x46, 0x4A, 0x46, 0x4A,
0x32, 0x37, 0x69
})
Name (MNJP, Buffer (0x0B)
{
0x28, 0x2D, 0x32, 0x37, 0x39, 0x3E, 0x40, 0x44,
0x48, 0x50, 0x69
})
Name (BNJP, Buffer (0x0B)
{
0x3A, 0x3E, 0x41, 0x46, 0x48, 0x4B, 0x48, 0x4B,
0x32, 0x37, 0x69
})
Name (TRON, 0x00)
Name (BAWA, 0x00)
Method (CHGT, 1, NotSerialized)
{
Store (\_SB.RDEC (0xA7), Local1)
Store (\_SB.RDEC (0xA6), Local0)
Store (And (Local0, 0x03), Local0)
Store (0x00, NFLO)
Store (0x7F, NFHI)
If (And (LEqual (Local1, 0x01), LEqual (Local0, 0x00)))
{
If (LOr (LEqual (Arg0, 0x00), LEqual (Arg0, 0x01)))
{
Store (MNJP, CTPB)
Store (0x01, CPUM)
}
Else
{
Store (BNJP, CTPB)
Store (0x00, CPUM)
}
}
Else
{
If (LOr (LEqual (Arg0, 0x00), LEqual (Arg0, 0x01)))
{
If (LEqual (Local0, 0x01))
{
Store (MPPB, CTPB)
Store (0x39, NFLO)
Store (0x3F, NFHI)
}
Else
{
If (LEqual (Local0, 0x02))
{
Store (MCPB, CTPB)
Store (0x36, NFLO)
Store (0x39, NFHI)
}
Else
{
Store (MNPB, CTPB)
}
}

Store (0x01, CPUM)
}

If (LEqual (Arg0, 0x02))
{
If (LEqual (Local0, 0x01))
{
Store (BPPB, CTPB)
}
Else
{
If (LEqual (Local0, 0x02))
{
Store (BCPB, CTPB)
}
Else
{
Store (BNPB, CTPB)
}
}

Store (0x00, CPUM)
}
}

CreateByteField (CTPB, 0x08, PSPL)
CreateByteField (CTPB, 0x09, PSPH)
CreateByteField (CTPB, 0x0A, CRTT)
Store (PSPL, PASL)
Store (PSPH, PASH)
Store (PASH, PTMP)
Store (CRTT, CTTP)
\_SB.WREC (0xC2, PASH)
\_SB.WREC (0xC1, PASL)
\_SB.WREC (0xC4, NFHI)
\_SB.WREC (0xC3, NFLO)
}

Method (STEV, 1, NotSerialized)
{
CreateByteField (CTPB, 0x00, TPL0)
CreateByteField (CTPB, 0x01, TPH0)
CreateByteField (CTPB, 0x02, TPL1)
CreateByteField (CTPB, 0x03, TPH1)
CreateByteField (CTPB, 0x04, TPL2)
CreateByteField (CTPB, 0x05, TPH2)
CreateByteField (CTPB, 0x06, TPL3)
CreateByteField (CTPB, 0x07, TPH3)
CreateByteField (CTPB, 0x08, PSPL)
CreateByteField (CTPB, 0x09, PSPH)
CreateByteField (CTPB, 0x0A, CRTT)
Store (TPL0, EAC0)
Store (Arg0, Local0)
If (LLess (Local0, TPH0))
{
Store (0x00, TMPL)
Store (TPH0, TMPH)
Store (0x00, CFSP)
}
Else
{
Store (\_SB.RDEC (0xA6), Local1)
Store (And (Local1, 0x03), Local1)
If (LAnd (LLess (Local0, TPH1), LGreater (Local0, TPL0)))
{
Store (TPL0, TMPL)
Store (TPH1, TMPH)
Store (0x01, CFSP)
If (LEqual (CPUM, 0x00))
{
If (LEqual (Local1, 0x00))
{
Store (0x01, CFSP)
}
Else
{
If (LEqual (Local1, 0x01))
{
Store (0x05, CFSP)
}
Else
{
Store (0x05, CFSP)
}
}
}
}
Else
{
If (LAnd (LLess (Local0, TPH2), LGreater (Local0, TPL1)))
{
Store (TPL1, TMPL)
Store (TPH2, TMPH)
Store (0x02, CFSP)
If (LEqual (CPUM, 0x00))
{
If (LEqual (Local1, 0x00))
{
Store (0x02, CFSP)
}
Else
{
If (LEqual (Local1, 0x01))
{
Store (0x03, CFSP)
}
Else
{
Store (0x03, CFSP)
}
}
}
}
Else
{
If (LEqual (CPUM, 0x00))
{
Store (TPL3, TMPL)
Store (CRTT, TMPH)
If (LEqual (Local1, 0x00))
{
Store (0x03, CFSP)
}
Else
{
If (LEqual (Local1, 0x01))
{
Store (0x04, CFSP)
}
Else
{
Store (0x04, CFSP)
}
}
}
Else
{
If (LAnd (LLess (Local0, TPH3), LGreater (Local0, TPL2)))
{
Store (TPL2, TMPL)
Store (TPH3, TMPH)
Store (0x03, CFSP)
}
Else
{
If (LEqual (CPUM, 0x01))
{
Store (TPL3, TMPL)
Store (CRTT, TMPH)
If (LEqual (Local1, 0x00))
{
Store (0x04, CFSP)
}
Else
{
If (LEqual (Local1, 0x01))
{
Store (0x06, CFSP)
}
Else
{
Store (0x06, CFSP)
}
}
}
Else
{
Store (TPL3, TMPL)
Store (CRTT, TMPH)
Store (0x04, CFSP)
}
}
}
}
}
}

\_SB.WREC (0x9D, TMPL)
\_SB.WREC (0x9E, TMPH)
\_SB.WREC (0xA0, CFSP)
}

Name (F1ST, 0x00)
Scope (\_TZ)
{
PowerResource (PFA1, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
Return (F1ST)
}

Method (_ON, 0, NotSerialized)
{
Store (0x01, F1ST)
If (ECON)
{
Noop
}
}

Method (_OFF, 0, NotSerialized)
{
Store (0x00, F1ST)
If (ECON)
{
Noop
}
}
}

Device (FAN1)
{
Name (_HID, EisaId ("PNP0C0B"))
Name (_UID, 0x02)
Name (_PR0, Package (0x01)
{
\_TZ.PFA1
})
}

ThermalZone (THZN)
{
Method (_TMP, 0, Serialized)
{
If (LNot (LEqual (MYOS, 0x00)))
{
If (LLess (SCCT, 0x03))
{
Increment (SCCT)
\_SB.GSMI (0x31)
}
}

If (LEqual (SC_R, 0x77))
{
Return (0x0C80)
}

If (ECON)
{
If (DFEC)
{
Store (0x00, DFEC)
Return (0x0C80)
}

Store (\_SB.RDEC (0x9C), Local0)
Store (And (Local0, 0x7F), CTMP)
If (LEqual (TPOK, 0x00))
{
Store (\_SB.RDEC (0x9D), Local1)
Store (And (Local1, 0x7F), Local1)
Store (\_SB.RDEC (0x9E), Local2)
Store (And (Local2, 0x7F), Local2)
If (LOr (LNot (LEqual (TMPL, Local1)), LNot (LEqual (TMPH, Local2))))
{
STEV (Local0)
}
Else
{
Store (0x01, TPOK)
}
}

If (LEqual (TFST, 0x00))
{
CHGT (CLMT)
Store (0x01, TFST)
STEV (CTMP)
}
Else
{
Store (TMPH, Local1)
Store (TMPL, Local2)
If (LOr (LLess (Local0, Local2), LGreater (Local0, Local1)))
{
STEV (CTMP)
}
Else
{
Store (\_SB.RDEC (0x9E), Local2)
Store (And (Local2, 0x7F), Local2)
If (LNot (LEqual (Local2, TMPH)))
{
STEV (CTMP)
}
}
}

Return (Add (0x0AAC, Multiply (CTMP, 0x0A)))
}
Else
{
Return (0x0C80)
}
}

Method (_AC1, 0, NotSerialized)
{
Store (EAC0, Local0)
Add (Local0, 0x0111, Local0)
Multiply (Local0, 0x0A, Local0)
Return (Local0)
}

Name (_AL1, Package (0x01)
{
\_TZ.FAN1
})
Method (_CRT, 0, NotSerialized)
{
Return (Add (0x0AAC, Multiply (CTTP, 0x0A)))
}

Method (_SCP, 1, NotSerialized)
{
Store (Arg0, PLCY)
}

Name (_PSL, Package (0x01)
{
\_PR.CPU0
})
Name (_TSP, 0x96)
}
}

Scope (\_SB)
{
Device (LID)
{
Name (_HID, EisaId ("PNP0C0D"))
Method (_LID, 0, NotSerialized)
{
If (ECON)
{
Store (\_SB.RDEC (0x92), Local0)
Store (And (Local0, 0x01), Local0)
If (Local0)
{
Return (0x00)
}
Else
{
Return (0x01)
}
}
Else
{
Return (0x01)
}
}

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

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

Device (AC)
{
Name (_HID, "ACPI0003")
Name (_PCL, Package (0x02)
{
\_SB,
\_SB.BAT1
})
Method (_PSR, 0, NotSerialized)
{
If (LEqual (SC_R, 0x77))
{
Return (0x01)
}
Else
{
If (ECON)
{
Store (\_SB.RDEC (0x92), Local0)
Store (And (Local0, 0x08), Local0)
ShiftRight (Local0, 0x03, Local0)
Return (Local0)
}
Else
{
Return (One)
}
}
}

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

Name (BIF1, Package (0x0D)
{
0x01,
0xFFFFFFFF,
0xFFFFFFFF,
0x01,
0xFFFFFFFF,
0xFFFFFFFF,
0xFFFFFFFF,
0xFFFFFFFF,
0xFFFFFFFF,
" ",
" ",
"Li-I",
""
})
Name (BST1, Package (0x04)
{
0x01,
0x0FFFFFFF,
0x0FFFFFFF,
0x2B5C
})
Device (BAT1)
{
Name (_HID, EisaId ("PNP0C0A"))
Name (_UID, 0x01)
Name (_PCL, Package (0x01)
{
\_SB
})
Method (_STA, 0, NotSerialized)
{
If (LEqual (DFEC, 0x01))
{
If (BSTA)
{
Return (0x1F)
}
Else
{
Return (0x0F)
}
}

If (ECON)
{
Store (\_SB.RDEC (0x94), Local0)
Store (And (Local0, 0x01), Local0)
Store (Local0, BSTA)
If (LEqual (Local0, 0x01))
{
Return (0x1F)
}
Else
{
Return (0x0F)
}
}
Else
{
Return (0x0F)
}
}

Method (_BIF, 0, NotSerialized)
{
If (LEqual (DFEC, 0x01))
{
Return (BIF1)
}

If (ECON)
{
Store (\_SB.RDEC (0xAA), Local0)
Store (\_SB.RDEC (0xAB), Local5)
ShiftLeft (Local5, 0x08, Local5)
Add (Local0, Local5, Local0)
Store (\_SB.RDEC (0xAC), Local1)
Store (\_SB.RDEC (0xAD), Local5)
ShiftLeft (Local5, 0x08, Local5)
Add (Local1, Local5, Local1)
Store (Local1, Index (BIF1, 0x01))
Store (Local0, Index (BIF1, 0x02))
Store (0x3A98, Index (BIF1, 0x04))
Store (0x00, Local2)
Store (Local2, Index (BIF1, 0x05))
Store (0x00, Local4)
Store (Local4, Index (BIF1, 0x06))
Subtract (Local2, Local4, Local6)
Store (Local6, Index (BIF1, 0x07))
Subtract (Local0, Local2, Local7)
Store (Local7, Index (BIF1, 0x08))
Store (\_SB.RDEC (0xDF), Local0)
Store (And (Local0, 0x0F), Local0)
If (LEqual (Local0, 0x01))
{
Store ("PA3382-BAS/BRS", Index (BIF1, 0x09))
}
Else
{
Store ("PA3384-BAS/BRS", Index (BIF1, 0x09))
}

Store (\_SB.RDEC (0xB9), Local0)
Store (\_SB.RDEC (0xBA), Local5)
ShiftLeft (Local5, 0x08, Local5)
Add (Local0, Local5, Local0)
Store (ITOS (Local0), Local1)
Store (Local1, Index (BIF1, 0x0A))
}
Else
{
Store (0xFFFFFFFF, Index (BIF1, 0x01))
Store (0xFFFFFFFF, Index (BIF1, 0x04))
}

Return (BIF1)
}

Method (_BST, 0, NotSerialized)
{
If (LEqual (SC_R, 0x77))
{
Store (0x02, Index (BST1, 0x00))
Store (0x05DC, Index (BST1, 0x01))
Store (0x39D0, Index (BST1, 0x02))
Store (0x39D0, Index (BST1, 0x03))
Return (BST1)
}

If (LEqual (DFEC, 0x01))
{
Return (BST1)
}

If (ECON)
{
Store (\_SB.RDEC (0x94), Local1)
Store (And (Local1, 0x10), Local1)
ShiftRight (Local1, 0x04, Local1)
Store (\_SB.RDEC (0x95), Local0)
Store (And (Local0, 0x01), Local0)
ShiftLeft (Local1, 0x01, Local2)
Or (Local0, Local2, Local3)
Store (\_SB.RDEC (0xC6), Local2)
Multiply (Local2, 0x0100, Local1)
Store (\_SB.RDEC (0xC5), Local0)
Add (Local1, Local0, Local1)
Store (Local1, Index (BST1, 0x01))
Store (And (\_SB.RDEC (0xA4), 0x7F), Local0)
If (LLess (Local0, 0x0F))
{
Or (Local3, 0x04, Local3)
}

Store (Local3, Index (BST1, 0x00))
Store (DerefOf (Index (BIF1, 0x02)), Local1)
Multiply (Local1, Local0, Local2)
Divide (Local2, 0x64, Local3, Local2)
Add (Local2, 0x0A, Local2)
Store (Local2, Index (BST1, 0x02))
Store (DerefOf (Index (BIF1, 0x04)), Local3)
Store (Local3, Index (BST1, 0x03))
}
Else
{
Store (0x01, Index (BST1, 0x00))

Store (0xFFFFFFFF, Index (BST1, 0x01))
Store (0xFFFFFFFF, Index (BST1, 0x02))
Store (0xFFFFFFFF, Index (BST1, 0x03))
}

Return (BST1)
}
}

Method (ITOS, 1, NotSerialized)
{
Store ("", Local0)
Store (0x04, Local1)
While (Local1)
{
Decrement (Local1)
And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
Store (DerefOf (Index (CHAR, Local4)), Local2)
Concatenate (Local0, Local2, Local5)
Store (Local5, Local0)
}

Return (Local0)
}

Name (CHAR, Package (0x10)
{
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F"
})
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A03"))
Name (_ADR, 0x00)
OperationRegion (NB00, PCI_Config, 0x7A, 0x02)
Field (NB00, ByteAcc, NoLock, Preserve)
{
SCR0, 8,
RSMF, 8
}

Method (_INI, 0, NotSerialized)
{
\_SB.GSMI (0x30)
Store (SizeOf (_OS), Local1)
If (LEqual (Local1, 0x14))
{
Store (0x01, MYOS)
If (CondRefOf (\_OSI, Local0))
{
If (\_OSI ("Windows 2001"))
{
Store (0x00, MYOS)
}
}
}
Else
{
If (LEqual (Local1, 0x27))
{
Store (0x02, MYOS)
}
Else
{
If (LEqual (Local1, 0x11))
{
Store (0x03, MYOS)
}
Else
{
Store (0x00, MYOS)
}
}
}

Increment (SCCT)
\_SB.GSMI (0x2D)
}

OperationRegion (MREG, PCI_Config, 0x92, 0x02)
Field (MREG, ByteAcc, NoLock, Preserve)
{
TOML, 8,
TOMH, 8
}

OperationRegion (BAR1, PCI_Config, 0x14, 0x04)
Field (BAR1, ByteAcc, NoLock, Preserve)
{
GRT1, 32
}

Method (TOM, 0, NotSerialized)
{
Multiply (TOML, 0x00010000, Local0)
Multiply (TOMH, 0x01000000, Local1)
Add (Local0, Local1, Local0)
Return (Local0)
}

Name (CRES, ResourceTemplate ()
{
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
0x0000, // Address Space Granularity
0x0000, // Address Range Minimum
0x00FF, // Address Range Maximum
0x0000, // Address Translation Offset
0x0100, 0x00,,)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Address Space Granularity
0x0000, // Address Range Minimum
0x0CF7, // Address Range Maximum
0x0000, // Address Translation Offset
0x0CF8, 0x00,,
, TypeStatic)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Address Space Granularity
0x0D00, // Address Range Minimum
0xFFFF, // Address Range Maximum
0x0000, // Address Translation Offset
0xF300,,,
, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000A0000, // Address Range Minimum
0x000BFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
0x00000000, // Address Space Granularity
0x000C0000, // Address Range Minimum
0x000C3FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
0x00000000, // Address Space Granularity
0x000C4000, // Address Range Minimum
0x000C7FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000C8000, // Address Range Minimum
0x000CBFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000CC000, // Address Range Minimum
0x000CFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000D0000, // Address Range Minimum
0x000D3FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000D4000, // Address Range Minimum
0x000D7FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000D8000, // Address Range Minimum
0x000DBFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000DC000, // Address Range Minimum
0x000DFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000E0000, // Address Range Minimum
0x000E3FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000E4000, // Address Range Minimum
0x000E7FFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000E8000, // Address Range Minimum
0x000EBFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000EC000, // Address Range Minimum
0x000EFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, 0x00,,
, AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x00000000, // Address Range Minimum
0xFFFDFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00000000, 0x00,,
, AddressRangeMemory, TypeStatic)
IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
DWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
0x00000000, // Address Space Granularity
0xFFF80000, // Address Range Minimum
0xFFFFFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00080000,,,
, AddressRangeMemory, TypeStatic)
})
Device (AGP)
{
Name (_ADR, 0x00010000)
Device (VGA0)
{
Name (_ADR, 0x00050000)
Method (_DOD, 0, NotSerialized)
{
Return (Package (0x03)
{
0x0100,
0x0110,
0x0200
})
}

Device (LCD)
{
Name (_ADR, 0x0110)
}

Device (TV)
{
Name (_ADR, 0x0200)
}

Device (CRT)
{
Name (_ADR, 0x0100)
}
}

Method (_PRT, 0, NotSerialized)
{
If (LEqual (GPIC, 0x00))
{
Return (PIC)
}
Else
{
Return (APIC)
}
}

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

Package (0x04)
{
0x0005FFFF,
0x01,
\_SB.PCI0.LPCB.LNK3,
0x00
}
})
Name (APIC, Package (0x02)
{
Package (0x04)
{
0x0005FFFF,
0x00,
0x00,
0x10
},

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

Method (_CRS, 0, NotSerialized)
{
CreateDWordField (CRES, 0x019B, BTMN)
CreateDWordField (CRES, 0x019F, BTMX)
CreateDWordField (CRES, 0x01A7, BTLN)
Store (\_SB.PCI0.TOM (), BTMN)
Subtract (0xFEC00000, BTMN, BTLN)
Subtract (Add (BTMN, BTLN), 0x01, BTMX)
Return (CRES)
}

Method (_PRT, 0, NotSerialized)
{
If (LEqual (GPIC, 0x00))
{
Return (PIC)
}
Else
{
Return (APIC)
}
}

Name (PIC, Package (0x07)
{
Package (0x04)
{
0x0013FFFF,
0x00,
\_SB.PCI0.LPCB.LNK3,
0x00
},

Package (0x04)
{
0x0013FFFF,
0x01,
\_SB.PCI0.LPCB.LNK3,
0x00
},

Package (0x04)
{
0x0013FFFF,
0x02,
\_SB.PCI0.LPCB.LNK3,
0x00
},

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

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

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

Package (0x04)
{
0x0014FFFF,
0x03,
\_SB.PCI0.LPCB.LNK3,
0x00
}
})
Name (APIC, Package (0x07)
{
Package (0x04)
{
0x0013FFFF,
0x00,
0x00,
0x13
},

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

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

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

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

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

Package (0x04)
{
0x0014FFFF,
0x03,
0x00,
0x13
}
})
Device (USB0)
{
Name (_ADR, 0x00130000)
Name (_PRW, Package (0x02)
{
0x0B,
0x03
})
Method (_S3D, 0, NotSerialized)
{
Return (0x03)
}
}

Device (USB1)
{
Name (_ADR, 0x00130001)
Name (_PRW, Package (0x02)
{
0x0B,
0x03
})
Method (_S3D, 0, NotSerialized)
{
Return (0x03)
}
}

Device (USB2)
{
Name (_ADR, 0x00130002)
Name (_PRW, Package (0x02)
{
0x0B,
0x03
})
Method (_S3D, 0, NotSerialized)
{
Return (0x03)
}
}

Device (SMBS)
{
Name (_ADR, 0x00140000)
OperationRegion (IRQF, PCI_Config, 0x62, 0x01)
Field (IRQF, ByteAcc, NoLock, Preserve)
{
IRQK, 1,
IRQM, 1,
Offset (0x01)
}
}

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

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

Device (LPCB)
{
Name (_ADR, 0x00140003)
OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
Field (PIRQ, ByteAcc, NoLock, Preserve)
{
PIID, 8,
PIDA, 8
}

Name (\C4C3, Zero)
Name (IPRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {5,7,10,11}
})
Name (RSRC, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
Device (LNK0)
{
Name (_HID, EisaId ("PNP0C0F"))
Name (_UID, 0x00)
Method (_STA, 0, NotSerialized)
{
Store (0x00, PIID)
Store (PIDA, Local0)
If (Local0)
{
Return (0x0B)
}
Else
{
Return (0x09)
}
}

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

Method (_DIS, 0, NotSerialized)
{
Store (0x00, PIID)
Store (0x00, PIDA)
}

Method (_CRS, 0, NotSerialized)
{
CreateWordField (RSRC, 0x01, IRQ0)
Store (0x00, PIID)
Store (PIDA, Local0)
ShiftLeft (0x01, Local0, IRQ0)
Return (RSRC)
}

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

Device (LNK1)
{
Name (_HID, EisaId ("PNP0C0F"))
Name (_UID, 0x01)
Method (_STA, 0, NotSerialized)
{
Store (0x01, PIID)
Store (PIDA, Local0)
If (Local0)
{
Return (0x0B)
}
Else
{
Return (0x09)
}
}

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

Method (_DIS, 0, NotSerialized)
{
Store (0x01, PIID)
Store (0x00, PIDA)
}

Method (_CRS, 0, NotSerialized)
{
CreateWordField (RSRC, 0x01, IRQ0)
Store (0x01, PIID)
Store (PIDA, Local0)
ShiftLeft (0x01, Local0, IRQ0)
Store (RSRC, Debug)