Jump to content
InsanelyMac Forum
Bruce Atkinson

3 errors when compiling DSDT

Recommended Posts

Hi all, sorry I am a noob and am having issues when compiling a DSDT for my AMD ECS A740GM-M. Have been using DSDTE.

 

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20091214 [Dec 16 2009]
Copyright © 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 4.0

/Users/bruce/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl  2499:				 If (ECEN)
Error	4096 -												  syntax error, unexpected PARSEOP_IF ^

/Users/bruce/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl  3421:				 If (CondRefOf (_OSI, Local1))
Error	4096 -												  syntax error, unexpected PARSEOP_IF ^

/Users/bruce/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl  3459:				 Else			  0x0072,			 // Range Maximum
Error	4096 -								  syntax error, unexpected PARSEOP_ELSE, expecting $end ^

ASL Input:  /Users/bruce/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl - 5741 lines, 176286 bytes, 904 keywords
Compilation complete. 3 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

 

I really need some guidance. My DSDT.dsl so far is...

 

/*
* Intel ACPI Component Architecture
* AML Disassembler version 20091214
*
* Disassembly of ./dsdt.dat, Mon Jul 12 07:55:19 2010
*
*
* Original Table Header:
*	 Signature		"DSDT"
*	 Length		   0x00004A49 (19017)
*	 Revision		 0x01 **** ACPI 1.0, no 64-bit math support
*	 Checksum		 0x59
*	 OEM ID		   "1AAAA"
*	 OEM Table ID	 "1AAAA000"
*	 OEM Revision	 0x00000000 (0)
*	 Compiler ID	  "INTL"
*	 Compiler Version 0x20051117 (537202967)
*/
DefinitionBlock ("./dsdt.aml", "DSDT", 1, "1AAAA", "1AAAA000", 0x00000000)
{
Name (OSTY, Ones)
OperationRegion (ACMS, SystemIO, 0x72, 0x02)
Field (ACMS, ByteAcc, NoLock, Preserve)
{
	ICMS,   8,
	DCMS,   8
}

IndexField (ICMS, DCMS, ByteAcc, NoLock, Preserve)
{
			Offset (0x01),
			Offset (0x04),
			Offset (0x08),
	BS_A,   32
}

OperationRegion (CFGS, SystemMemory, BS_A, 0x80)
Field (CFGS, AnyAcc, NoLock, Preserve)
{
			Offset (0x04),
	PCIE,   32,
	HPBS,   32,
			Offset (0x31),
	TPMR,   1,
	STHP,   1,
	SHPG,   1,
	OSCF,   1
}

OperationRegion (CMPT, SystemIO, 0x0C50, 0x03)
Field (CMPT, ByteAcc, NoLock, Preserve)
{
	CMID,   8,
		,   6,
	GPCT,   2,
	GP0I,   1,
	GP1I,   1,
	GP2I,   1,
	GP3I,   1,
	GP4I,   1,
	GP5I,   1,
	GP6I,   1,
	GP7I,   1
}

OperationRegion (PCFG, SystemMemory, PCIE, 0x02000000)
Field (PCFG, AnyAcc, NoLock, Preserve)
{
			Offset (0xA0004),
	SMIE,   1,
	SMME,   1,
			Offset (0xA0008),
	RVID,   8,
			Offset (0xA0014),
	SMB1,   32,
			Offset (0xA0050),
		,   10,
	GP51,   1,
			Offset (0xA0056),
		,   11,
	GP64,   1,
			Offset (0xA0082),
		,   2,
	G31O,   1,
			Offset (0xA00E1),
		,   6,
	ACIR,   1,
			Offset (0xA4004),
	PCMD,   2
}

OperationRegion (PMIO, SystemIO, 0x0CD6, 0x02)
Field (PMIO, ByteAcc, NoLock, Preserve)
{
	INPM,   8,
	DAPM,   8
}

IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve)
{
		,   1,
	TM1E,   1,
	TM2E,   1,
			Offset (0x01),
		,   1,
	TM1S,   1,
	TM2S,   1,
			Offset (0x04),
		,   7,
	SLPS,   1,
			Offset (0x07),
		,   7,
	CLPS,   1,
			Offset (0x10),
		,   6,
	PWDE,   1,
			Offset (0x1C),
		,   3,
	MKME,   1,
	PI3E,   1,
	PI2E,   1,
	PI1E,   1,
	PI0E,   1,
		,   3,
	MKMS,   1,
	PI3S,   1,
	PI2S,   1,
	PI1S,   1,
	PI0S,   1,
			Offset (0x20),
	P1EB,   16,
			Offset (0x36),
		,   6,
	GV6P,   1,
	GV7P,   1,
		,   3,
	GM0P,   1,
	GM1P,   1,
	GM2P,   1,
	GM3P,   1,
	GM8P,   1,
		,   1,
	GM4P,   1,
	GM5P,   1,
		,   1,
	GM6P,   1,
	GM7P,   1,
			Offset (0x3B),
	GPX0,   1,
	GPX4,   1,
	GPX5,   1,
	GPX1,   1,
	GPX6,   1,
	GPX7,   1,
	GPX2,   1,
	GPX3,   1,
			Offset (0x55),
	SPRE,   1,
		,   1,
		,   1,
	EPNM,   1,
	DPPF,   1,
	FNGS,   1,
			Offset (0x61),
		,   7,
	R617,   1,
			Offset (0x65),
		,   4,
	RSTU,   1,
			Offset (0x68),
		,   3,
	TPDE,   1,
		,   1,
			Offset (0x7C),
		,   2,
	BLNK,   2,
			Offset (0x92),
		,   7,
	GV7S,   1,
			Offset (0x96),
	GP8I,   1,
	GP9I,   1,
			Offset (0x9A),
		,   7,
	HECO,   1,
			Offset (0xA8),
	PI4E,   1,
	PI5E,   1,
	PI6E,   1,
	PI7E,   1,
			Offset (0xA9),
	PI4S,   1,
	PI5S,   1,
	PI6S,   1,
	PI7S,   1
}

OperationRegion (P1E0, SystemIO, P1EB, 0x04)
Field (P1E0, ByteAcc, NoLock, Preserve)
{
		,   14,
	PEWS,   1,
	WSTA,   1,
		,   14,
	PEWD,   1
}

Method (SPTS, 1, NotSerialized)
{
	If (LEqual (Arg0, 0x03))
	{
		Store (Zero, RSTU)
	}

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

	If (LEqual (Arg0, 0x02))
	{
		Store (Zero, BLNK)
	}

	If (LEqual (Arg0, 0x03))
	{
		Store (One, BLNK)
	}

	Store (One, CLPS)
	Store (One, SLPS)
	Store (Zero, PWDE)
}

Method (SWAK, 1, NotSerialized)
{
	Store (One, HECO)
	If (LEqual (Arg0, 0x03))
	{
		Store (One, RSTU)
	}

	Store (PEWS, PEWS)
	Store (0x03, BLNK)
}

Method (TRMD, 1, NotSerialized)
{
	Store (Arg0, SPRE)
	Store (Arg0, TPDE)
}

Name (DP80, 0x80)
Name (DP90, 0x90)
Name (SPIO, 0x2E)
Name (IOPB, 0x0E00)
Name (IOPL, 0x10)
Name (IOEB, 0x0E80)
Name (IOEL, 0x10)
Name (IOGB, 0x0F40)
Name (IOGL, 0x10)
Name (IOSB, 0x0A30)
Name (IOSL, 0x10)
Name (UMRS, One)
Name (APIC, One)
Name (PMBS, 0x0800)
Name (PMLN, 0xA0)
Name (GPBS, Zero)
Name (GPLN, Zero)
Name (SMBB, 0x0B20)
Name (SMBL, 0x10)
Name (PCIB, 0xE0000000)
Name (PCIL, 0x10000000)
OperationRegion (BIOS, SystemMemory, 0x7FEBE064, 0xFF)
Field (BIOS, ByteAcc, NoLock, Preserve)
{
	SS1,	1,
	SS2,	1,
	SS3,	1,
	SS4,	1,
			Offset (0x01),
	IOST,   16,
	TOPM,   32,
	ROMS,   32,
	MG1B,   32,
	MG1L,   32,
	MG2B,   32,
	MG2L,   32,
			Offset (0x1C),
	DMAX,   8,
	HPTA,   32,
	CPB0,   32,
	CPB1,   32,
	CPB2,   32,
	CPB3,   32,
	ASSB,   8,
	AOTB,   8,
	AAXB,   32,
	SMIF,   8,
	DTSE,   8,
	DTS1,   8,
	DTS2,   8,
	MPEN,   8,
	TPMF,   8,
	MG3B,   32,
	MG3L,   32,
	MH1B,   32,
	MH1L,   32
}

Method (RRIO, 4, NotSerialized)
{
	Store ("RRIO", Debug)
}

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

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

	Store (Arg0, PICM)
}

Name (OSVR, Ones)
Method (OSFL, 0, NotSerialized)
{
	If (LNotEqual (OSVR, Ones))
	{
		Return (OSVR)
	}

	If (LEqual (PICM, Zero))
	{
		Store (0xAC, DBG8)
	}

	Store (One, OSVR)
	If (CondRefOf (_OSI, Local1))
	{
		If (_OSI ("Windows 2000"))
		{
			Store (0x04, OSVR)
		}

		If (_OSI ("Windows 2001"))
		{
			Store (Zero, OSVR)
		}

		If (_OSI ("Windows 2001 SP1"))
		{
			Store (Zero, OSVR)
		}

		If (_OSI ("Windows 2001 SP2"))
		{
			Store (Zero, OSVR)
		}

		If (_OSI ("Windows 2001.1"))
		{
			Store (Zero, OSVR)
		}

		If (_OSI ("Windows 2001.1 SP1"))
		{
			Store (Zero, OSVR)
		}

		If (_OSI ("Windows 2006"))
		{
			Store (Zero, OSVR)
		}
	}
	Else
	{
		If (MCTH (_OS, "Microsoft Windows NT"))
		{
			Store (0x04, OSVR)
		}
		Else
		{
			If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
			{
				Store (0x02, OSVR)
			}

			If (MCTH (_OS, "Linux"))
			{
				Store (0x03, OSVR)
			}
		}
	}

	Return (OSVR)
}

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

	Add (SizeOf (Arg0), One, Local0)
	Name (BUF0, Buffer (Local0) {})
	Name (BUF1, Buffer (Local0) {})
	Store (Arg0, BUF0)
	Store (Arg1, BUF1)
	While (Local0)
	{
		Decrement (Local0)
		If (LNotEqual (DerefOf (Index (BUF0, Local0)), DerefOf (Index (
			BUF1, Local0))))
		{
			Return (Zero)
		}
	}

	Return (One)
}

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

	Return (PRWP)
}

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

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

Scope (_PR)
{
	Processor (P001, 0x01, 0x00000810, 0x06) {}
	Processor (P002, 0x02, 0x00000000, 0x00) {}
	Processor (P003, 0x03, 0x00000000, 0x00) {}
	Processor (P004, 0x04, 0x00000000, 0x00) {}
	Alias (P001, CPU1)
	Alias (P002, CPU2)
	Alias (P003, CPU3)
	Alias (P004, CPU4)
}

Scope (_SB)
{
	Name (PR00, Package (0x25)
	{
		Package (0x04)
		{
			0x0002FFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0002FFFF,
			One,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0002FFFF,
			0x02,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0002FFFF,
			0x03,
			LNKB,
			Zero
		},

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

		Package (0x04)
		{
			0x0003FFFF,
			One,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0003FFFF,
			0x02,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0003FFFF,
			0x03,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0004FFFF,
			Zero,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0004FFFF,
			One,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0004FFFF,
			0x02,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0004FFFF,
			0x03,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			Zero,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			One,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x02,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x03,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0006FFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0006FFFF,
			One,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0006FFFF,
			0x02,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0006FFFF,
			0x03,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			Zero,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			One,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x02,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x03,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0014FFFF,
			Zero,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0014FFFF,
			One,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0014FFFF,
			0x02,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0014FFFF,
			0x03,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0012FFFF,
			Zero,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0012FFFF,
			One,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0012FFFF,
			0x02,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0012FFFF,
			0x03,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0013FFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0013FFFF,
			One,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0013FFFF,
			0x02,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0013FFFF,
			0x03,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0x0011FFFF,
			Zero,
			LNKG,
			Zero
		}
	})
	Name (AR00, Package (0x25)
	{
		Package (0x04)
		{
			0x0002FFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0002FFFF,
			One,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0002FFFF,
			0x02,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0002FFFF,
			0x03,
			Zero,
			0x11
		},

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

		Package (0x04)
		{
			0x0003FFFF,
			One,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0003FFFF,
			0x02,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0003FFFF,
			0x03,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0004FFFF,
			Zero,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0004FFFF,
			One,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0004FFFF,
			0x02,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0004FFFF,
			0x03,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0005FFFF,
			Zero,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0005FFFF,
			One,
			Zero,
			0x12
		},

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

		Package (0x04)
		{
			0x0005FFFF,
			0x03,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0006FFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0006FFFF,
			One,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0006FFFF,
			0x02,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0006FFFF,
			0x03,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0007FFFF,
			Zero,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0007FFFF,
			One,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x02,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x03,
			Zero,
			0x12
		},

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

		Package (0x04)
		{
			0x0014FFFF,
			One,
			Zero,
			0x11
		},

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

		Package (0x04)
		{
			0x0014FFFF,
			0x03,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0012FFFF,
			Zero,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0012FFFF,
			One,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0012FFFF,
			0x02,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0012FFFF,
			0x03,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0013FFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0013FFFF,
			One,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0013FFFF,
			0x02,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0013FFFF,
			0x03,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0x0011FFFF,
			Zero,
			Zero,
			0x16
		}
	})
	Name (PR01, Package (0x04)
	{
		Package (0x04)
		{
			0x0005FFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			One,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x02,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x03,
			LNKB,
			Zero
		}
	})
	Name (AR01, Package (0x04)
	{
		Package (0x04)
		{
			0x0005FFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0x0005FFFF,
			One,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x02,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0x0005FFFF,
			0x03,
			Zero,
			0x11
		}
	})
	Name (PR02, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKD,
			Zero
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKB,
			Zero
		}
	})
	Name (AR02, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x13
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x11
		}
	})
	Name (PR03, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKC,
			Zero
		}
	})
	Name (AR03, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x12
		}
	})
	Name (PR04, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKB,
			Zero
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKD,
			Zero
		}
	})
	Name (AR04, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x11
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x13
		}
	})
	Name (PR05, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKC,
			Zero
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKA,
			Zero
		}
	})
	Name (AR05, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x12
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x10
		}
	})
	Name (PR06, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKC,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKD,
			Zero
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKB,
			Zero
		}
	})
	Name (AR06, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x12
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x13
		},

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

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x11
		}
	})
	Name (PR07, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKD,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKA,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			LNKB,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKC,
			Zero
		}
	})
	Name (AR07, Package (0x04)
	{
		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x13
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x10
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			Zero,
			0x11
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x12
		}
	})
	Name (PR0C, Package (0x0C)
	{
		Package (0x04)
		{
			0x0007FFFF,
			Zero,
			LNKG,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			One,
			LNKH,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x02,
			LNKE,
			Zero
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x03,
			LNKF,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			Zero,
			LNKE,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			LNKF,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			LNKG,
			Zero
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			LNKH,
			Zero
		},

		Package (0x04)
		{
			0x0001FFFF,
			Zero,
			LNKF,
			Zero
		},

		Package (0x04)
		{
			0x0001FFFF,
			One,
			LNKG,
			Zero
		},

		Package (0x04)
		{
			0x0001FFFF,
			0x02,
			LNKH,
			Zero
		},

		Package (0x04)
		{
			0x0001FFFF,
			0x03,
			LNKE,
			Zero
		}
	})
	Name (AR0C, Package (0x0C)
	{
		Package (0x04)
		{
			0x0007FFFF,
			Zero,
			Zero,
			0x16
		},

		Package (0x04)
		{
			0x0007FFFF,
			One,
			Zero,
			0x17
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x02,
			Zero,
			0x14
		},

		Package (0x04)
		{
			0x0007FFFF,
			0x03,
			Zero,
			0x15
		},

		Package (0x04)
		{
			0xFFFF,
			Zero,
			Zero,
			0x14
		},

		Package (0x04)
		{
			0xFFFF,
			One,
			Zero,
			0x15
		},

		Package (0x04)
		{
			0xFFFF,
			0x02,
			Zero,
			0x16
		},

		Package (0x04)
		{
			0xFFFF,
			0x03,
			Zero,
			0x17
		},

		Package (0x04)
		{
			0x0001FFFF,
			Zero,
			Zero,
			0x15
		},

		Package (0x04)
		{
			0x0001FFFF,
			One,
			Zero,
			0x16
		},

		Package (0x04)
		{
			0x0001FFFF,
			0x02,
			Zero,
			0x17
		},

		Package (0x04)
		{
			0x0001FFFF,
			0x03,
			Zero,
			0x14
		}
	})
	Name (PRSA, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{4,7,10,11,12,14,15}
	})
	Alias (PRSA, PRSB)
	Alias (PRSA, PRSC)
	Alias (PRSA, PRSD)
	Alias (PRSA, PRSE)
	Alias (PRSA, PRSF)
	Alias (PRSA, PRSG)
	Alias (PRSA, PRSH)
	Device (PCI0)
	{
		Name (_HID, EisaId ("PNP0A03"))
		Name (_ADR, 0x00180000)
		Method (^BN00, 0, NotSerialized)
		{
			Return (Zero)
		}

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

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

			Return (PR00)
		}

		Method (NPTS, 1, NotSerialized)
		{
		}

		Method (NWAK, 1, NotSerialized)
		{
		}

		Device (RS48)
		{
			Name (_ADR, Zero)
			Method (NB2S, 1, NotSerialized)
			{
			}

			Method (NB2W, 1, NotSerialized)
			{
			}
		}

		Device (P0P1)
		{
			Name (_ADR, 0x00010000)
			Method (_PRT, 0, NotSerialized)
			{
				If (PICM)
				{
					Return (AR01)
				}

				Return (PR01)
			}
		}

		Device (PCE2)
		{
			Name (_ADR, 0x00020000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR02)
			}
		}

		Device (PCE3)
		{
			Name (_ADR, 0x00030000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR03)
			}
		}

		Device (PCE4)
		{
			Name (_ADR, 0x00040000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR04)
			}
		}

		Device (PCE5)
		{
			Name (_ADR, 0x00050000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR05)
			}
		}

		Device (PCE6)
		{
			Name (_ADR, 0x00060000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR06)
			}
		}

		Device (PCE7)
		{
			Name (_ADR, 0x00070000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x18, 0x04))
			}

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

				Return (PR07)
			}
		}

		Device (SMBS)
		{
			Name (_ADR, 0x00140000)
			OperationRegion (SMBS, PCI_Config, Zero, 0x0100)
			Field (SMBS, AnyAcc, NoLock, Preserve)
			{
						Offset (0x08),
				REV,	8
			}

			OperationRegion (WIDE, PCI_Config, 0xAD, One)
			Field (WIDE, AnyAcc, NoLock, Preserve)
			{
				DUM1,   4,
				SOPT,   1
			}
		}

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

			Method (GETT, 1, NotSerialized)
			{
				Store (And (Arg0, 0x0F), Local0)
				Store (ShiftRight (Arg0, 0x04), Local1)
				Return (Multiply (0x1E, Add (Add (Local0, One), Add (Local1,
					One))))
			}

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

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

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

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

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

				If (And (FLAG, 0x04))
				{
					Store (Match (UDMT, MLE, DMA1, MTR, Zero, Zero), Local0)
					Divide (Local0, 0x07, Local0)
					Or (UDMX, ShiftLeft (Local0, 0x04), UDMX)
					Or (UDCX, 0x02, UDCX)
				}
				Else
				{
					If (LNotEqual (DMA1, Ones))
					{
						Store (Match (MDMT, MLE, DMA1, MTR, Zero, Zero), Local0)
						Store (DerefOf (Index (MDTR, Local0)), MDT1)
					}
				}

				Return (BUF)
			}

			Method (GTF, 2, NotSerialized)
			{
				CreateByteField (Arg1, Zero, MDT1)
				CreateByteField (Arg1, One, MDT0)
				CreateByteField (Arg1, 0x02, PIMX)
				CreateByteField (Arg1, 0x03, UDCX)
				CreateByteField (Arg1, 0x04, UDMX)
				If (LEqual (Arg0, 0xA0))
				{
					Store (And (PIMX, 0x0F), Local0)
					Store (MDT0, Local1)
					And (UDCX, One, Local2)
					Store (And (UDMX, 0x0F), Local3)
				}
				Else
				{
					Store (ShiftRight (PIMX, 0x04), Local0)
					Store (MDT1, Local1)
					And (UDCX, 0x02, Local2)
					Store (ShiftRight (UDMX, 0x04), Local3)
				}

				Name (BUF, Buffer (0x15)
				{
					/* 0000 */	0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x03,
					/* 0008 */	0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x00, 0x00,
					/* 0010 */	0x00, 0x00, 0x00, 0x00, 0xF5
				})
				CreateByteField (BUF, One, PMOD)
				CreateByteField (BUF, 0x08, DMOD)
				CreateByteField (BUF, 0x05, CMDA)
				CreateByteField (BUF, 0x0C, CMDB)
				CreateByteField (BUF, 0x13, CMDC)
				Store (Arg0, CMDA)
				Store (Arg0, CMDB)
				Store (Arg0, CMDC)
				Or (Local0, 0x08, PMOD)
				If (Local2)
				{
					Or (Local3, 0x40, DMOD)
				}
				Else
				{
					Store (Match (MDMT, MLE, GETT (Local1), MTR, Zero, Zero), Local4)
					If (LLess (Local4, 0x03))
					{
						Or (0x20, Local4, DMOD)
					}
				}

				Return (BUF)
			}

			Device (PRID)
			{
				Name (_ADR, Zero)
				Method (_GTM, 0, NotSerialized)
				{
					Name (BUF, Buffer (0x07)
					{
						0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
					})
					CreateWordField (BUF, Zero, VPIT)
					CreateWordField (BUF, 0x02, VMDT)
					CreateByteField (BUF, 0x04, VPIC)
					CreateByteField (BUF, 0x05, VUDC)
					CreateByteField (BUF, 0x06, VUDM)
					If (LOr (LGreaterEqual (^^^SMBS.REV, 0x3A), ^^^SMBS.SOPT))
					{
						Store (PPIT, VPIT)
						Store (PMDT, VMDT)
						Store (PPIC, VPIC)
						Store (PUDC, VUDC)
						Store (PUDM, VUDM)
					}
					Else
					{
						Store (SPIT, VPIT)
						Store (SMDT, VMDT)
						Store (SPIC, VPIC)
						Store (SUDC, VUDC)
						Store (SUDM, VUDM)
					}

					Return (GTM (BUF))
				}

				Method (_STM, 3, NotSerialized)
				{
					Name (BUF, Buffer (0x07)
					{
						0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
					})
					CreateWordField (BUF, Zero, VPIT)
					CreateWordField (BUF, 0x02, VMDT)
					CreateByteField (BUF, 0x04, VPIM)
					CreateByteField (BUF, 0x05, VUDC)
					CreateByteField (BUF, 0x06, VUDM)
					Store (STM (Arg0, Arg1, Arg2), BUF)
					If (LOr (LGreaterEqual (^^^SMBS.REV, 0x3A), ^^^SMBS.SOPT))
					{
						Store (VPIT, PPIT)
						Store (VMDT, PMDT)
						Store (VPIM, PPIM)
						Store (VUDC, PUDC)
						Store (VUDM, PUDM)
					}
					Else
					{
						Store (VPIT, SPIT)
						Store (VMDT, SMDT)
						Store (VPIM, SPIM)
						Store (VUDC, SUDC)
						Store (VUDM, SUDM)
					}
				}

				Device (P_D0)
				{
					Name (_ADR, Zero)
					Method (_GTF, 0, NotSerialized)
					{
						Name (BUF, Buffer (0x05)
						{
							0x00, 0x00, 0x00, 0x00, 0x00
						})
						CreateWordField (BUF, Zero, VMDT)
						CreateByteField (BUF, 0x02, VPIM)
						CreateByteField (BUF, 0x03, VUDC)
						CreateByteField (BUF, 0x04, VUDM)
						If (LOr (LGreaterEqual (^^^^SMBS.REV, 0x3A), ^^^^SMBS.SOPT))
						{
							Store (PMDT, VMDT)
							Store (PPIM, VPIM)
							Store (PUDC, VUDC)
							Store (PUDM, VUDM)
						}
						Else
						{
							Store (SMDT, VMDT)
							Store (SPIM, VPIM)
							Store (SUDC, VUDC)
							Store (SUDM, VUDM)
						}

						Return (GTF (0xA0, BUF))
					}
				}

				Device (P_D1)
				{
					Name (_ADR, One)
					Method (_GTF, 0, NotSerialized)
					{
						Name (BUF, Buffer (0x05)
						{
							0x00, 0x00, 0x00, 0x00, 0x00
						})
						CreateWordField (BUF, Zero, VMDT)
						CreateByteField (BUF, 0x02, VPIM)
						CreateByteField (BUF, 0x03, VUDC)
						CreateByteField (BUF, 0x04, VUDM)
						If (LOr (LGreaterEqual (^^^^SMBS.REV, 0x3A), ^^^^SMBS.SOPT))
						{
							Store (PMDT, VMDT)
							Store (PPIM, VPIM)
							Store (PUDC, VUDC)
							Store (PUDM, VUDM)
						}
						Else
						{
							Store (SMDT, VMDT)
							Store (SPIM, VPIM)
							Store (SUDC, VUDC)
							Store (SUDM, VUDM)
						}

						Return (GTF (0xB0, BUF))
					}
				}
			}

			Device (SECD)
			{
				Name (_ADR, One)
				Method (_GTM, 0, NotSerialized)
				{
					Name (BUF, Buffer (0x07)
					{
						0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
					})
					CreateWordField (BUF, Zero, VPIT)
					CreateWordField (BUF, 0x02, VMDT)
					CreateByteField (BUF, 0x04, VPIC)
					CreateByteField (BUF, 0x05, VUDC)
					CreateByteField (BUF, 0x06, VUDM)
					If (LOr (LGreaterEqual (^^^SMBS.REV, 0x3A), ^^^SMBS.SOPT))
					{
						Store (SPIT, VPIT)
						Store (SMDT, VMDT)
						Store (SPIC, VPIC)
						Store (SUDC, VUDC)
						Store (SUDM, VUDM)
					}
					Else
					{
						Store (PPIT, VPIT)
						Store (PMDT, VMDT)
						Store (PPIC, VPIC)
						Store (PUDC, VUDC)
						Store (PUDM, VUDM)
					}

					Return (GTM (BUF))
				}

				Method (_STM, 3, NotSerialized)
				{
					Name (BUF, Buffer (0x07)
					{
						0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
					})
					CreateWordField (BUF, Zero, VPIT)
					CreateWordField (BUF, 0x02, VMDT)
					CreateByteField (BUF, 0x04, VPIM)
					CreateByteField (BUF, 0x05, VUDC)
					CreateByteField (BUF, 0x06, VUDM)
					Store (STM (Arg0, Arg1, Arg2), BUF)
					If (LOr (LGreaterEqual (^^^SMBS.REV, 0x3A), ^^^SMBS.SOPT))
					{
						Store (VPIT, SPIT)
						Store (VMDT, SMDT)
						Store (VPIM, SPIM)
						Store (VUDC, SUDC)
						Store (VUDM, SUDM)
					}
					Else
					{
						Store (VPIT, PPIT)
						Store (VMDT, PMDT)
						Store (VPIM, PPIM)
						Store (VUDC, PUDC)
						Store (VUDM, PUDM)
					}
				}

				Device (S_D0)
				{
					Name (_ADR, Zero)
					Method (_GTF, 0, NotSerialized)
					{
						Name (BUF, Buffer (0x05)
						{
							0x00, 0x00, 0x00, 0x00, 0x00
						})
						CreateWordField (BUF, Zero, VMDT)
						CreateByteField (BUF, 0x02, VPIM)
						CreateByteField (BUF, 0x03, VUDC)
						CreateByteField (BUF, 0x04, VUDM)
						If (LOr (LGreaterEqual (^^^^SMBS.REV, 0x3A), ^^^^SMBS.SOPT))
						{
							Store (SMDT, VMDT)
							Store (SPIM, VPIM)
							Store (SUDC, VUDC)
							Store (SUDM, VUDM)
						}
						Else
						{
							Store (PMDT, VMDT)
							Store (PPIM, VPIM)
							Store (PUDC, VUDC)
							Store (PUDM, VUDM)
						}

						Return (GTF (0xA0, BUF))
					}
				}

				Device (S_D1)
				{
					Name (_ADR, One)
					Method (_GTF, 0, NotSerialized)
					{
						Name (BUF, Buffer (0x05)
						{
							0x00, 0x00, 0x00, 0x00, 0x00
						})
						CreateWordField (BUF, Zero, VMDT)
						CreateByteField (BUF, 0x02, VPIM)
						CreateByteField (BUF, 0x03, VUDC)
						CreateByteField (BUF, 0x04, VUDM)
						If (LOr (LGreaterEqual (^^^^SMBS.REV, 0x3A), ^^^^SMBS.SOPT))
						{
							Store (SMDT, VMDT)
							Store (SPIM, VPIM)
							Store (SUDC, VUDC)
							Store (SUDM, VUDM)
						}
						Else
						{
							Store (PMDT, VMDT)
							Store (PPIM, VPIM)
							Store (PUDC, VUDC)
							Store (PUDM, VUDM)
						}

						Return (GTF (0xB0, BUF))
					}
				}
			}
		}

		Device (SBAZ)
		{
			Name (_ADR, 0x00140002)
			OperationRegion (PCI, PCI_Config, Zero, 0x0100)
			Field (PCI, AnyAcc, NoLock, Preserve)
			{
						Offset (0x42),
				DNSP,   1,
				DNSO,   1,
				ENSR,   1
			}

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

		Device (SBRG)
		{
			Name (_ADR, 0x00140003)
			OperationRegion (LPCS, PCI_Config, Zero, 0x0100)
			Field (LPCS, AnyAcc, NoLock, Preserve)
			{
						Offset (0x40),
					,   7,
				ECEN,   1,
						Offset (0xA4),
				ECAD,   16
			}

			Name (ECIN, Zero)
			Mutex (ECMU, 0x00)
			Mutex (MLMU, 0x00)
			If (ECEN)
			{
				And (ECAD, 0xFFFE, ECIN)
				OperationRegion (ECBP, SystemIO, ECIN, 0x02)
				Field (ECBP, ByteAcc, NoLock, Preserve)
				{
					BPIO,   8
				}

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

				IndexField (IND, DAT, ByteAcc, NoLock, Preserve)
				{
							Offset (0x07),
					LDNM,   8,
							Offset (0x22),
					POW,	8,
							Offset (0x30),
					ACT,	1,
							Offset (0x60),
					IOBH,   8,
					IOBL,   8,
							Offset (0x70),
					INT,	4
				}

				Method (CFG, 1, NotSerialized)
				{
					Store (0x5A, BPIO)
					Store (0x5A, BPIO)
					Store (Arg0, LDNM)
				}

				Method (XCFG, 0, NotSerialized)
				{
					Store (0xA5, BPIO)
				}

				Method (STA, 1, NotSerialized)
				{
					Acquire (ECMU, 0x5000)
					CFG (Arg0)
					Store (Zero, Local1)
					If (ACT)
					{
						Store (0x0F, Local1)
					}

					If (LEqual (IND, 0xFF))
					{
						Store (Zero, Local1)
					}

					XCFG ()
					Release (ECMU)
					Return (Local1)
				}

				Method (RDMB, 1, NotSerialized)
				{
					Acquire (ECMU, 0x1388)
					Acquire (MLMU, 0x1388)
					CFG (0x05)
					Name (IOBA, Zero)
					Store (IOBH, IOBA)
					ShiftLeft (IOBA, 0x08, IOBA)
					Or (IOBA, IOBL, IOBA)
					OperationRegion (MLIO, SystemIO, IOBA, 0x02)
					Field (MLIO, ByteAcc, NoLock, Preserve)
					{
						MLIN,   8,
						MLDA,   8
					}

					Store (Arg0, MLIN)
					Return (MLDA)
					Release (MLMU)
					Release (ECMU)
				}

				Method (WRMB, 2, NotSerialized)
				{
					Acquire (ECMU, 0x1388)
					Acquire (MLMU, 0x1388)
					CFG (0x05)
					Name (IOBA, Zero)
					Store (IOBH, IOBA)
					ShiftLeft (IOBA, 0x08, IOBA)
					Or (IOBA, IOBL, IOBA)
					OperationRegion (MLIO, SystemIO, IOBA, 0x02)
					Field (MLIO, ByteAcc, NoLock, Preserve)
					{
						MLIN,   8,
						MLDA,   8
					}

					Store (Arg0, MLIN)
					Store (Arg1, MLDA)
					Release (MLMU)
					Release (ECMU)
				}

				Name (KBWF, One)
				Name (MSWF, One)
				Name (IRWF, One)
				Device (PSKE)
				{
					Name (_HID, EisaId ("PNP0303"))
					Name (_CID, EisaId ("PNP030B"))
					Method (_STA, 0, NotSerialized)
					{
						Store (Zero, Local1)
						Store (STA (0x07), Local1)
						Return (Local1)
					}

					Name (_CRS, ResourceTemplate ()
					{
						IO (Decode16,
							0x0060,			 // Range Minimum
							0x0060,			 // Range Maximum
							0x00,			   // Alignment
							0x01,			   // Length
							)
						IO (Decode16,
							0x0064,			 // Range Minimum
							0x0064,			 // Range Maximum
							0x00,			   // Alignment
							0x01,			   // Length
							)
						IRQNoFlags ()
							{1}
					})
					Method (_PRW, 0, NotSerialized)
					{
						Return (GPRW (0x03, 0x04))
					}

					Method (_PSW, 1, NotSerialized)
					{
						If (Arg0)
						{
							Store (One, KBWF)
						}
						Else
						{
							Store (Zero, KBWF)
						}
					}
				}

				Device (PSMS)
				{
					Name (_HID, EisaId ("PNP0F03"))
					Name (_CID, EisaId ("PNP0F13"))
					Method (_STA, 0, NotSerialized)
					{
						Store (Zero, Local1)
						Store (STA (0x07), Local1)
						Return (Local1)
					}

					Name (_CRS, ResourceTemplate ()
					{
						IRQNoFlags ()
							{12}
					})
					Method (_PRW, 0, NotSerialized)
					{
						Return (GPRW (0x03, 0x04))
					}

					Method (_PSW, 1, NotSerialized)
					{
						If (Arg0)
						{
							Store (One, MSWF)
						}
						Else
						{
							Store (Zero, MSWF)
						}
					}
				}

				Method (KWEN, 0, NotSerialized)
				{
					WRMB (0x81, Zero)
					WRMB (0x82, One)
					WRMB (0x80, Zero)
					WRMB (0xA0, 0x95)
				}

				Method (KWDS, 0, NotSerialized)
				{
					WRMB (0x81, Zero)
					WRMB (0x82, Zero)
					WRMB (0x80, Zero)
					WRMB (0xA0, 0x95)
				}

				Method (MWEN, 0, NotSerialized)
				{
					WRMB (0x81, One)
					WRMB (0x82, One)
					WRMB (0x80, Zero)
					WRMB (0xA0, 0x95)
				}

				Method (MWDS, 0, NotSerialized)
				{
					WRMB (0x81, One)
					WRMB (0x82, Zero)
					WRMB (0x80, Zero)
					WRMB (0xA0, 0x95)
				}

				Device (ECIR)
				{
					Name (_HID, EisaId ("AMDC001"))
					Method (_STA, 0, NotSerialized)
					{
						Store (Zero, Local1)
						If (LEqual (OSTY, 0x06))
						{
							Store (STA (0x05), Local1)
						}

						Return (Local1)
					}

					Method (_CRS, 0, NotSerialized)
					{
						Name (RSRC, ResourceTemplate ()
						{
							IO (Decode16,
								0x0000,			 // Range Minimum
								0x0000,			 // Range Maximum
								0x08,			   // Alignment
								0x08,			   // Length
								_Y00)
							IRQNoFlags (_Y01)
								{}
						})
						CreateByteField (RSRC, \_SB.PCI0.SBRG.ECIR._CRS._Y00._MIN, IO1)
						CreateByteField (RSRC, 0x03, IO2)
						CreateByteField (RSRC, \_SB.PCI0.SBRG.ECIR._CRS._Y00._MAX, IO3)
						CreateByteField (RSRC, 0x05, IO4)
						CreateWordField (RSRC, \_SB.PCI0.SBRG.ECIR._CRS._Y01._INT, IRQV)
						Acquire (ECMU, 0x1388)
						CFG (0x05)
						If (ACT)
						{
							Store (IOBL, IO1)
							Store (IOBH, IO2)
							Store (IOBL, IO3)
							Store (IOBH, IO4)
							Store (One, Local0)
							ShiftLeft (Local0, INT, IRQV)
						}

						XCFG ()
						Release (ECMU)
						Return (RSRC)
					}

					Name (_PRS, ResourceTemplate ()
					{
						StartDependentFn (0x00, 0x00)
						{
							IO (Decode16,
								0x0550,			 // Range Minimum
								0x0550,			 // Range Maximum
								0x01,			   // Alignment
								0x08,			   // Length
								)
							IRQ (Edge, ActiveHigh, Shared, )
								{5}
						}
						StartDependentFnNoPri ()
						{
							IO (Decode16,
								0x0650,			 // Range Minimum
								0x0650,			 // Range Maximum
								0x01,			   // Alignment
								0x08,			   // Length
								)
							IRQ (Edge, ActiveHigh, Shared, )
								{5}
						}
						StartDependentFnNoPri ()
						{
							IO (Decode16,
								0x0550,			 // Range Minimum
								0x0550,			 // Range Maximum
								0x01,			   // Alignment
								0x08,			   // Length
								)
							IRQ (Edge, ActiveHigh, Shared, )
								{3}
						}
						StartDependentFnNoPri ()
						{
							IO (Decode16,
								0x0650,			 // Range Minimum
								0x0650,			 // Range Maximum
								0x01,			   // Alignment
								0x08,			   // Length
								)
							IRQ (Edge, ActiveHigh, Shared, )
								{3}
						}
						EndDependentFn ()
					})
					Method (_SRS, 1, NotSerialized)
					{
						CreateByteField (Arg0, 0x02, IO1)
						CreateByteField (Arg0, 0x03, IO2)
						CreateWordField (Arg0, 0x09, IRQV)
						Acquire (ECMU, 0x1388)
						CFG (0x05)
						Store (IO1, IOBL)
						Store (IO2, IOBH)
						FindSetRightBit (IRQV, Local0)
						Subtract (Local0, One, INT)
						Store (One, ACT)
						XCFG ()
						Release (ECMU)
					}

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

					Method (_PSW, 1, NotSerialized)
					{
						If (Arg0)
						{
							Store (One, IRWF)
						}
						Else
						{
							Store (Zero, IRWF)
						}
					}

					Method (IRCF, 2, NotSerialized)
					{
						Name (CONN, Zero)
						If (LEqual (Arg0, One))
						{
							Or (RVID, CONN, CONN)
							Or (0x00013200, CONN, CONN)
							Return (CONN)
						}

						If (LEqual (Arg0, 0x02))
						{
							ShiftLeft (GP64, One, CONN)
							Or (GP51, CONN, CONN)
							Return (CONN)
						}

						If (LEqual (Arg0, 0x03))
						{
							If (LEqual (Arg1, Zero))
							{
								Store (One, G31O)
							}
							Else
							{
								Store (Zero, G31O)
								Sleep (0x64)
								Store (One, G31O)
							}
						}

						If (LEqual (Arg0, 0x04))
						{
							If (LEqual (Arg1, Zero))
							{
								Store (Zero, ACIR)
							}
							Else
							{
								Store (One, ACIR)
							}
						}

						If (LOr (LEqual (Arg0, Zero), LGreater (Arg0, 0x05)))
						{
							Store (Ones, CONN)
						}

						Return (CONN)
					}
				}

				Method (PPTS, 1, NotSerialized)
				{
					If (^PSKE._STA ())
					{
						If (KBWF)
						{
							KWEN ()
						}
						Else
						{
							KWDS ()
						}
					}

					If (^PSMS._STA ())
					{
						If (MSWF)
						{
							MWEN ()
						}
						Else
						{
							MWDS ()
						}
					}
				}

				Method (WWAK, 1, NotSerialized)
				{
					If (^PSKE._STA ())
					{
						KWDS ()
					}

					If (^PSMS._STA ())
					{
						MWDS ()
					}
				}
			}

			Method (EPTS, 1, NotSerialized)
			{
				If (ECEN)
				{
					PPTS (Arg0)
				}
			}

			Method (EWAK, 1, NotSerialized)
			{
				If (ECEN)
				{
					WWAK (Arg0)
				}
			}

			Device (PIC)
			{
				Name (_HID, EisaId ("PNP0000"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0020,			 // Range Minimum
						0x0020,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x00A0,			 // Range Minimum
						0x00A0,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IRQNoFlags ()
						{2}
				})
			}

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

			Device (TMR)
			{
				Name (_HID, EisaId ("PNP0100"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0040,			 // Range Minimum
						0x0040,			 // Range Maximum
						0x00,			   // Alignment
						0x04,			   // Length
						)
					IRQNoFlags ()
						{0}
				})
			}

			Device (RTC0)
			{
				Name (_HID, EisaId ("PNP0B00"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0070,			 // Range Minimum
						0x0070,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IRQNoFlags ()
						{8}
				})
			}

			Device (SPKR)
			{
				Name (_HID, EisaId ("PNP0800"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0061,			 // Range Minimum
						0x0061,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
				})
			}

			Device (COPR)
			{
				Name (_HID, EisaId ("PNP0C04"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x00F0,			 // Range Minimum
						0x00F0,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IRQNoFlags ()
						{13}
				})
			}

			Device (UAR1)
			{
				Name (_UID, One)
				Method (_HID, 0, NotSerialized)
				{
					Return (UHID (Zero))
				}

				Method (_STA, 0, NotSerialized)
				{
					Return (DSTA (Zero))
				}

				Method (_DIS, 0, NotSerialized)
				{
					DCNT (Zero, Zero)
				}

				Method (_CRS, 0, NotSerialized)
				{
					Return (DCRS (Zero, One))
				}

				Method (_SRS, 1, NotSerialized)
				{
					DSRS (Arg0, Zero)
				}

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

				Name (CMPR, ResourceTemplate ()
				{
					StartDependentFn (0x00, 0x00)
					{
						IO (Decode16,
							0x03F8,			 // Range Minimum
							0x03F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{4}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03F8,			 // Range Minimum
							0x03F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02F8,			 // Range Minimum
							0x02F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03E8,			 // Range Minimum
							0x03E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02E8,			 // Range Minimum
							0x02E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03F8,			 // Range Minimum
							0x03F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02F8,			 // Range Minimum
							0x02F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03E8,			 // Range Minimum
							0x03E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02E8,			 // Range Minimum
							0x02E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					EndDependentFn ()
				})
			}

			Device (FDC)
			{
				Name (_HID, EisaId ("PNP0700"))
				Method (_FDE, 0, NotSerialized)
				{
					Name (FDEP, Package (0x05)
					{
						Zero,
						Zero,
						0x02,
						0x02,
						0x02
					})
					If (_STA ())
					{
						Store (One, Index (FDEP, Zero))
					}

					Return (FDEP)
				}

				Method (_STA, 0, NotSerialized)
				{
					Return (DSTA (0x03))
				}

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

				Method (_CRS, 0, NotSerialized)
				{
					DCRS (0x03, One)
					Store (IRQM, IRQE)
					Store (DMAM, DMAE)
					Store (IO11, IO21)
					Store (IO12, IO22)
					Store (0x06, LEN2)
					Add (IO21, 0x07, IO31)
					Store (IO31, IO32)
					Store (One, LEN3)
					Return (CRS2)
				}

				Method (_SRS, 1, NotSerialized)
				{
					DSRS (Arg0, 0x03)
					CreateWordField (Arg0, 0x11, IRQE)
					CreateByteField (Arg0, 0x14, DMAE)
					ENFG (CGLD (0x03))
					If (IRQE)
					{
						FindSetRightBit (IRQE, Local0)
						Subtract (Local0, One, INTR)
					}
					Else
					{
						Store (Zero, INTR)
					}

					If (DMAE)
					{
						FindSetRightBit (DMAE, Local0)
						Subtract (Local0, One, DMCH)
					}
					Else
					{
						Store (0x04, DMCH)
					}

					EXFG ()
				}

				Name (_PRS, ResourceTemplate ()
				{
					StartDependentFn (0x00, 0x00)
					{
						IO (Decode16,
							0x03F0,			 // Range Minimum
							0x03F0,			 // Range Maximum
							0x01,			   // Alignment
							0x06,			   // Length
							)
						IO (Decode16,
							0x03F7,			 // Range Minimum
							0x03F7,			 // Range Maximum
							0x01,			   // Alignment
							0x01,			   // Length
							)
						IRQNoFlags ()
							{6}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{2}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03F0,			 // Range Minimum
							0x03F0,			 // Range Maximum
							0x01,			   // Alignment
							0x06,			   // Length
							)
						IO (Decode16,
							0x03F7,			 // Range Minimum
							0x03F7,			 // Range Maximum
							0x01,			   // Alignment
							0x01,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x0370,			 // Range Minimum
							0x0370,			 // Range Maximum
							0x01,			   // Alignment
							0x06,			   // Length
							)
						IO (Decode16,
							0x0377,			 // Range Minimum
							0x0377,			 // Range Maximum
							0x01,			   // Alignment
							0x01,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					EndDependentFn ()
				})
			}

			Device (HPET)
			{
				Name (_HID, EisaId ("PNP0103"))
				Name (ATT3, ResourceTemplate ()
				{
					Memory32Fixed (ReadOnly,
						0xFED00000,		 // Address Base
						0x00000400,		 // Address Length
						)
				})
				Name (ATT4, ResourceTemplate ()
				{
				})
				Method (_CRS, 0, NotSerialized)
				{
					If (LEqual (HPBS, One))
					{
						Return (ATT3)
					}
					Else
					{
						Return (ATT4)
					}
				}

				Method (_STA, 0, NotSerialized)
				{
					If (HPBS)
					{
						Return (0x0F)
					}
					Else
					{
						Return (Zero)
					}
				}
			}

			If (CondRefOf (_OSI, Local1))
			{
				Store (One, HPBS)
				If (_OSI ("Windows 2000"))
				{
					Store (Zero, HPBS)
				}

				If (_OSI ("Windows 2001"))
				{
					Store (One, HPBS)
				}

				If (_OSI ("Windows 2001 SP1"))
				{
					Store (Zero, HPBS)
				}

				If (_OSI ("Windows 2001 SP2"))
				{
					Store (One, HPBS)
				}

				If (_OSI ("Windows 2001.1"))
				{
					Store (Zero, HPBS)
				}

				If (_OSI ("Windows 2001.1 SP1"))
				{
					Store (One, HPBS)
				}

				If (_OSI ("Windows 2006"))
				{
					Store (One, HPBS)
				}
			}
			Else
			{
				If (MCTH (_OS, "Microsoft Windows NT"))
				{
					Store (Zero, HPBS)
				}
				Else
				{
					If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
					{
						Store (Zero, HPBS)
					}

					If (MCTH (_OS, "Linux"))
					{
						Store (Zero, HPBS)
					}
				}
			}

			Device (^PCIE)
			{
				Name (_HID, EisaId ("PNP0C02"))
				Name (_UID, 0x11)
				Name (CRS, ResourceTemplate ()
				{
					Memory32Fixed (ReadOnly,
						0xE0000000,		 // Address Base
						0x10000000,		 // Address Length
						_Y02)
				})
				Method (_CRS, 0, NotSerialized)
				{
					CreateDWordField (CRS, \_SB.PCI0.PCIE._Y02._BAS, BAS1)
					CreateDWordField (CRS, \_SB.PCI0.PCIE._Y02._LEN, LEN1)
					Store (PCIB, BAS1)
					Store (PCIL, LEN1)
					Return (CRS)
				}
			}

			Device (OMSC)
			{
				Name (_HID, EisaId ("PNP0C02"))
				Name (_UID, Zero)
				Name (CRS, ResourceTemplate ()
				{
					Memory32Fixed (ReadOnly,
						0x00000000,		 // Address Base
						0x00000000,		 // Address Length
						_Y03)
					Memory32Fixed (ReadOnly,
						0x00000000,		 // Address Base
						0x00000000,		 // Address Length
						_Y04)
				})
				Method (_CRS, 0, NotSerialized)
				{
					If (APIC)
					{
						CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y03._LEN, ML01)
						CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y03._BAS, MB01)
						CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y04._LEN, ML02)
						CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y04._BAS, MB02)
						Store (0xFEC00000, MB01)
						Store (0x1000, ML01)
						Store (0xFEE00000, MB02)
						Store (0x1000, ML02)
					}

					Return (CRS)
				}
			}

			Device (^^RMEM)
			{
				Name (_HID, EisaId ("PNP0C01"))
				Name (_UID, One)
				Name (CRS, ResourceTemplate ()
				{
					Memory32Fixed (ReadWrite,
						0x00000000,		 // Address Base
						0x000A0000,		 // Address Length
						)
					Memory32Fixed (ReadOnly,
						0x00000000,		 // Address Base
						0x00000000,		 // Address Length
						_Y05)
					Memory32Fixed (ReadOnly,
						0x000E0000,		 // Address Base
						0x00020000,		 // Address Length
						_Y06)
					Memory32Fixed (ReadWrite,
						0x00100000,		 // Address Base
						0x00000000,		 // Address Length
						_Y07)
					Memory32Fixed (ReadOnly,
						0x00000000,		 // Address Base
						0x00000000,		 // Address Length
						_Y08)
				})
				Method (_CRS, 0, NotSerialized)
				{
					CreateDWordField (CRS, \_SB.RMEM._Y05._BAS, BAS1)
					CreateDWordField (CRS, \_SB.RMEM._Y05._LEN, LEN1)
					CreateDWordField (CRS, \_SB.RMEM._Y06._BAS, BAS2)
					CreateDWordField (CRS, \_SB.RMEM._Y06._LEN, LEN2)
					CreateDWordField (CRS, \_SB.RMEM._Y07._LEN, LEN3)
					CreateDWordField (CRS, \_SB.RMEM._Y08._BAS, BAS4)
					CreateDWordField (CRS, \_SB.RMEM._Y08._LEN, LEN4)
					If (OSFL ()) {}
					Else
					{
						If (MG1B)
						{
							If (LGreater (MG1B, 0x000C0000))
							{
								Store (0x000C0000, BAS1)
								Subtract (MG1B, BAS1, LEN1)
							}
						}
						Else
						{
							Store (0x000C0000, BAS1)
							Store (0x00020000, LEN1)
						}

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

					Subtract (MG2B, 0x00100000, LEN3)
					Store (MH1B, BAS4)
					Subtract (Zero, BAS4, LEN4)
					Return (CRS)
				}
			}

			Device (RMSC)
			{
				Name (_HID, EisaId ("PNP0C02"))
				Name (_UID, 0x10)
				Name (CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0010,			 // Range Minimum
						0x0010,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IO (Decode16,
						0x0022,			 // Range Minimum
						0x0022,			 // Range Maximum
						0x00,			   // Alignment
						0x1E,			   // Length
						)
					IO (Decode16,
						0x0062,			 // Range Minimum
						0x0062,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0065,			 // Range Minimum
						0x0065,			 // Range Maximum
						0x00,			   // Alignment
						0x0B,			   // Length
						)
					IO (Decode16,
						0x0072,			 // Range Minimum
						0x0072,			 // Range Maximum
						0x00,			   // Alignment
						0x0E,			   // Length
						)
					IO (Decode16,
						0x0080,			 // Range Minimum
						0x0080,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0084,			 // Range Minimum
						0x0084,			 // Range Maximum
						0x00,			   // Alignment
						0x03,			   // Length
						)
					IO (Decode16,
						0x0088,			 // Range Minimum
						0x0088,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x008C,			 // Range Minimum
						0x008C,			 // Range Maximum
						0x00,			   // Alignment
						0x03,			   // Length
						)
					IO (Decode16,
						0x0090,			 // Range Minimum
						0x0090,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IO (Decode16,
						0x00A2,			 // Range Minimum
						0x00A2,			 // Range Maximum
						0x00,			   // Alignment
						0x1E,			   // Length
						)
					IO (Decode16,
						0x00B1,			 // Range Minimum
						0x00B1,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x00E0,			 // Range Minimum
						0x00E0,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IO (Decode16,
						0x04D0,			 // Range Minimum
						0x04D0,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x040B,			 // Range Minimum
						0x040B,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x04D6,			 // Range Minimum
						0x04D6,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0C00,			 // Range Minimum
						0x0C00,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0C14,			 // Range Minimum
						0x0C14,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0C50,			 // Range Minimum
						0x0C50,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0C52,			 // Range Minimum
						0x0C52,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0C6C,			 // Range Minimum
						0x0C6C,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0C6F,			 // Range Minimum
						0x0C6F,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0CD0,			 // Range Minimum
						0x0CD0,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0CD2,			 // Range Minimum
						0x0CD2,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0CD4,			 // Range Minimum
						0x0CD4,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0CD6,			 // Range Minimum
						0x0CD6,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x0CD8,			 // Range Minimum
						0x0CD8,			 // Range Maximum
						0x00,			   // Alignment
						0x08,			   // Length
						)
					IO (Decode16,
						0x0A7A,			 // Range Minimum
						0x0A7A,			 // Range Maximum
						0x00,			   // Alignment
						0xA6,			   // Length
						)
					IO (Decode16,
						0x0B30,			 // Range Minimum
						0x0B30,			 // Range Maximum
						0x00,			   // Alignment
						0xD0,			   // Length
						)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y09)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0A)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0B)
					IO (Decode16,
						0x0900,			 // Range Minimum
						0x0900,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IO (Decode16,
						0x0910,			 // Range Minimum
						0x0910,			 // Range Maximum
						0x00,			   // Alignment
						0x10,			   // Length
						)
					IO (Decode16,
						0xFE00,			 // Range Minimum
						0xFE00,			 // Range Maximum
						0x00,			   // Alignment
						0xFF,			   // Length
						)
					Memory32Fixed (ReadOnly,
						0xFFB80000,		 // Address Base
						0x00080000,		 // Address Length
						)
					Memory32Fixed (ReadOnly,
						0xFEC10000,		 // Address Base
						0x00000020,		 // Address Length
						)
				})
				Method (_CRS, 0, NotSerialized)
				{
					CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y09._MIN, GP00)
					CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y09._MAX, GP01)
					CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y09._LEN, GP0L)
					Store (PMBS, GP00)
					Store (PMBS, GP01)
					Store (PMLN, GP0L)
					If (SMBB)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y0A._MIN, GP10)
						CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y0A._MAX, GP11)
						CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y0A._LEN, GP1L)
						Store (SMBB, GP10)
						Store (SMBB, GP11)
						Store (SMBL, GP1L)
					}

					If (GPBS)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y0B._MIN, GP20)
						CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y0B._MAX, GP21)
						CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y0B._LEN, GP2L)
						Store (GPBS, GP20)
						Store (GPBS, GP21)
						Store (GPLN, GP2L)
					}

					Return (CRS)
				}
			}

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

					Return (Zero)
				}

				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0060,			 // Range Minimum
						0x0060,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IO (Decode16,
						0x0064,			 // Range Minimum
						0x0064,			 // Range Maximum
						0x00,			   // Alignment
						0x01,			   // Length
						)
					IRQNoFlags ()
						{1}
				})
			}

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

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

					Return (Zero)
				}

				Name (M2R0, ResourceTemplate ()
				{
					IRQNoFlags ()
						{12}
				})
				Name (M2R1, ResourceTemplate ()
				{
					FixedIO (
						0x0060,			 // Address
						0x01,			   // Length
						)
					FixedIO (
						0x0064,			 // Address
						0x01,			   // Length
						)
					IRQNoFlags ()
						{12}
				})
				Method (_CRS, 0, NotSerialized)
				{
					ShiftLeft (One, 0x0A, Local0)
					If (And (IOST, Local0))
					{
						Return (M2R0)
					}
					Else
					{
						Return (M2R1)
					}
				}
			}

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

			Device (SIOR)
			{
				Name (_HID, EisaId ("PNP0C02"))
				Method (_UID, 0, NotSerialized)
				{
					Return (SPIO)
				}

				Name (CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0C)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0D)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0E)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y0F)
					IO (Decode16,
						0x0000,			 // Range Minimum
						0x0000,			 // Range Maximum
						0x00,			   // Alignment
						0x00,			   // Length
						_Y10)
				})
				Method (_CRS, 0, NotSerialized)
				{
					If (LAnd (LNotEqual (SPIO, 0x03F0), LGreater (SPIO, 0xF0)))
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0C._MIN, GP10)
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0C._MAX, GP11)
						CreateByteField (CRS, \_SB.PCI0.SBRG.SIOR._Y0C._LEN, GPL1)
						Store (SPIO, GP10)
						Store (SPIO, GP11)
						Store (0x02, GPL1)
					}

					If (IOPB)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0D._MIN, GP20)
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0D._MAX, GP21)
						CreateByteField (CRS, \_SB.PCI0.SBRG.SIOR._Y0D._LEN, GPL2)
						Store (IOPB, GP20)
						Store (IOPB, GP21)
						Store (IOPL, GPL2)
					}

					If (IOEB)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0E._MIN, GP30)
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0E._MAX, GP31)
						CreateByteField (CRS, \_SB.PCI0.SBRG.SIOR._Y0E._LEN, GPL3)
						Store (IOEB, GP30)
						Store (IOEB, GP31)
						Store (IOEL, GPL3)
					}

					If (IOGB)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0F._MIN, GP40)
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y0F._MAX, GP41)
						CreateByteField (CRS, \_SB.PCI0.SBRG.SIOR._Y0F._LEN, GPL4)
						Store (IOGB, GP40)
						Store (IOGB, GP41)
						Store (IOGL, GPL4)
					}

					If (IOSB)
					{
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y10._MIN, GP50)
						CreateWordField (CRS, \_SB.PCI0.SBRG.SIOR._Y10._MAX, GP51)
						CreateByteField (CRS, \_SB.PCI0.SBRG.SIOR._Y10._LEN, GPL5)
						Store (IOSB, GP50)
						Store (IOSB, GP51)
						Store (IOSL, GPL5)
					}

					Return (CRS)
				}
			}

			Name (DCAT, Package (0x16)
			{
				One,
				0x02,
				0x03,
				Zero,
				0xFF,
				0x08,
				0xFF,
				0xFF,
				0x09,
				0xFF,
				0xFF,
				0xFF,
				0xFF,
				0xFF,
				0xFF,
				0xFF,
				0x0A,
				0xFF,
				0xFF,
				0xFF,
				0xFF,
				0xFF
			})
			Name (IKEY, Package (0x02)
			{
				Package (0x04)
				{
					0x87,
					One,
					0x55,
					0x55
				},

				Package (0x04)
				{
					0x87,
					One,
					0x55,
					0xAA
				}
			})
			Name (KBFG, One)
			Name (MSFG, One)
			Name (UR1F, One)
			Method (ENFG, 1, NotSerialized)
			{
				Store (Zero, Local1)
				If (LEqual (SPIO, 0x2E))
				{
					Store (Zero, Local1)
				}

				If (LEqual (SPIO, 0x4E))
				{
					Store (One, Local1)
				}

				Store (Zero, Local0)
				While (LNotEqual (Local0, 0x04))
				{
					Store (DerefOf (Index (DerefOf (Index (IKEY, Local1)), Local0)),
						INDX)
					Increment (Local0)
				}

				Store (Arg0, LDN)
			}

			Method (EXFG, 0, NotSerialized)
			{
				Store (0x02, INDX)
				Store (0x02, DATA)
			}

			Method (LPTM, 1, NotSerialized)
			{
				ENFG (CGLD (Arg0))
				And (OPT0, 0x02, Local0)
				EXFG ()
				Return (Local0)
			}

			Method (UHID, 1, NotSerialized)
			{
				ENFG (CGLD (Arg0))
				And (OPT0, 0x70, Local0)
				EXFG ()
				If (Local0)
				{
					Return (0x1005D041)
				}

				Return (0x0105D041)
			}

			Method (ORF0, 2, NotSerialized)
			{
				ENFG (Arg0)
				Or (OPT0, Arg1, OPT0)
				EXFG ()
			}

			Method (ORF1, 2, NotSerialized)
			{
				ENFG (Arg0)
				Or (OPT1, Arg1, OPT1)
				EXFG ()
			}

			Method (ORF2, 2, NotSerialized)
			{
				ENFG (Arg0)
				Or (OPT2, Arg1, OPT2)
				EXFG ()
			}

			Method (ANF0, 2, NotSerialized)
			{
				ENFG (Arg0)
				And (OPT0, Arg1, OPT0)
				EXFG ()
			}

			Method (ANF2, 2, NotSerialized)
			{
				ENFG (Arg0)
				And (OPT2, Arg1, OPT2)
				EXFG ()
			}

			Method (ANF4, 2, NotSerialized)
			{
				ENFG (Arg0)
				And (OPT4, Arg1, OPT4)
				EXFG ()
			}

			Method (STF0, 2, NotSerialized)
			{
				ENFG (Arg0)
				Store (Arg1, OPT0)
				EXFG ()
			}

			Method (STF1, 2, NotSerialized)
			{
				ENFG (Arg0)
				Store (Arg1, OPT1)
				EXFG ()
			}

			Method (SIOS, 1, NotSerialized)
			{
				Store ("SIOS", Debug)
				If (LLess (Arg0, 0x05))
				{
					ENFG (0x04)
					Store (One, ACTR)
					EXFG ()
					ANF4 (0x04, 0xFC)
					If (KBFG)
					{
						ORF1 (0x04, 0x08)
						ORF0 (0x04, 0x08)
					}
					Else
					{
						ANF0 (0x04, 0xF7)
						ENFG (0x05)
						Store (Zero, ACTR)
						EXFG ()
					}

					If (MSFG)
					{
						ORF1 (0x04, 0x10)
						ORF0 (0x04, 0x10)
					}
					Else
					{
						ANF0 (0x04, 0xEF)
						ENFG (0x06)
						Store (Zero, ACTR)
						EXFG ()
					}

					ANF2 (0x04, 0xF0)
					ENFG (0x07)
					And (OP29, 0xEF, OP29)
					EXFG ()
				}
			}

			Method (SIOW, 1, NotSerialized)
			{
				ENFG (0x07)
				Store (Zero, OPT8)
				Or (OPC3, 0x02, OPC3)
				EXFG ()
				Store (One, GP27)
				Store (Zero, GP41)
				ENFG (0x07)
				Or (OPC3, 0x02, OPC3)
				EXFG ()
				Store ("SIOW", Debug)
				STF0 (0x04, Zero)
				STF1 (0x04, 0xFF)
				ENFG (0x07)
				Or (OP29, 0x10, OP29)
				EXFG ()
				ENFG (0x05)
				Or (ACTR, One, ACTR)
				EXFG ()
				ENFG (0x06)
				Or (ACTR, One, ACTR)
				EXFG ()
			}

			Method (SIOH, 0, NotSerialized)
			{
				Store ("SIOH", Debug)
			}

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

			IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
			{
						Offset (0x07),
				LDN,	8,
						Offset (0x29),
				OP29,   8,
						Offset (0x30),
				ACTR,   8,
						Offset (0x60),
				IOAH,   8,
				IOAL,   8,
				IOH2,   8,
				IOL2,   8,
						Offset (0x70),
				INTR,   8,
						Offset (0x74),
				DMCH,   8,
						Offset (0xC3),
				OPC3,   8,
						Offset (0xF0),
				OPT0,   8,
				OPT1,   8,
				OPT2,   8,
				OPT3,   8,
				OPT4,   8,
						Offset (0xF8),
				OPT8,   8
			}

			Method (PS2K._PSW, 1, NotSerialized)
			{
				If (Arg0)
				{
					Store (One, KBFG)
				}
				Else
				{
					Store (Zero, KBFG)
				}
			}

			Method (PS2M._PSW, 1, NotSerialized)
			{
				If (Arg0)
				{
					Store (One, MSFG)
				}
				Else
				{
					Store (Zero, MSFG)
				}
			}

			Method (CGLD, 1, NotSerialized)
			{
				Return (DerefOf (Index (DCAT, Arg0)))
			}

			Method (DSTA, 1, NotSerialized)
			{
				ENFG (CGLD (Arg0))
				Store (ACTR, Local0)
				EXFG ()
				If (LEqual (Local0, 0xFF))
				{
					Return (Zero)
				}

				And (Local0, One, Local0)
				Or (IOST, ShiftLeft (Local0, Arg0), IOST)
				If (Local0)
				{
					Return (0x0F)
				}
				Else
				{
					If (And (ShiftLeft (One, Arg0), IOST))
					{
						Return (0x0D)
					}
					Else
					{
						Return (Zero)
					}
				}
			}

			Method (DCNT, 2, NotSerialized)
			{
				ENFG (CGLD (Arg0))
				ShiftLeft (IOAH, 0x08, Local1)
				Or (IOAL, Local1, Local1)
				If (LAnd (LLess (DMCH, 0x04), LNotEqual (And (DMCH, 0x03,
					Local1), Zero)))
				{
					RDMA (Arg0, Arg1, Increment (Local1))
				}

				Store (Arg1, ACTR)
				RRIO (Arg0, Arg1, Local1, 0x08)
				EXFG ()
			}

			Name (CRS1, ResourceTemplate ()
			{
				IO (Decode16,
					0x0000,			 // Range Minimum
					0x0000,			 // Range Maximum
					0x01,			   // Alignment
					0x00,			   // Length
					_Y13)
				IRQNoFlags (_Y11)
					{}
				DMA (Compatibility, NotBusMaster, Transfer8, _Y12)
					{}
			})
			CreateWordField (CRS1, \_SB.PCI0.SBRG._Y11._INT, IRQM)
			CreateByteField (CRS1, \_SB.PCI0.SBRG._Y12._DMA, DMAM)
			CreateWordField (CRS1, \_SB.PCI0.SBRG._Y13._MIN, IO11)
			CreateWordField (CRS1, \_SB.PCI0.SBRG._Y13._MAX, IO12)
			CreateByteField (CRS1, \_SB.PCI0.SBRG._Y13._LEN, LEN1)
			Name (CRS2, ResourceTemplate ()
			{
				IO (Decode16,
					0x0000,			 // Range Minimum
					0x0000,			 // Range Maximum
					0x01,			   // Alignment
					0x00,			   // Length
					_Y16)
				IO (Decode16,
					0x0000,			 // Range Minimum
					0x0000,			 // Range Maximum
					0x01,			   // Alignment
					0x00,			   // Length
					_Y17)
				IRQNoFlags (_Y14)
					{6}
				DMA (Compatibility, NotBusMaster, Transfer8, _Y15)
					{2}
			})
			CreateWordField (CRS2, \_SB.PCI0.SBRG._Y14._INT, IRQE)
			CreateByteField (CRS2, \_SB.PCI0.SBRG._Y15._DMA, DMAE)
			CreateWordField (CRS2, \_SB.PCI0.SBRG._Y16._MIN, IO21)
			CreateWordField (CRS2, \_SB.PCI0.SBRG._Y16._MAX, IO22)
			CreateByteField (CRS2, \_SB.PCI0.SBRG._Y16._LEN, LEN2)
			CreateWordField (CRS2, \_SB.PCI0.SBRG._Y17._MIN, IO31)
			CreateWordField (CRS2, \_SB.PCI0.SBRG._Y17._MAX, IO32)
			CreateByteField (CRS2, \_SB.PCI0.SBRG._Y17._LEN, LEN3)
			Method (DCRS, 2, NotSerialized)
			{
				ENFG (CGLD (Arg0))
				ShiftLeft (IOAH, 0x08, IO11)
				Or (IOAL, IO11, IO11)
				Store (IO11, IO12)
				Subtract (FindSetRightBit (IO11), One, Local0)
				ShiftLeft (One, Local0, LEN1)
				If (INTR)
				{
					ShiftLeft (One, INTR, IRQM)
				}
				Else
				{
					Store (Zero, IRQM)
				}

				If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero)))
				{
					Store (Zero, DMAM)
				}
				Else
				{
					And (DMCH, 0x03, Local1)
					ShiftLeft (One, Local1, DMAM)
				}

				EXFG ()
				Return (CRS1)
			}

			Method (DSRS, 2, NotSerialized)
			{
				CreateWordField (Arg0, 0x09, IRQM)
				CreateByteField (Arg0, 0x0C, DMAM)
				CreateWordField (Arg0, 0x02, IO11)
				ENFG (CGLD (Arg1))
				ShiftLeft (IOAH, 0x08, Local1)
				Or (IOAL, Local1, Local1)
				RRIO (Arg1, Zero, Local1, 0x08)
				RRIO (Arg1, One, IO11, 0x08)
				And (IO11, 0xFF, IOAL)
				ShiftRight (IO11, 0x08, IOAH)
				If (IRQM)
				{
					FindSetRightBit (IRQM, Local0)
					Subtract (Local0, One, INTR)
				}
				Else
				{
					Store (Zero, INTR)
				}

				If (DMAM)
				{
					FindSetRightBit (DMAM, Local0)
					Subtract (Local0, One, DMCH)
				}
				Else
				{
					Store (0x04, DMCH)
				}

				EXFG ()
				DCNT (Arg1, One)
			}

			OperationRegion (GPOO, SystemIO, IOGB, 0x05)
			Field (GPOO, ByteAcc, NoLock, Preserve)
			{
				GP27,   1,
						Offset (0x01),
						Offset (0x04),
					,   3,
				GP41,   1
			}

			Device (UAR2)
			{
				Name (_UID, 0x02)
				Method (_HID, 0, NotSerialized)
				{
					Return (UHID (One))
				}

				Method (_STA, 0, NotSerialized)
				{
					Return (DSTA (One))
				}

				Method (_DIS, 0, NotSerialized)
				{
					DCNT (One, Zero)
				}

				Method (_CRS, 0, NotSerialized)
				{
					Return (DCRS (One, One))
				}

				Method (_SRS, 1, NotSerialized)
				{
					DSRS (Arg0, One)
				}

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

				Name (CMPR, ResourceTemplate ()
				{
					StartDependentFn (0x00, 0x00)
					{
						IO (Decode16,
							0x02F8,			 // Range Minimum
							0x02F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03F8,			 // Range Minimum
							0x03F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02F8,			 // Range Minimum
							0x02F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03E8,			 // Range Minimum
							0x03E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02E8,			 // Range Minimum
							0x02E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03F8,			 // Range Minimum
							0x03F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02F8,			 // Range Minimum
							0x02F8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03E8,			 // Range Minimum
							0x03E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x02E8,			 // Range Minimum
							0x02E8,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					EndDependentFn ()
				})
			}

			Device (LPTE)
			{
				Method (_HID, 0, NotSerialized)
				{
					If (LPTM (0x02))
					{
						Return (0x0104D041)
					}
					Else
					{
						Return (0x0004D041)
					}
				}

				Method (_STA, 0, NotSerialized)
				{
					Return (DSTA (0x02))
				}

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

				Method (_CRS, 0, NotSerialized)
				{
					DCRS (0x02, One)
					If (LPTM (0x02))
					{
						Store (IRQM, IRQE)
						Store (DMAM, DMAE)
						Store (IO11, IO21)
						Store (IO12, IO22)
						Store (LEN1, LEN2)
						Add (IO21, 0x0400, IO31)
						Store (IO31, IO32)
						Store (LEN2, LEN3)
						Return (CRS2)
					}
					Else
					{
						Return (CRS1)
					}
				}

				Method (_SRS, 1, NotSerialized)
				{
					DSRS (Arg0, 0x02)
				}

				Method (_PRS, 0, NotSerialized)
				{
					If (LPTM (0x02))
					{
						Return (EPPR)
					}
					Else
					{
						Return (LPPR)
					}
				}

				Name (LPPR, ResourceTemplate ()
				{
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x0378,			 // Range Minimum
							0x0378,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x0278,			 // Range Minimum
							0x0278,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03BC,			 // Range Minimum
							0x03BC,			 // Range Maximum
							0x01,			   // Alignment
							0x04,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{}
					}
					EndDependentFn ()
				})
				Name (EPPR, ResourceTemplate ()
				{
					StartDependentFn (0x00, 0x00)
					{
						IO (Decode16,
							0x0378,			 // Range Minimum
							0x0378,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IO (Decode16,
							0x0778,			 // Range Minimum
							0x0778,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{7}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x0378,			 // Range Minimum
							0x0378,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IO (Decode16,
							0x0778,			 // Range Minimum
							0x0778,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x0278,			 // Range Minimum
							0x0278,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IO (Decode16,
							0x0678,			 // Range Minimum
							0x0678,			 // Range Maximum
							0x01,			   // Alignment
							0x08,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					StartDependentFnNoPri ()
					{
						IO (Decode16,
							0x03BC,			 // Range Minimum
							0x03BC,			 // Range Maximum
							0x01,			   // Alignment
							0x04,			   // Length
							)
						IO (Decode16,
							0x07BC,			 // Range Minimum
							0x07BC,			 // Range Maximum
							0x01,			   // Alignment
							0x04,			   // Length
							)
						IRQNoFlags ()
							{3,4,5,6,7,10,11,12}
						DMA (Compatibility, NotBusMaster, Transfer8, )
							{0,1,2,3}
					}
					EndDependentFn ()
				})
			}
		}

		Device (P0PC)
		{
			Name (_ADR, 0x00140004)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x04, 0x04))
			}

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

				Return (PR0C)
			}
		}

		Device (UHC1)
		{
			Name (_ADR, 0x00120000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (UHC2)
		{
			Name (_ADR, 0x00120001)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (UHC3)
		{
			Name (_ADR, 0x00120002)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (USB4)
		{
			Name (_ADR, 0x00130000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (UHC5)
		{
			Name (_ADR, 0x00130001)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (UHC6)
		{
			Name (_ADR, 0x00130002)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (UHC7)
		{
			Name (_ADR, 0x00140005)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x0B, 0x03))
			}
		}

		Device (SATA)
		{
			Name (_ADR, 0x00110000)
		}
	}

	Scope (\_GPE)
	{
		Method (_L18, 0, NotSerialized)
		{
			Notify (\_SB.PCI0.PCE2, 0x02)
			Notify (\_SB.PCI0.PCE3, 0x02)
			Notify (\_SB.PCI0.PCE4, 0x02)
			Notify (\_SB.PCI0.PCE5, 0x02)
			Notify (\_SB.PCI0.PCE6, 0x02)
			Notify (\_SB.PCI0.PCE7, 0x02)
			Notify (\_SB.PWRB, 0x02)
		}

		Method (_L1B, 0, NotSerialized)
		{
			Notify (\_SB.PCI0.SBAZ, 0x02)
			Notify (\_SB.PWRB, 0x02)
		}

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

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

		Method (_L0B, 0, NotSerialized)
		{
			Notify (\_SB.PCI0.UHC1, 0x02)
			Notify (\_SB.PCI0.UHC2, 0x02)
			Notify (\_SB.PCI0.UHC3, 0x02)
			Notify (\_SB.PCI0.USB4, 0x02)
			Notify (\_SB.PCI0.UHC5, 0x02)
			Notify (\_SB.PCI0.UHC6, 0x02)
			Notify (\_SB.PCI0.UHC7, 0x02)
			Notify (\_SB.PWRB, 0x02)
		}
	}

	Device (PWRB)
	{
		Name (_HID, EisaId ("PNP0C0C"))
		Name (_UID, 0xAA)
		Name (_STA, 0x0B)
		Method (_PRW, 0, NotSerialized)
		{
			Return (GPRW (0x03, 0x03))
		}
	}
}

Scope (_SB)
{
	OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
	Field (PIRQ, ByteAcc, NoLock, Preserve)
	{
		PIDX,   8,
		PDAT,   8
	}

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

	Method (IRQC, 0, NotSerialized)
	{
		Store (Zero, PIRA)
		Store (Zero, PIRB)
		Store (Zero, PIRC)
		Store (Zero, PIRD)
		Store (Zero, PIRE)
		Store (Zero, PIRF)
		Store (Zero, PIRG)
		Store (Zero, PIRH)
	}

	Name (BUFA, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{15}
	})
	Name (IPRA, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{5,10,11}
	})
	Name (IPRB, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{5,10,11}
	})
	Name (IPRC, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{5,10,11}
	})
	Name (IPRD, ResourceTemplate ()
	{
		IRQ (Level, ActiveLow, Shared, )
			{5,10,11}
	})
	Device (LNKA)
	{
		Name (_HID, EisaId ("PNP0C0F"))
		Name (_UID, One)
		Method (_STA, 0, NotSerialized)
		{
			If (PIRA)
			{
				Return (0x0B)
			}
			Else
			{
				Return (0x09)
			}
		}

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRA, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRA)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRB, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRB)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRC, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRC)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRD, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRD)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRE, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (PIRE, Local0)
			Decrement (Local0)
			Store (Local0, PIRE)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRF, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRF)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRG, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRG)
		}
	}

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

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

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

		Method (_CRS, 0, NotSerialized)
		{
			CreateWordField (BUFA, One, IRQX)
			ShiftLeft (One, PIRH, IRQX)
			Return (BUFA)
		}

		Method (_SRS, 1, NotSerialized)
		{
			CreateWordField (Arg0, One, IRA)
			FindSetRightBit (IRA, Local0)
			Decrement (Local0)
			Store (Local0, PIRH)
		}
	}
}

Scope (_SB)
{
	Name (XCPD, Zero)
	Name (XNPT, One)
	Name (XCAP, 0x02)
	Name (XDCP, 0x04)
	Name (XDCT, 0x08)
	Name (XDST, 0x0A)
	Name (XLCP, 0x0C)
	Name (XLCT, 0x10)
	Name (XLST, 0x12)
	Name (XSCP, 0x14)
	Name (XSCT, 0x18)
	Name (XSST, 0x1A)
	Name (XRCT, 0x1C)
	Mutex (MUTE, 0x00)
	Method (RBPE, 1, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, One)
		Field (PCFG, ByteAcc, NoLock, Preserve)
		{
			XCFG,   8
		}

		Release (MUTE)
		Return (XCFG)
	}

	Method (RWPE, 1, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		And (Arg0, 0xFFFFFFFE, Arg0)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, 0x02)
		Field (PCFG, WordAcc, NoLock, Preserve)
		{
			XCFG,   16
		}

		Release (MUTE)
		Return (XCFG)
	}

	Method (RDPE, 1, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		And (Arg0, 0xFFFFFFFC, Arg0)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, 0x04)
		Field (PCFG, DWordAcc, NoLock, Preserve)
		{
			XCFG,   32
		}

		Release (MUTE)
		Return (XCFG)
	}

	Method (WBPE, 2, NotSerialized)
	{
		Acquire (MUTE, 0x0FFF)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, One)
		Field (PCFG, ByteAcc, NoLock, Preserve)
		{
			XCFG,   8
		}

		Store (Arg1, XCFG)
		Release (MUTE)
	}

	Method (WWPE, 2, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		And (Arg0, 0xFFFFFFFE, Arg0)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, 0x02)
		Field (PCFG, WordAcc, NoLock, Preserve)
		{
			XCFG,   16
		}

		Store (Arg1, XCFG)
		Release (MUTE)
	}

	Method (WDPE, 2, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		And (Arg0, 0xFFFFFFFC, Arg0)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, 0x04)
		Field (PCFG, DWordAcc, NoLock, Preserve)
		{
			XCFG,   32
		}

		Store (Arg1, XCFG)
		Release (MUTE)
	}

	Method (RWDP, 3, NotSerialized)
	{
		Acquire (MUTE, 0x03E8)
		And (Arg0, 0xFFFFFFFC, Arg0)
		Add (Arg0, PCIB, Local0)
		OperationRegion (PCFG, SystemMemory, Local0, 0x04)
		Field (PCFG, DWordAcc, NoLock, Preserve)
		{
			XCFG,   32
		}

		And (XCFG, Arg2, Local1)
		Or (Local1, Arg1, XCFG)
		Release (MUTE)
	}

	Method (RPME, 1, NotSerialized)
	{
		Add (Arg0, 0x84, Local0)
		Store (RDPE (Local0), Local1)
		If (LEqual (Local1, Ones))
		{
			Return (Zero)
		}
		Else
		{
			If (LAnd (Local1, 0x00010000))
			{
				WDPE (Local0, And (Local1, 0x00010000))
				Return (One)
			}

			Return (Zero)
		}
	}
}

If (OSCF)
{
	Scope (_SB.PCI0)
	{
		Name (SUPP, Zero)
		Name (CTRL, Zero)
		Method (_OSC, 4, NotSerialized)
		{
			If (LEqual (Arg0, Buffer (0x10)
					{
						/* 0000 */	0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40,
						/* 0008 */	0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66
					}))
			{
				CreateDWordField (Arg3, Zero, CDW1)
				CreateDWordField (Arg3, 0x04, CDW2)
				CreateDWordField (Arg3, 0x08, CDW3)
				Store (CDW2, SUPP)
				Store (CDW3, CTRL)
				If (LNotEqual (And (SUPP, 0x16), 0x16))
				{
					And (CTRL, 0x1E, CTRL)
				}

				And (CTRL, 0x1D, CTRL)
				If (Not (And (CDW1, One)))
				{
					If (And (CTRL, One)) {}
					If (And (CTRL, 0x04)) {}
					If (And (CTRL, 0x10)) {}
				}

				If (LNotEqual (Arg1, One))
				{
					Or (CDW1, 0x08, CDW1)
				}

				If (LNotEqual (CDW3, CTRL))
				{
					Or (CDW1, 0x10, CDW1)
				}

				Store (CTRL, CDW3)
				Return (Arg3)
			}
			Else
			{
				Or (CDW1, 0x04, CDW1)
				Return (Arg3)
			}
		}
	}
}

Method (NB2S, 1, NotSerialized)
{
}

Method (NB2W, 1, NotSerialized)
{
}

Method (NPTS, 1, NotSerialized)
{
}

Method (NWAK, 1, NotSerialized)
{
}

Scope (_TZ)
{
	Method (KELV, 1, NotSerialized)
	{
		And (Arg0, 0xFF, Local0)
		Multiply (Local0, 0x0A, Local0)
		Add (Local0, 0x0AAC, Local0)
		Return (Local0)
	}

	ThermalZone (THRM)
	{
		Method (_TMP, 0, NotSerialized)
		{
			Store (KELV (0x1E), Local0)
			If (LEqual (HWMF, 0x33))
			{
				Store (KELV (0x7F), Local0)
				Store (0x55, DBG8)
			}

			Return (Local0)
		}

		Method (_CRT, 0, NotSerialized)
		{
			Return (KELV (0x6E))
		}
	}
}

Name (HWMF, Zero)
Scope (_GPE)
{
	Method (_L09, 0, NotSerialized)
	{
		Store (0x33, HWMF)
		Store (0xDD, DBG8)
		Store (0x30, HWMI)
		Store (HWMD, Local0)
		If (LEqual (Local0, 0x55))
		{
			Store (Zero, HWMF)
			Store (0x55, DBG8)
		}

		Store (Zero, HWMD)
		Notify (\_TZ.THRM, 0x80)
	}
}

OperationRegion (HHHD, SystemIO, 0x0E85, One)
Field (HHHD, ByteAcc, NoLock, Preserve)
{
	HWMI,   8
}

OperationRegion (HHHV, SystemIO, 0x0E86, One)
Field (HHHV, ByteAcc, NoLock, Preserve)
{
	HWMD,   8
}

Scope (_SB)
{
	Method (_INI, 0, NotSerialized)
	{
		Store (OSFL (), OSTY)
		If (LEqual (OSFL (), Zero))
		{
			Store (0x05, OSTY)
		}

		If (LEqual (OSFL (), 0x05))
		{
			Store (0x06, OSTY)
		}
	}

	Scope (PCI0)
	{
		Name (CRS, ResourceTemplate ()
		{
			WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
				0x0000,			 // Granularity
				0x0000,			 // Range Minimum
				0x00FF,			 // Range Maximum
				0x0000,			 // Translation Offset
				0x0100,			 // Length
				,, )
			IO (Decode16,
				0x0CF8,			 // Range Minimum
				0x0CF8,			 // Range Maximum
				0x01,			   // Alignment
				0x08,			   // Length
				)
			WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
				0x0000,			 // Granularity
				0x0000,			 // Range Minimum
				0x0CF7,			 // Range Maximum
				0x0000,			 // Translation Offset
				0x0CF8,			 // Length
				,, , TypeStatic)
			WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
				0x0000,			 // Granularity
				0x0D00,			 // Range Minimum
				0xFFFF,			 // Range Maximum
				0x0000,			 // Translation Offset
				0xF300,			 // Length
				,, , TypeStatic)
			DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
				0x00000000,		 // Granularity
				0x000A0000,		 // Range Minimum
				0x000BFFFF,		 // Range Maximum
				0x00000000,		 // Translation Offset
				0x00020000,		 // Length
				,, , AddressRangeMemory, TypeStatic)
			DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
				0x00000000,		 // Granularity
				0x000C0000,		 // Range Minimum
				0x000DFFFF,		 // Range Maximum
				0x00000000,		 // Translation Offset
				0x00020000,		 // Length
				,, _Y18, AddressRangeMemory, TypeStatic)
			DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
				0x00000000,		 // Granularity
				0x00000000,		 // Range Minimum
				0x00000000,		 // Range Maximum
				0x00000000,		 // Translation Offset
				0x00000000,		 // Length
				,, _Y19, AddressRangeMemory, TypeStatic)
			DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
				0x00000000,		 // Granularity
				0x00000000,		 // Range Minimum
				0x00000000,		 // Range Maximum
				0x00000000,		 // Translation Offset
				0x00000000,		 // Length
				,, _Y1A, AddressRangeMemory, TypeStatic)
		})
		CreateDWordField (CRS, \_SB.PCI0._Y18._MIN, MIN5)
		CreateDWordField (CRS, \_SB.PCI0._Y18._MAX, MAX5)
		CreateDWordField (CRS, \_SB.PCI0._Y18._LEN, LEN5)
		CreateDWordField (CRS, \_SB.PCI0._Y19._MIN, MIN6)
		CreateDWordField (CRS, \_SB.PCI0._Y19._MAX, MAX6)
		CreateDWordField (CRS, \_SB.PCI0._Y19._LEN, LEN6)
		CreateDWordField (CRS, \_SB.PCI0._Y1A._MIN, MIN7)
		CreateDWordField (CRS, \_SB.PCI0._Y1A._MAX, MAX7)
		CreateDWordField (CRS, \_SB.PCI0._Y1A._LEN, LEN7)
		Method (_CRS, 0, NotSerialized)
		{
			Store (MG1L, Local0)
			If (Local0)
			{
				Store (MG1B, MIN5)
				Store (MG1L, LEN5)
				Add (MIN5, Decrement (Local0), MAX5)
			}

			Store (MG2B, MIN6)
			Store (MG2L, LEN6)
			Store (MG2L, Local0)
			Add (MIN6, Decrement (Local0), MAX6)
			Store (MG3B, MIN7)
			Store (MG3L, LEN7)
			Store (MG3L, Local0)
			Add (MIN7, Decrement (Local0), MAX7)
			Return (CRS)
		}
	}
}

Name (WOTB, Zero)
Name (WSSB, Zero)
Name (WAXB, Zero)
Method (_PTS, 1, NotSerialized)
{
	Store (Arg0, DBG8)
	PTS (Arg0)
	Store (Zero, Index (WAKP, Zero))
	Store (Zero, Index (WAKP, One))
	If (LAnd (LEqual (Arg0, 0x04), LEqual (OSFL (), 0x02)))
	{
		Sleep (0x0BB8)
	}

	Store (ASSB, WSSB)
	Store (AOTB, WOTB)
	Store (AAXB, WAXB)
	Store (Arg0, ASSB)
	Store (OSFL (), AOTB)
	Store (Zero, AAXB)
}

OperationRegion (PMS3, SystemIO, PMBS, 0x04)
Field (PMS3, ByteAcc, NoLock, Preserve)
{
		,   10,
	RTCS,   1,
		,   4,
	WAKS,   1,
			Offset (0x03),
	PWBT,   1,
			Offset (0x04)
}

Method (_WAK, 1, NotSerialized)
{
	ShiftLeft (Arg0, 0x04, DBG8)
	WAK (Arg0)
	If (RTCS)
	{
		Store (0xC3, DBG8)
	}
	Else
	{
		Notify (\_SB.PWRB, 0x02)
	}

	If (ASSB)
	{
		Store (WSSB, ASSB)
		Store (WOTB, AOTB)
		Store (WAXB, AAXB)
	}

	If (DerefOf (Index (WAKP, Zero)))
	{
		Store (Zero, Index (WAKP, One))
	}
	Else
	{
		Store (Arg0, Index (WAKP, One))
	}

	Return (WAKP)
}

Scope (_SB.PCI0)
{
	Method (_INI, 0, NotSerialized)
	{
		If (LLessEqual (RVID, 0x13))
		{
			Store (Zero, PWDE)
		}
	}
}

Name (_S0, Package (0x04)
{
	Zero,
	Zero,
	Zero,
	Zero
})
If (SS1)
{
	Name (_S1, Package (0x04)
	{
		One,
		Zero,
		Zero,
		Zero
	})
}

If (SS3)
{
	Name (_S3, Package (0x04)
	{
		0x03,
		Zero,
		Zero,
		Zero
	})
}

If (SS4)
{
	Name (_S4, Package (0x04)
	{
		0x04,
		Zero,
		Zero,
		Zero
	})
}

Name (_S5, Package (0x04)
{
	0x05,
	Zero,
	Zero,
	Zero
})
Method (PTS, 1, NotSerialized)
{
	If (Arg0)
	{
		\_SB.PCI0.SBRG.SIOS (Arg0)
		NB2S (Arg0)
		NPTS (Arg0)
		SPTS (Arg0)
	}
}

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

 

And my pc specs are.

 

00:00.0 Host bridge [0600]: ATI Technologies Inc Device [1002:7911]
00:02.0 PCI bridge [0604]: ATI Technologies Inc Device [1002:7913]
00:05.0 PCI bridge [0604]: ATI Technologies Inc Device [1002:7915]
00:11.0 SATA controller [0106]: ATI Technologies Inc Device [1002:4391]
00:12.0 USB Controller [0c03]: ATI Technologies Inc Device [1002:4397]
00:12.1 USB Controller [0c03]: ATI Technologies Inc Device [1002:4398]
00:12.2 USB Controller [0c03]: ATI Technologies Inc Device [1002:4396]
00:13.0 USB Controller [0c03]: ATI Technologies Inc Device [1002:4397]
00:13.1 USB Controller [0c03]: ATI Technologies Inc Device [1002:4398]
00:13.2 USB Controller [0c03]: ATI Technologies Inc Device [1002:4396]
00:14.0 SMBus [0c05]: ATI Technologies Inc SB600 SMBus [1002:4385] (rev 3a)
00:14.1 IDE interface [0101]: ATI Technologies Inc Device [1002:439c]
00:14.3 ISA bridge [0601]: ATI Technologies Inc Device [1002:439d]
00:14.4 PCI bridge [0604]: ATI Technologies Inc SB600 PCI to PCI Bridge [1002:4384]
00:14.5 USB Controller [0c03]: ATI Technologies Inc Device [1002:4399]
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] HyperTransport Configuration [1022:1200]
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Address Map [1022:1201]
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] DRAM Controller [1022:1202]
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Miscellaneous Control [1022:1203]
00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Link Control [1022:1204]
01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0615] (rev a2)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 03)
03:01.0 Multimedia audio controller [0401]: C-Media Electronics Inc CM8738 [13f6:0111] (rev 10)

 

Any help with patching is also appreciated! :rolleyes:

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



×