Jump to content

[AMD] OS X El Capitan (10.11) Kernel Testing & Release (for help use the Help Topic)


spakk
 Share

1,255 posts in this topic

Recommended Posts

USB-Fix:

 

another way to resolve the problem with USB, is by using DSDT and then done USB-Fix, see here

 

drivers:

 

I've watched that video but in my DSDT I have UHC instead of EHC1/EHC2 and XHC, it's because I suppose my motherboard have different USB controller. And I've tried to make some changes but I can't compile DSDT because of some errors. I've tried so many things, but I can't get to this installation menu. Also like Bronya said, I've tried this USBInjectAll.kext, but it didn't worked, I've used it with DummyUSBEHCIPCI.kext and with these patches:

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ACPI</key>
	<dict>
		<key>DSDT</key>
		<dict>
			<key>Patches</key>
			<array>
				<dict>
					<key>Comment</key>
					<string>change _OSI to XOSI</string>
					<key>Find</key>
					<data>X09TSQ==</data>
					<key>Replace</key>
					<data>WE9TSQ==</data>
				</dict>
				<dict>
					<key>Comment</key>
					<string>change EHC1 to EH01</string>
					<key>Find</key>
					<data>RUhDMQ==</data>
					<key>Replace</key>
					<data>RUgwMQ==</data>
				</dict>
				<dict>
					<key>Comment</key>
					<string>change EHC2 to EH02</string>
					<key>Find</key>
					<data>RUhDMg==</data>
					<key>Replace</key>
					<data>RUgwMg==</data>
				</dict>
			</array>
		</dict>
	</dict>
	<key>KernelAndKextPatches</key>
	<dict>
		<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>change 15 port limit to 20 in XHCI kext (9-series)</string>
				<key>Find</key>
				<data>g72M/v//EA==</data>
				<key>Name</key>
				<string>AppleUSBXHCIPCI</string>
				<key>Replace</key>
				<data>g72M/v//FQ==</data>
			</dict>
			<dict>
				<key>Comment</key>
				<string>change 15 port limit to 26 in XHCI kext (100-series)</string>
				<key>Find</key>
				<data>g72M/v//EA==</data>
				<key>Name</key>
				<string>AppleUSBXHCIPCI</string>
				<key>Replace</key>
				<data>g72M/v//Gw==</data>
			</dict>
		</array>
	</dict>
</dict>
</plist>

 

 

 

Well it's strange, but I was able to boot into installation menu and only once with these patches for USBInjecAll.kext. Then I've rebooted my pc and then I couldn't boot into installation menu again. This is my clean DSDT.aml file, can you see if you can do something with it please? Maybe there can be made some alternative DSDT patches in Clover config file like those I've posted in spoiler?

DSDT M5A78L-M LX3.aml.zip

Link to comment
Share on other sites

Here is Andy's kernel built from source.

 

attachicon.gifXNU-AnV-El_Capitan.zip

Thanks for such a good new AMD kernel which works for Athlon 64 x2 6000+ CPU in ASUS M4A78 PLUS MB at 10.11.3.

But there are many applications crashed immediately.

However Firefox and Flash player working.

Again no promises with this. Tired a few things,

 

attachicon.gifXNU-AnV-El_Capitan.zip

 

@Bronya could you maybe merge your source with Andy's?

Thanks for such a great new AMD kernel which works for Athlon 64 x2 6000+ CPU in ASUS M4A78 PLUS MB at 10.11.3.

Some improvement in this new version:

1. More stable results in OpenCL_OceanWave_Bandwidth_V161 benching test

2. Better result in CineBench R15

3. Less crashed applications

post-70188-0-64598900-1450747646_thumb.png

post-70188-0-42613400-1450747659_thumb.png

post-70188-0-37457900-1450748849_thumb.png

post-70188-0-96202600-1450748861_thumb.png

post-70188-0-20124300-1450748877_thumb.png

  • Like 1
Link to comment
Share on other sites

Guys, I think we need a single place to collect all the kernels available around there for testing so we don't need to dig in the whole topic to search for/test every new iteration.

 

I don't know if it's possible to create a specific area (maybe a new temporary "AMD 10.11.x kernel download only") but this is really going to be a mess in the long run. Needless to say that correctly naming every kernel iteration is also very important (but you already did a great job on that matter :)). I know it's a huge work and this is not the funny part but this is very useful and necessary for devs/testers IMHO.

 

This was already a problem with previous OS X versions and we should do something to avoid this :).

 

My 2 cents…

Please see here:

http://www.insanelymac.com/forum/topic/309765-amd-os-x-el-capitan-1011-kernel-testing-release-for-help-use-the-help-topic/page-1?p=2195206&do=findComment&comment=2195206

 

I originally had two separate topics for Yosemite (testing & release) and that system didn't work, so reverted back to the single topic for releases & testing but with the 2nd post for the kernel list.

  • Like 3
Link to comment
Share on other sites

:)

 

idem with Clover UEFI

 

The DSDT isn't loaded. You should see that GFX0@0 is attached to PEGP@2,1 instead of BR11@2,1 in IORegistry Explorer. Make sure the file is named DSDT.aml (and nothing else) and it is placed in /Extra using Enoch or EFI/CLOVER/ACPI/patched using Clover (I can't see this folder in your screenshots :P).

 

 

Please see here:

http://www.insanelymac.com/forum/topic/309765-amd-os-x-el-capitan-1011-kernel-testing-release-for-help-use-the-help-topic/page-1?p=2195206&do=findComment&comment=2195206

 

I originally had two separate topics for Yosemite (testing & release) and that system didn't work, so reverted back to the single topic for releases & testing but with the 2nd post for the kernel list.

Nice ! This a really good compromise ! Thanks :thumbsup_anim:

Link to comment
Share on other sites

I use XCode 7.2 (7C68)

 

I also use Version 7.2 (7C68) with Command Line tools for 10.11 with dtrace-168 and AvailabilityVersions-20 Without any errors.

 

unfortunately does not work with Phenom II X6, I've tested today afternoon.

 

Can you try this kernel.

 

AnV_Shaneee.zip

 

 

All yours kernel's for me works with problem , really slow loading !

And in parallel desktop don't works ,, panic ! 

My kernel no problems )) .

Try kernel for 10.11.2 rc1 !

attachicon.gif kernel_10.11.2_rc1.zip

 

Will give it a try later on :)

  • Like 3
Link to comment
Share on other sites

All yours kernel's for me works with problem , really slow loading !

And in parallel desktop don't works ,, panic ! 

My kernel no problems )) .

Try kernel for 10.11.2 rc1 !

attachicon.gifkernel_10.11.2_rc1.zip

 

The remaining applications that crashed with other kernels are still crashing with this kernel on my Phenom X4.  Attached are two sample crashes: WebKit in Safari and OpenGL Viewer.  Result of speed tests remains the same.

 

Crashes.zip

Link to comment
Share on other sites

All yours kernel's for me works with problem , really slow loading !

And in parallel desktop don't works ,, panic ! 

My kernel no problems )) .

Try kernel for 10.11.2 rc1 !

attachicon.gifkernel_10.11.2_rc1.zip

Thanks for such a great AMD kernel which works for Athlon 64 x2 6000+ CPU in ASUS M4A78 PLUS MB and Phenom x4 9850 in ASUS M3A MB at 10.11.2.

Just very few applications crashed like y2k4u's post above.

I also use Version 7.2 (7C68) with Command Line tools for 10.11 with dtrace-168 and AvailabilityVersions-20 Without any errors.

 

 

Can you try this kernel.

 

attachicon.gifAnV_Shaneee.zip

 

 

 

Will give it a try later on :)

Thanks for such a great AMD kernel which works for Athlon 64 x2 6000+ CPU in ASUS M4A78 PLUS MB and Phenom x4 9850 in ASUS M3A MB at 10.11.2.

The crashed applications are quite similar to Bronya's 10.11.2RC1 kernel.

Edited by jsl
Link to comment
Share on other sites

Hi ! Yours kernel for me normal works , no symbols =))) . You compiled this xnu 10.11.2 on real iMac ? 

I compiled on AMD , but  i get problem symbols _xcpm_bios_.... =))

On AMD I guess you are not well running some libraries like com.apple.kpi.private..

  • Like 1
Link to comment
Share on other sites

@y2k4u, i see that you inserted symbols _xcpm_bios_mbox_cmd_read(write) in kernel =)) , how to you did ? )) You programmer ? ))

 

This kernel works about the same as your previous kernel but I get a white screen instead of the login screen. Strange thing is I moved my mouse and the password field was there and I was still able to login.

Link to comment
Share on other sites

check this kernel


On AMD I guess you are not well running some libraries like com.apple.kpi.private..

Micky, did you have an idea how we can fix the problem?  ---> OS Kext.cpp must be edited.?

 

(Kernel SSSEPlus_V2)

kernel.zip

Edited by spakk
Link to comment
Share on other sites

check this kernel

Micky, did you have an idea how we can fix the problem?  ---> OS Kext.cpp must be edited.?

Thanks for this AMD kernel which works for Athlon 64 x2 6000+ CPU in ASUS M4A78 PLUS MB and Phenom x4 9850 in ASUS M3A MB at 10.11.2.

There are too many applications crashed.

But Firefox/Safari and Flash player still working.

Edited by jsl
Link to comment
Share on other sites

then check this kernel SSSEPlus_V1

I can not test at the moment, it would be great If anyone can test the two kernels with Phenmon II X6 CPU

kernel_SSSEPlus_V1.zip

Edited by spakk
Link to comment
Share on other sites

@y2k4u, i see that you inserted symbols _xcpm_bios_mbox_cmd_read(write) in kernel =)) , how to you did ? )) You programmer ? ))

 

Apple is withholding an entire folder called xcpm which contains numerous function definitions of which two are called directly outside of the kernel.  It doesn't matter what platform you compile the kernel from, the system will output errors since the symbols for those functions are not available.  I have some understand of how those functions work, and, fortunately, they are not critical to the normal functioning of the OS.  You can pretty much ignore those errors for now.

 

I hope El Capo doesn't mark the beginning of an era where Apple releases only the barebone kernel source code to the public and keep critical kernel functions to themselves.  

  • Like 3
Link to comment
Share on other sites

Hmm… looking at IOReg from EC, I see the DSDT isn't used/loaded at all. Make sure you renamed it to DSDT.aml and that you have this in config.plist :

	<key>ACPI</key>
	<dict>
		<key>DSDT</key>
		<dict>
…
			</dict>
			<key>Name</key>
			<string>DSDT.aml</string>

@Op15L

 

Nothing in EFI/CLOVER/ACPI/origin ? Strange… Well, dump your DSDT using directly MaciASL then : File menu > New from ACPI > DSDT.

Sorry but I need to go now.

 

I'll look into your files later guys ;) !

 

my DSDT

/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20100331
 *
 * Disassembly of iASLviBpTa.aml, Wed Dec 23 19:44:32 2015
 *
 *
 * Original Table Header:
 *     Signature        "DSDT"
 *     Length           0x00006123 (24867)
 *     Revision         0x02
 *     Checksum         0x82
 *     OEM ID           "ALASKA"
 *     OEM Table ID     "A M I"
 *     OEM Revision     0x00000000 (0)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20051117 (537202967)
 */
DefinitionBlock ("iASLviBpTa.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000000)
{
    Name (SP1O, 0x2E)
    Name (IO1B, 0x0290)
    Name (IO1L, 0x10)
    Name (IOCB, 0x0230)
    Name (IOCL, 0x10)
    Name (IOWB, 0x0240)
    Name (IOWL, 0x10)
    Name (IOES, 0xFF)
    Name (SL2P, Zero)
    Name (SMBB, 0x0B20)
    Name (SMBL, 0x20)
    Name (SMB0, 0x0B00)
    Name (SMBM, 0x10)
    Name (PMBS, 0x0800)
    Name (PMLN, 0xA0)
    Name (SMIO, 0xB2)
    Name (GPBS, Zero)
    Name (GPLN, Zero)
    Name (APCB, 0xFEC00000)
    Name (APCL, 0x1000)
    Name (SPIB, 0xFEC10000)
    Name (SPIL, 0x1000)
    Name (HPTB, 0xFED00000)
    Name (HPTL, 0x1000)
    Name (GIOB, 0xFED80100)
    Name (IOMB, 0xFED80D00)
    Name (SMIB, 0xFED80200)
    Name (ACPH, 0xDE)
    Name (ASSB, Zero)
    Name (AOTB, Zero)
    Name (AAXB, Zero)
    Name (PEHP, One)
    Name (SHPC, Zero)
    Name (PEPM, One)
    Name (PEER, One)
    Name (PECS, One)
    Name (ITKE, Zero)
    Name (MBEC, 0xFFFF)
    Name (PEBS, 0xE0000000)
    Name (PEBL, 0x10000000)
    Name (SRSI, 0xB2)
    Name (CSMI, 0x61)
    Name (HIDK, 0x0303D041)
    Name (HIDM, 0x030FD041)
    Name (CIDK, 0x0B03D041)
    Name (CIDM, 0x130FD041)
    Name (PICM, Zero)
    Method (_PIC, 1, NotSerialized)
    {
        If (Arg0)
        {
            Store (0xAA, DBG8)
            \_SB.IRQC ()
        }
        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, Local0))
        {
            If (_OSI ("Linux"))
            {
                Store (0x03, OSVR)
            }

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

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

            If (_OSI ("FreeBSD"))
            {
                Store (0x06, OSVR)
            }

            If (_OSI ("HP-UX"))
            {
                Store (0x07, OSVR)
            }

            If (_OSI ("OpenVMS"))
            {
                Store (0x08, OSVR)
            }

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

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

            If (_OSI ("Windows 2001 SP3"))
            {
                Store (0x0B, OSVR)
            }

            If (_OSI ("Windows 2006"))
            {
                Store (0x0C, OSVR)
            }

            If (_OSI ("Windows 2006 SP1"))
            {
                Store (0x0D, OSVR)
            }

            If (_OSI ("Windows 2009"))
            {
                Store (0x0E, OSVR)
            }

            If (_OSI ("Windows 2012"))
            {
                Store (0x0F, OSVR)
            }
        }
        Else
        {
            If (MCTH (_OS, "Microsoft Windows NT"))
            {
                Store (Zero, OSVR)
            }

            If (MCTH (_OS, "Microsoft Windows"))
            {
                Store (One, OSVR)
            }

            If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
            {
                Store (0x02, OSVR)
            }

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

            If (MCTH (_OS, "FreeBSD"))
            {
                Store (0x06, OSVR)
            }

            If (MCTH (_OS, "HP-UX"))
            {
                Store (0x07, OSVR)
            }

            If (MCTH (_OS, "OpenVMS"))
            {
                Store (0x08, 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, 0x80, One)
    Field (DEB0, ByteAcc, NoLock, Preserve)
    {
        DBG8,   8
    }

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

    Name (SS1, One)
    Name (SS2, Zero)
    Name (SS3, Zero)
    Name (SS4, One)
    Name (IOST, 0x0000)
    Name (TOPM, 0x00000000)
    Name (ROMS, 0xFFE00000)
    Name (VGAF, One)
    Name (OSTY, Ones)
    OperationRegion (ACMS, SystemIO, 0x72, 0x10)
    Field (ACMS, ByteAcc, NoLock, Preserve)
    {
        ICMS,   8, 
        DCMS,   8, 
                Offset (0x0E), 
        P80,    8
    }

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

    OperationRegion (CFGS, SystemMemory, BS_A, 0x0100)
    Field (CFGS, AnyAcc, NoLock, Preserve)
    {
                Offset (0x0C), 
        PCIE,   32, 
                Offset (0x7F), 
            ,   5, 
        GGN2,   1, 
                Offset (0x87), 
        GECE,   1, 
        IR_E,   1, 
                Offset (0x93), 
            ,   5, 
        OSCF,   1, 
                Offset (0x9E), 
        PRS0,   1, 
        DET0,   1, 
                Offset (0xA2), 
        PRS1,   1, 
        DET1,   1, 
                Offset (0xA6), 
        PRS2,   1, 
        DET2,   1, 
                Offset (0xAA), 
        PRS3,   1, 
        DET3,   1, 
                Offset (0xB2), 
            ,   6, 
        ABPS,   1, 
            ,   3, 
        GPPS,   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 (0x20078), 
                Offset (0x2007A), 
        PMSA,   1, 
                Offset (0x28078), 
                Offset (0x2807A), 
        PMSB,   1, 
                Offset (0x48078), 
                Offset (0x4807A), 
        PMSC,   1, 
                Offset (0x8800A), 
        STCL,   16, 
                Offset (0xA0004), 
        SMIE,   1, 
        SMME,   1, 
                Offset (0xA0008), 
        RVID,   8, 
                Offset (0xA0014), 
        SMB1,   32, 
                Offset (0xA0082), 
            ,   2, 
        G31O,   1, 
                Offset (0xA00E1), 
            ,   6, 
        ACIR,   1, 
                Offset (0xA4004), 
        PCMD,   2, 
                Offset (0xA807A), 
        PMS0,   1, 
                Offset (0xA8088), 
        TLS0,   4, 
                Offset (0xA907A), 
        PMS1,   1, 
                Offset (0xA9088), 
        TLS1,   4, 
                Offset (0xAA07A), 
        PMS2,   1, 
                Offset (0xAA088), 
        TLS2,   4, 
                Offset (0xAB07A), 
        PMS3,   1, 
                Offset (0xAB088), 
        TLS3,   4
    }

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

    IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve)
    {
                Offset (0x24), 
        MMSO,   32, 
                Offset (0x60), 
        P1EB,   16
    }

    OperationRegion (ERMM, SystemMemory, MMSO, 0x1000)
    Field (ERMM, AnyAcc, NoLock, Preserve)
    {
                Offset (0x132), 
            ,   7, 
        GP51,   1, 
                Offset (0x136), 
            ,   7, 
        GP55,   1, 
                Offset (0x13A), 
            ,   7, 
        GP59,   1, 
                Offset (0x13D), 
        GP62,   8, 
                Offset (0x13F), 
            ,   7, 
        GP64,   1, 
                Offset (0x16A), 
            ,   7, 
        GE11,   1, 
            ,   7, 
        GE12,   1, 
                Offset (0x16E), 
            ,   7, 
        BATS,   1, 
                Offset (0x287), 
            ,   1, 
        CLPS,   1, 
                Offset (0x298), 
            ,   7, 
        G15A,   1, 
                Offset (0x2AF), 
            ,   2, 
        SLPS,   2, 
                Offset (0x376), 
        EPNM,   1, 
        DPPF,   1, 
                Offset (0x3BA), 
            ,   6, 
        PWDE,   1, 
                Offset (0x3BD), 
            ,   5, 
        ALLS,   1, 
                Offset (0x3EF), 
        PHYD,   1, 
            ,   1, 
            ,   1, 
        US5R,   1, 
                Offset (0x3F5), 
        GECD,   1
    }

    OperationRegion (ABIO, SystemIO, 0x0CD8, 0x08)
    Field (ABIO, DWordAcc, NoLock, Preserve)
    {
        INAB,   32, 
        DAAB,   32
    }

    Method (RDAB, 1, NotSerialized)
    {
        Store (Arg0, INAB)
        Return (DAAB)
    }

    Method (WTAB, 2, NotSerialized)
    {
        Store (Arg0, INAB)
        Store (Arg1, DAAB)
    }

    Method (RWAB, 3, NotSerialized)
    {
        And (RDAB (Arg0), Arg1, Local0)
        Or (Local0, Arg2, Local1)
        WTAB (Arg0, Local1)
    }

    Method (CABR, 3, NotSerialized)
    {
        ShiftLeft (Arg0, 0x05, Local0)
        Add (Local0, Arg1, Local1)
        ShiftLeft (Local1, 0x18, Local2)
        Add (Local2, Arg2, Local3)
        Return (Local3)
    }

    Method (GENC, 0, NotSerialized)
    {
        Store (Zero, Local0)
        While (LLess (Local0, 0x04))
        {
            Store (RDAB (CABR (0x03, Local0, 0xA4)), Local1)
            And (Local1, 0x0800, Local1)
            If (LNotEqual (Local1, Zero))
            {
                Return (0x0F)
            }

            Increment (Local0)
            Stall (0xC8)
        }

        Return (Zero)
    }

    Method (GHPS, 2, NotSerialized)
    {
        If (LEqual (Arg0, Zero))
        {
            If (LEqual (Arg1, Zero))
            {
                RWAB (CABR (0x06, Zero, 0xC0), 0xFFFFEFFF, Zero)
                RWAB (CABR (One, Zero, 0x65), 0xFFFFFEFE, Zero)
                Store (One, DET0)
            }

            If (LEqual (Arg1, 0x02))
            {
                RWAB (CABR (0x06, Zero, 0xC0), 0xFFFFBFFF, Zero)
                RWAB (CABR (One, Zero, 0x65), 0xFFFFFBFB, Zero)
                Store (One, DET2)
            }

            Stall (0xC8)
        }

        If (LEqual (Arg0, One))
        {
            RWAB (CABR (0x03, Arg1, 0xA2), 0xFFFDFFFF, 0x00020000)
            RWAB (CABR (0x03, Arg1, 0xA2), 0xFFFFFEFF, 0x0100)
            If (LEqual (Arg1, Zero))
            {
                RWAB (CABR (0x06, Zero, 0xC0), 0xFFFFEFFF, 0x1000)
                RWAB (CABR (One, Zero, 0x65), 0xFFFFFEFE, 0x0101)
                Store (Zero, DET0)
            }

            If (LEqual (Arg1, 0x02))
            {
                RWAB (CABR (0x06, Zero, 0xC0), 0xFFFFBFFF, 0x4000)
                RWAB (CABR (One, Zero, 0x65), 0xFFFFFBFB, 0x0404)
                Store (Zero, DET2)
            }

            RWAB (CABR (0x03, Arg1, 0xA2), 0xFFFDFFFF, Zero)
            Stall (0xC8)
        }

        If (GGN2)
        {
            If (LEqual (Arg0, Zero))
            {
                GEN2 ()
                Store (RDAB (CABR (0x03, 0x02, 0xA5)), Local0)
                And (Local0, 0xFF, Local0)
                Store (0x01F4, Local1)
                While (LAnd (LGreater (Local1, Zero), LNotEqual (Local0, 0x10)))
                {
                    Store (RDAB (CABR (0x03, 0x02, 0xA5)), Local0)
                    And (Local0, 0xFF, Local0)
                    Decrement (Local1)
                    Stall (0xC8)
                    Stall (0xC8)
                }

                If (LNotEqual (Local0, 0x10))
                {
                    GEN1 ()
                }
            }

            If (LEqual (GENC (), Zero))
            {
                RWAB (CABR (One, Zero, 0x40), 0xFFFFFFF7, 0x08)
            }
            Else
            {
                RWAB (CABR (One, Zero, 0x40), 0xFFFFFFF7, Zero)
            }

            Stall (0xC8)
        }
    }

    Method (GEN2, 0, NotSerialized)
    {
        Store (0x02, TLS2)
        RWAB (CABR (0x03, 0x02, 0xA4), 0xFFFFFFFE, One)
        RWAB (CABR (0x03, 0x02, 0xA2), 0xFFFFDFFF, 0x2000)
        RWAB (CABR (0x03, 0x02, 0xC0), 0xFFFF7FFF, 0x8000)
        RWAB (CABR (0x03, 0x02, 0xA4), 0xDFFFFFFF, 0x20000000)
        Stall (0xC8)
        Stall (0xC8)
    }

    Method (GEN1, 0, NotSerialized)
    {
        Store (One, TLS2)
        RWAB (CABR (0x03, 0x02, 0xA4), 0xFFFFFFFE, Zero)
        RWAB (CABR (0x03, 0x02, 0xA2), 0xFFFFDFFF, 0x2000)
        Stall (0xC8)
        Stall (0xC8)
    }

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

    Method (SPTS, 1, NotSerialized)
    {
        Store (One, PCMD)
        Store (Arg0, P80)
        CPMS ()
        CPMS ()
        Store (One, PEWS)
    }

    Method (SWAK, 1, NotSerialized)
    {
        CPMS ()
        CPMS ()
        If (RTCS)
        {
            If (PEWS)
            {
                Notify (\_SB.PWRB, 0x02)
            }
        }
        Else
        {
            Notify (\_SB.PWRB, 0x02)
        }

        Store (One, PEWS)
    }

    Method (TRMD, 1, NotSerialized)
    {
    }

    Method (CPMS, 0, NotSerialized)
    {
        If (LEqual (EPNM, Zero))
        {
            Store (One, PMSA)
            Store (One, PMSB)
            Store (One, PMSC)
            Store (One, PMS0)
            Store (One, PMS1)
            Store (One, PMS2)
            Store (One, PMS3)
        }
    }

    Scope (_GPE)
    {
    }

    OperationRegion (S4NV, SystemMemory, 0xBE8CED18, 0x03)
    Field (S4NV, AnyAcc, Lock, Preserve)
    {
        OSTP,   16, 
        SXTP,   8
    }

    Method (S4RS, 1, NotSerialized)
    {
        Store (Arg0, SXTP)
        Store (0x07D0, OSTP)
        If (CondRefOf (_OSI, Local0))
        {
            If (_OSI ("Windows 2001"))
            {
                Store (0x07D1, OSTP)
            }

            If (_OSI ("Windows 2001.1"))
            {
                Store (0x07D3, OSTP)
            }

            If (_OSI ("Windows 2006"))
            {
                Store (0x07D6, OSTP)
            }

            If (_OSI ("Windows 2009"))
            {
                Store (0x07D9, OSTP)
            }

            If (_OSI ("Windows 2012"))
            {
                Store (0x07DC, OSTP)
            }
        }
    }

    Scope (_SB)
    {
        Name (PR00, Package (0x30)
        {
            Package (0x04)
            {
                0x0011FFFF, 
                Zero, 
                LNKD, 
                Zero
            }, 

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

            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)
            {
                0x0004FFFF, 
                Zero, 
                LNKE, 
                Zero
            }, 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Package (0x04)
            {
                0x0009FFFF, 
                0x03, 
                LNKE, 
                Zero
            }, 

            Package (0x04)
            {
                0x000AFFFF, 
                Zero, 
                LNKG, 
                Zero
            }, 

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

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

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

            Package (0x04)
            {
                0x000BFFFF, 
                Zero, 
                LNKG, 
                Zero
            }, 

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

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

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

            Package (0x04)
            {
                0x000DFFFF, 
                Zero, 
                LNKG, 
                Zero
            }, 

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

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

            Package (0x04)
            {
                0x000DFFFF, 
                0x03, 
                LNKF, 
                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, 
                LNKC, 
                Zero
            }, 

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

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

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

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

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

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

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

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

            Package (0x04)
            {
                0x0015FFFF, 
                0x03, 
                LNKD, 
                Zero
            }
        })
        Name (AR00, Package (0x30)
        {
            Package (0x04)
            {
                0x0011FFFF, 
                Zero, 
                Zero, 
                0x13
            }, 

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

            Package (0x04)
            {
                0x0002FFFF, 
                Zero, 
                Zero, 
                0x34
            }, 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Package (0x04)
            {
                0x0009FFFF, 
                Zero, 
                Zero, 
                0x35
            }, 

            Package (0x04)
            {
                0x0009FFFF, 
                One, 
                Zero, 
                0x35
            }, 

            Package (0x04)
            {
                0x0009FFFF, 
                0x02, 
                Zero, 
                0x35
            }, 

            Package (0x04)
            {
                0x0009FFFF, 
                0x03, 
                Zero, 
                0x35
            }, 

            Package (0x04)
            {
                0x000AFFFF, 
                Zero, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000AFFFF, 
                One, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000AFFFF, 
                0x02, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000AFFFF, 
                0x03, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000BFFFF, 
                Zero, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000BFFFF, 
                One, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000BFFFF, 
                0x02, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000BFFFF, 
                0x03, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                Zero, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                One, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                0x02, 
                Zero, 
                0x36
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                0x03, 
                Zero, 
                0x36
            }, 

            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, 
                0x12
            }, 

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

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

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

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

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

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

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

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

            Package (0x04)
            {
                0x0015FFFF, 
                0x03, 
                Zero, 
                0x13
            }
        })
        Name (PR12, 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 (AR12, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x18
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x1B
            }
        })
        Name (PR14, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                LNKE, 
                Zero
            }, 

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

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

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

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x2F
            }
        })
        Name (PR15, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                LNKG, 
                Zero
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                LNKF, 
                Zero
            }
        })
        Name (AR15, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x2E
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x2D
            }
        })
        Name (PR16, 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 (AR16, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x33
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x32
            }
        })
        Name (PR19, 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 (AR19, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x30
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x33
            }
        })
        Name (PR1A, 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 (AR1A, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x2F
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x2E
            }
        })
        Name (PR1B, 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 (AR1B, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x20
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x23
            }
        })
        Name (PR1D, 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 (AR1D, Package (0x04)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x28
            }, 

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

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

            Package (0x04)
            {
                0xFFFF, 
                0x03, 
                Zero, 
                0x2B
            }
        })
        Name (PR23, 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 (AR23, 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 (PR20, 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 (AR20, 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 (PR21, 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 (AR21, 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 (PR0C, Package (0x08)
        {
            Package (0x04)
            {
                0x0005FFFF, 
                Zero, 
                LNKE, 
                Zero
            }, 

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

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

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

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

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

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

            Package (0x04)
            {
                0x0006FFFF, 
                0x03, 
                LNKE, 
                Zero
            }
        })
        Name (AR0C, Package (0x08)
        {
            Package (0x04)
            {
                0x0005FFFF, 
                Zero, 
                Zero, 
                0x14
            }, 

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

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

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

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

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

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

            Package (0x04)
            {
                0x0006FFFF, 
                0x03, 
                Zero, 
                0x14
            }
        })
        Name (PRSA, ResourceTemplate ()
        {
            IRQ (Level, ActiveLow, Shared, )
                {10,11,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)
            }

            Name (CPRB, One)
            Name (LVGA, 0x01)
            Name (STAV, 0x0F)
            Name (BRB, 0x0000)
            Name (BRL, 0x0100)
            Name (IOB, 0x1000)
            Name (IOL, 0xF000)
            Name (MBB, 0xC0000000)
            Name (MBL, 0x40000000)
            Name (MABL, 0x00000000)
            Name (MABH, 0x00000000)
            Name (MALL, 0x00000000)
            Name (MALH, 0x00000000)
            Name (MAML, 0x00000000)
            Name (MAMH, 0x00000000)
            Name (CRS1, ResourceTemplate ()
            {
                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x007F,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0080,             // Length
                    ,, _Y00)
                IO (Decode16,
                    0x0CF8,             // Range Minimum
                    0x0CF8,             // Range Maximum
                    0x01,               // Alignment
                    0x08,               // Length
                    )
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x03AF,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x03B0,             // Length
                    ,, , TypeStatic)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x03E0,             // Range Minimum
                    0x0CF7,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0918,             // Length
                    ,, , TypeStatic)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x0000,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0000,             // Length
                    ,, _Y02, TypeStatic)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x0D00,             // Range Minimum
                    0x0FFF,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0300,             // Length
                    ,, _Y01, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x00000000,         // Range Minimum
                    0x00000000,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00000000,         // Length
                    ,, _Y03, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000C0000,         // Range Minimum
                    0x000DFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00020000,         // Length
                    ,, , AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x02000000,         // Range Minimum
                    0xFFDFFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0xFDFC0000,         // Length
                    ,, _Y04, AddressRangeMemory, TypeStatic)
                QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x0000000000000000, // Granularity
                    0x0000000000000000, // Range Minimum
                    0x0000000000000000, // Range Maximum
                    0x0000000000000000, // Translation Offset
                    0x0000000000000000, // Length
                    ,, _Y05, AddressRangeMemory, TypeStatic)
            })
            Name (CRS2, ResourceTemplate ()
            {
                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    0x0000,             // Granularity
                    0x0080,             // Range Minimum
                    0x00FF,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0080,             // Length
                    ,, _Y06)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x0000,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0000,             // Length
                    ,, _Y08, TypeStatic)
                WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x0000,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0000,             // Length
                    ,, _Y07, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x00000000,         // Range Minimum
                    0x00000000,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00000000,         // Length
                    ,, _Y09, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x80000000,         // Range Minimum
                    0xFFFFFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x80000000,         // Length
                    ,, _Y0A, AddressRangeMemory, TypeStatic)
                QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x0000000000000000, // Granularity
                    0x0000000000000000, // Range Minimum
                    0x0000000000000000, // Range Maximum
                    0x0000000000000000, // Translation Offset
                    0x0000000000000000, // Length
                    ,, _Y0B, AddressRangeMemory, TypeStatic)
            })
            Method (_STA, 0, NotSerialized)
            {
                Return (STAV)
            }

            Method (_CRS, 0, NotSerialized)
            {
                If (CPRB)
                {
                    CreateWordField (CRS1, \_SB.PCI0._Y00._MIN, MIN0)
                    CreateWordField (CRS1, \_SB.PCI0._Y00._MAX, MAX0)
                    CreateWordField (CRS1, \_SB.PCI0._Y00._LEN, LEN0)
                    Store (BRB, MIN0)
                    Store (BRL, LEN0)
                    Store (LEN0, Local0)
                    Add (MIN0, Decrement (Local0), MAX0)
                    CreateWordField (CRS1, \_SB.PCI0._Y01._MIN, MIN1)
                    CreateWordField (CRS1, \_SB.PCI0._Y01._MAX, MAX1)
                    CreateWordField (CRS1, \_SB.PCI0._Y01._LEN, LEN1)
                    If (LEqual (IOB, 0x1000))
                    {
                        Store (IOL, Local0)
                        Add (IOB, Decrement (Local0), MAX1)
                        Subtract (MAX1, MIN1, Local0)
                        Add (Local0, One, LEN1)
                    }
                    Else
                    {
                        Store (IOB, MIN1)
                        Store (IOL, LEN1)
                        Store (LEN1, Local0)
                        Add (MIN1, Decrement (Local0), MAX1)
                    }

                    If (LOr (LEqual (LVGA, One), LEqual (LVGA, 0x55)))
                    {
                        If (VGAF)
                        {
                            CreateWordField (CRS1, \_SB.PCI0._Y02._MIN, IMN1)
                            CreateWordField (CRS1, \_SB.PCI0._Y02._MAX, IMX1)
                            CreateWordField (CRS1, \_SB.PCI0._Y02._LEN, ILN1)
                            Store (0x03B0, IMN1)
                            Store (0x03DF, IMX1)
                            Store (0x30, ILN1)
                            CreateDWordField (CRS1, \_SB.PCI0._Y03._MIN, VMN1)
                            CreateDWordField (CRS1, \_SB.PCI0._Y03._MAX, VMX1)
                            CreateDWordField (CRS1, \_SB.PCI0._Y03._LEN, VLN1)
                            Store (0x000A0000, VMN1)
                            Store (0x000BFFFF, VMX1)
                            Store (0x00020000, VLN1)
                            Store (Zero, VGAF)
                        }
                    }

                    CreateDWordField (CRS1, \_SB.PCI0._Y04._MIN, MIN3)
                    CreateDWordField (CRS1, \_SB.PCI0._Y04._MAX, MAX3)
                    CreateDWordField (CRS1, \_SB.PCI0._Y04._LEN, LEN3)
                    Store (MBB, MIN3)
                    Store (MBL, LEN3)
                    Store (LEN3, Local0)
                    Add (MIN3, Decrement (Local0), MAX3)
                    If (LOr (MALH, MALL))
                    {
                        CreateDWordField (CRS1, \_SB.PCI0._Y05._MIN, MN8L)
                        Add (0xB4, 0x04, Local0)
                        CreateDWordField (CRS1, Local0, MN8H)
                        Store (MABL, MN8L)
                        Store (MABH, MN8H)
                        CreateDWordField (CRS1, \_SB.PCI0._Y05._MAX, MX8L)
                        Add (0xBC, 0x04, Local1)
                        CreateDWordField (CRS1, Local1, MX8H)
                        CreateDWordField (CRS1, \_SB.PCI0._Y05._LEN, LN8L)
                        Add (0xCC, 0x04, Local2)
                        CreateDWordField (CRS1, Local2, LN8H)
                        Store (MABL, MN8L)
                        Store (MABH, MN8H)
                        Store (MALL, LN8L)
                        Store (MALH, LN8H)
                        Store (MAML, MX8L)
                        Store (MAMH, MX8H)
                    }

                    Return (CRS1)
                }
                Else
                {
                    CreateWordField (CRS2, \_SB.PCI0._Y06._MIN, MIN2)
                    CreateWordField (CRS2, \_SB.PCI0._Y06._MAX, MAX2)
                    CreateWordField (CRS2, \_SB.PCI0._Y06._LEN, LEN2)
                    Store (BRB, MIN2)
                    Store (BRL, LEN2)
                    Store (LEN2, Local1)
                    Add (MIN2, Decrement (Local1), MAX2)
                    CreateWordField (CRS2, \_SB.PCI0._Y07._MIN, MIN4)
                    CreateWordField (CRS2, \_SB.PCI0._Y07._MAX, MAX4)
                    CreateWordField (CRS2, \_SB.PCI0._Y07._LEN, LEN4)
                    Store (IOB, MIN4)
                    Store (IOL, LEN4)
                    Store (LEN4, Local1)
                    Add (MIN4, Decrement (Local1), MAX4)
                    If (LVGA)
                    {
                        CreateWordField (CRS2, \_SB.PCI0._Y08._MIN, IMN2)
                        CreateWordField (CRS2, \_SB.PCI0._Y08._MAX, IMX2)
                        CreateWordField (CRS2, \_SB.PCI0._Y08._LEN, ILN2)
                        Store (0x03B0, IMN2)
                        Store (0x03DF, IMX2)
                        Store (0x30, ILN2)
                        CreateDWordField (CRS2, \_SB.PCI0._Y09._MIN, VMN2)
                        CreateDWordField (CRS2, \_SB.PCI0._Y09._MAX, VMX2)
                        CreateDWordField (CRS2, \_SB.PCI0._Y09._LEN, VLN2)
                        Store (0x000A0000, VMN2)
                        Store (0x000BFFFF, VMX2)
                        Store (0x00020000, VLN2)
                    }

                    CreateDWordField (CRS2, \_SB.PCI0._Y0A._MIN, MIN5)
                    CreateDWordField (CRS2, \_SB.PCI0._Y0A._MAX, MAX5)
                    CreateDWordField (CRS2, \_SB.PCI0._Y0A._LEN, LEN5)
                    Store (MBB, MIN5)
                    Store (MBL, LEN5)
                    Store (LEN5, Local1)
                    Add (MIN5, Decrement (Local1), MAX5)
                    If (LOr (MALH, MALL))
                    {
                        CreateDWordField (CRS2, \_SB.PCI0._Y0B._MIN, MN9L)
                        Add (0x72, 0x04, Local0)
                        CreateDWordField (CRS2, Local0, MN9H)
                        CreateDWordField (CRS2, \_SB.PCI0._Y0B._MAX, MX9L)
                        Add (0x7A, 0x04, Local1)
                        CreateDWordField (CRS2, Local1, MX9H)
                        CreateDWordField (CRS2, \_SB.PCI0._Y0B._LEN, LN9L)
                        Add (0x8A, 0x04, Local2)
                        CreateDWordField (CRS2, Local2, LN9H)
                        Store (MABL, MN9L)
                        Store (MABH, MN9H)
                        Store (MALL, LN9L)
                        Store (MALH, LN9H)
                        Store (MAML, MX9L)
                        Store (MAMH, MX9H)
                    }

                    Return (CRS2)
                }
            }

            Scope (\_SB)
            {
                Scope (PCI0)
                {
                    Device (AMDN)
                    {
                        Name (_HID, EisaId ("PNP0C01"))
                        Name (_UID, 0xC8)
                        Name (_STA, 0x0F)
                        Name (NPTR, ResourceTemplate ()
                        {
                            Memory32Fixed (ReadWrite,
                                0x00000000,         // Address Base
                                0x00000000,         // Address Length
                                _Y0C)
                        })
                        Method (_CRS, 0, NotSerialized)
                        {
                            CreateDWordField (NPTR, \_SB.PCI0.AMDN._Y0C._LEN, PL)
                            CreateDWordField (NPTR, \_SB.PCI0.AMDN._Y0C._BAS, PB)
                            Store (PEBS, PB)
                            Store (PEBL, PL)
                            Return (NPTR)
                        }
                    }
                }
            }

            Method (NPTS, 1, NotSerialized)
            {
            }

            Method (NWAK, 1, NotSerialized)
            {
            }

            Device (RD8A)
            {
                Name (_ADR, Zero)
                OperationRegion (NB2, PCI_Config, Zero, 0x0100)
                Field (NB2, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x60), 
                    MI,     32, 
                    MD,     32, 
                            Offset (0x94), 
                    HI,     32, 
                    HD,     32, 
                            Offset (0xF8), 
                    API,    32, 
                    APD,    32
                }

                Device (NMEM)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x14)
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y0D)
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y0E)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateDWordField (CRS, \_SB.PCI0.RD8A.NMEM._Y0D._BAS, BAS1)
                        CreateDWordField (CRS, \_SB.PCI0.RD8A.NMEM._Y0D._LEN, LEN1)
                        Store (0x3C, MI)
                        Store (MD, Local0)
                        If (And (Local0, 0x40))
                        {
                            Store (0x3A, MI)
                            And (MD, 0xFFFFFF00, BAS1)
                            ShiftLeft (And (MD, 0xFF), 0x17, LEN1)
                        }

                        CreateDWordField (CRS, \_SB.PCI0.RD8A.NMEM._Y0E._BAS, BAS2)
                        CreateDWordField (CRS, \_SB.PCI0.RD8A.NMEM._Y0E._LEN, LEN2)
                        Store (Zero, API)
                        Store (APD, Local1)
                        If (And (Local1, One))
                        {
                            Store (0x0100, LEN2)
                            Store (One, API)
                            And (APD, 0xFFFFFF00, BAS2)
                        }

                        Return (CRS)
                    }
                }
            }

            Device (IOMA)
            {
                Name (_ADR, 0x02)
                OperationRegion (NBF2, PCI_Config, Zero, 0x0100)
                Field (NBF2, AnyAcc, NoLock, Preserve)
                {
                    DID,    32, 
                            Offset (0x44), 
                    MBAS,   32
                }

                Device (UMEM)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x15)
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y0F)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateDWordField (CRS, \_SB.PCI0.IOMA.UMEM._Y0F._BAS, BAS3)
                        CreateDWordField (CRS, \_SB.PCI0.IOMA.UMEM._Y0F._LEN, LEN3)
                        If (LNotEqual (DID, 0xFFFFFFFF))
                        {
                            Store (0x4000, LEN3)
                            And (MBAS, 0xFFFFFF00, BAS3)
                        }

                        Return (CRS)
                    }
                }
            }

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

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

                    Return (PR12)
                }
            }

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

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

                    Return (PR14)
                }
            }

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

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

                    Return (PR15)
                }
            }

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

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

                    Return (PR16)
                }
            }

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

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

                    Return (PR19)
                }
            }

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

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

                    Return (PR1A)
                }
            }

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

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

                    Return (PR1B)
                }
            }

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

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

                    Return (PR1D)
                }
            }

            Device (SMBS)
            {
                Name (_ADR, 0x00140000)
                OperationRegion (SMBS, PCI_Config, Zero, 0x0100)
                Field (SMBS, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x08), 
                    REV,    8, 
                            Offset (0x62), 
                    I1F,    1, 
                    I12F,   1, 
                        ,   2, 
                    MT3A,   1, 
                            Offset (0xF8), 
                    EIDX,   8, 
                            Offset (0xFC), 
                    EDAT,   32
                }

                IndexField (EIDX, EDAT, ByteAcc, NoLock, Preserve)
                {
                            Offset (0x04), 
                            Offset (0x05), 
                        ,   3, 
                    G39E,   1, 
                    G41E,   1, 
                            Offset (0x06), 
                            Offset (0x07), 
                        ,   3, 
                    G39O,   1, 
                    G41O,   1
                }

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

                OperationRegion (GPIO, SystemMemory, GIOB, 0x0100)
                Field (GPIO, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x06), 
                        ,   5, 
                    G06E,   1, 
                    G06O,   1, 
                    G06I,   1, 
                    G07B,   8, 
                            Offset (0x0B), 
                    G0BB,   8, 
                            Offset (0x0E), 
                    G0EB,   8, 
                            Offset (0x14), 
                        ,   5, 
                    G14E,   1, 
                    G14O,   1, 
                    G14I,   1, 
                        ,   5, 
                    G15E,   1, 
                    G15O,   1, 
                    G15I,   1, 
                            Offset (0x1C), 
                        ,   7, 
                    G1CI,   1, 
                            Offset (0x2D), 
                        ,   5, 
                    G2DE,   1, 
                    G2DO,   1, 
                    G2DI,   1, 
                            Offset (0x35), 
                        ,   5, 
                    G35E,   1, 
                    G35O,   1, 
                            Offset (0x37), 
                        ,   5, 
                    G37E,   1, 
                    G37O,   1, 
                    G37I,   1, 
                            Offset (0x65), 
                        ,   7, 
                    GE05,   1, 
                            Offset (0x6F), 
                        ,   7, 
                    GE15,   1, 
                        ,   7, 
                    GE16,   1, 
                            Offset (0x76), 
                        ,   7, 
                    GE22,   1, 
                            Offset (0xAA), 
                        ,   5, 
                    GAAE,   1, 
                    GAAO,   1, 
                    GAAI,   1, 
                            Offset (0xAF), 
                    GAFB,   8, 
                    GB0B,   8
                }

                OperationRegion (GPMX, SystemMemory, IOMB, 0x0100)
                Field (GPMX, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x06), 
                    G06M,   8, 
                    G07M,   8, 
                            Offset (0x0B), 
                    G0BM,   8, 
                            Offset (0x0E), 
                    G0EM,   8, 
                            Offset (0x14), 
                    G14M,   8, 
                    G15M,   8, 
                            Offset (0x1C), 
                    G1CM,   8, 
                            Offset (0x2D), 
                    G2DM,   8, 
                            Offset (0x37), 
                    G37M,   8, 
                            Offset (0x70), 
                    G70M,   8, 
                            Offset (0x76), 
                    G76M,   8, 
                            Offset (0xAF), 
                    GAFM,   8, 
                    GB0M,   8
                }
            }

            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, 0xFFFFFFFF))
                        {
                            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, 0xFFFFFFFF))
                        {
                            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 (RMBS, PCI_Config, Zero, 0x0100)
                Field (RMBS, ByteAcc, NoLock, Preserve)
                {
                            Offset (0x4A), 
                    IOPD,   8, 
                            Offset (0x6C), 
                    LR2S,   16, 
                    LR2E,   16
                }

                OperationRegion (SMIP, SystemIO, SMIO, One)
                Field (SMIP, ByteAcc, NoLock, Preserve)
                {
                    SMIC,   8
                }

                OperationRegion (GPIO, SystemMemory, SMIB, 0x0200)
                Field (GPIO, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x88), 
                        ,   1, 
                    CLPS,   1, 
                            Offset (0xB0), 
                        ,   2, 
                    SLPS,   2, 
                            Offset (0x10B), 
                    FSCR,   1, 
                    FSSR,   1, 
                            Offset (0x1BE), 
                        ,   5, 
                    ALLS,   1
                }

                Method (SPTS, 1, NotSerialized)
                {
                }

                Method (SWAK, 1, NotSerialized)
                {
                }

                Method (IPTS, 1, NotSerialized)
                {
                    Store (One, CLPS)
                    Store (One, SLPS)
                    Store (Zero, ALLS)
                    Store (Zero, FSCR)
                    Store (One, FSSR)
                }

                Device (S800)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x0700)
                    Name (_STA, 0x0F)
                    Name (CRS, ResourceTemplate ()
                    {
                        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,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y10)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y13)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y12)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y11)
                        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
                            )
                        IO (Decode16,
                            0x0060,             // Range Minimum
                            0x0060,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            )
                        IO (Decode16,
                            0x0064,             // Range Minimum
                            0x0064,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            )
                        Memory32Fixed (ReadWrite,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y14)
                        Memory32Fixed (ReadWrite,
                            0xFEE00000,         // Address Base
                            0x00001000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED80000,         // Address Base
                            0x00010000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED61000,         // Address Base
                            0x00010000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y15)
                        Memory32Fixed (ReadWrite,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y16)
                        Memory32Fixed (ReadWrite,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y17)
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y10._MIN, PBB)
                        CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y10._MAX, PBH)
                        CreateByteField (CRS, \_SB.PCI0.SBRG.S800._Y10._LEN, PML)
                        Store (PMBS, PBB)
                        Store (PMBS, PBH)
                        Store (PMLN, PML)
                        If (SMBB)
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y11._MIN, SMB1)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y11._MAX, SMH1)
                            CreateByteField (CRS, \_SB.PCI0.SBRG.S800._Y11._LEN, SML1)
                            Store (SMBB, SMB1)
                            Store (SMBB, SMH1)
                            Store (SMBL, SML1)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y12._MIN, SMB0)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y12._MAX, SMH0)
                            CreateByteField (CRS, \_SB.PCI0.SBRG.S800._Y12._LEN, SML0)
                            Store (SMB0, SMB0)
                            Store (SMB0, SMH0)
                            Store (SMBM, SML0)
                        }

                        If (GPBS)
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y13._MIN, IGB)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.S800._Y13._MAX, IGH)
                            CreateByteField (CRS, \_SB.PCI0.SBRG.S800._Y13._LEN, IGL)
                            Store (GPBS, IGB)
                            Store (GPBS, IGH)
                            Store (GPLN, IGL)
                        }

                        If (APCB)
                        {
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y14._BAS, APB)
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y14._LEN, APL)
                            Store (APCB, APB)
                            Store (APCL, APL)
                        }

                        If (SPIB)
                        {
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y15._BAS, SPIB)
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y15._LEN, SPIL)
                            Store (\SPIB, SPIB)
                            Store (\SPIL, SPIL)
                        }

                        If (HPTB)
                        {
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y16._BAS, HXTB)
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y16._LEN, HXTL)
                            Store (HPTB, HXTB)
                            Store (HPTL, HXTL)
                        }

                        CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y17._BAS, ROMB)
                        CreateDWordField (CRS, \_SB.PCI0.SBRG.S800._Y17._LEN, ROML)
                        If (LR2S)
                        {
                            Store (ShiftLeft (LR2S, 0x10), ROMB)
                            Store (ShiftLeft (Add (Subtract (LR2E, LR2S), One), 0x10
                                ), ROML)
                        }
                        Else
                        {
                            Store (ROMS, ROMB)
                            Subtract (Zero, ROMS, ROML)
                        }

                        Return (CRS)
                    }
                }

                Device (SIO1)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x0111)
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y18)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y19)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        If (LAnd (LLess (SP1O, 0x03F0), LGreater (SP1O, 0xF0)))
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y18._MIN, GPI0)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y18._MAX, GPI1)
                            CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y18._LEN, GPIL)
                            Store (SP1O, GPI0)
                            Store (SP1O, GPI1)
                            Store (0x02, GPIL)
                        }

                        If (IO1B)
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y19._MIN, GP10)
                            CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y19._MAX, GP11)
                            CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y19._LEN, GPL1)
                            Store (IO1B, GP10)
                            Store (IO1B, GP11)
                            Store (IO1L, GPL1)
                        }

                        Return (CRS)
                    }

                    Name (DCAT, Package (0x15)
                    {
                        0x02, 
                        0x03, 
                        One, 
                        Zero, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0x05, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0x06, 
                        0xFF, 
                        0xFF, 
                        0xFF, 
                        0xFF
                    })
                    Mutex (MUT0, 0x00)
                    Method (ENFG, 1, NotSerialized)
                    {
                        Acquire (MUT0, 0x0FFF)
                        Store (0x87, INDX)
                        Store (0x87, INDX)
                        Store (Arg0, LDN)
                    }

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

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

                    Method (UHID, 1, NotSerialized)
                    {
                        If (LEqual (Arg0, One))
                        {
                            Return (0x1005D041)
                        }

                        Return (0x0105D041)
                    }

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

                    IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
                    {
                                Offset (0x07), 
                        LDN,    8, 
                                Offset (0x21), 
                        SCF1,   8, 
                        SCF2,   8, 
                        SCF3,   8, 
                        SCF4,   8, 
                        SCF5,   8, 
                        SCF6,   8, 
                        SCF7,   8, 
                                Offset (0x29), 
                        CKCF,   8, 
                                Offset (0x30), 
                        ACTR,   8, 
                                Offset (0x60), 
                        IOAH,   8, 
                        IOAL,   8, 
                        IOH2,   8, 
                        IOL2,   8, 
                                Offset (0x70), 
                        INTR,   8, 
                                Offset (0x74), 
                        DMCH,   8, 
                                Offset (0xE0), 
                        RGE0,   8, 
                        RGE1,   8, 
                        RGE2,   8, 
                        RGE3,   8, 
                        RGE4,   8, 
                        RGE5,   8, 
                        RGE6,   8, 
                        RGE7,   8, 
                        RGE8,   8, 
                                Offset (0xF0), 
                        OPT0,   8, 
                        OPT1,   8, 
                        OPT2,   8, 
                        OPT3,   8, 
                        OPT4,   8, 
                        OPT5,   8, 
                        OPT6,   8, 
                        OPT7,   8
                    }

                    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))
                        If (LAnd (LLess (DMCH, 0x04), LNotEqual (And (DMCH, 0x03, 
                            Local1), Zero)))
                        {
                            RDMA (Arg0, Arg1, Increment (Local1))
                        }

                        Store (Arg1, ACTR)
                        ShiftLeft (IOAH, 0x08, Local1)
                        Or (IOAL, Local1, Local1)
                        RRIO (Arg0, Arg1, Local1, 0x08)
                        EXFG ()
                    }

                    Name (CRS1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x01,               // Alignment
                            0x00,               // Length
                            _Y1C)
                        IRQNoFlags (_Y1A)
                            {}
                        DMA (Compatibility, NotBusMaster, Transfer8, _Y1B)
                            {}
                    })
                    CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1A._INT, IRQM)
                    CreateByteField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1B._DMA, DMAM)
                    CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1C._MIN, IO11)
                    CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1C._MAX, IO12)
                    CreateByteField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1C._LEN, LEN1)
                    Name (CRS2, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x01,               // Alignment
                            0x00,               // Length
                            _Y1F)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x01,               // Alignment
                            0x00,               // Length
                            _Y20)
                        IRQNoFlags (_Y1D)
                            {}
                        DMA (Compatibility, NotBusMaster, Transfer8, _Y1E)
                            {2}
                    })
                    CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1D._INT, IRQE)
                    CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1E._DMA, DMAE)
                    CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1F._MIN, IO21)
                    CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1F._MAX, IO22)
                    CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1F._LEN, LEN2)
                    CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y20._MIN, IO31)
                    CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y20._MAX, IO32)
                    CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y20._LEN, LEN3)
                    Name (CRS4, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x01,               // Alignment
                            0x00,               // Length
                            _Y22)
                        IRQ (Edge, ActiveLow, Shared, _Y21)
                            {}
                    })
                    CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y21._INT, IRQL)
                    CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y22._MIN, IOHL)
                    CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y22._MAX, IORL)
                    CreateByteField (CRS4, \_SB.PCI0.SBRG.SIO1._Y22._ALN, ALMN)
                    CreateByteField (CRS4, \_SB.PCI0.SBRG.SIO1._Y22._LEN, LENG)
                    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)
                    {
                        If (LEqual (Arg1, 0x02))
                        {
                            If (LPTM (0x02))
                            {
                                DSR2 (Arg0, Arg1)
                            }
                        }
                        Else
                        {
                            CreateWordField (Arg0, 0x09, IRQM)
                            CreateByteField (Arg0, 0x0C, DMAM)
                            CreateWordField (Arg0, 0x02, IO11)
                            ENFG (CGLD (Arg1))
                            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)
                            Store (Arg1, Local2)
                            If (LGreater (Local2, Zero))
                            {
                                Subtract (Local2, One, Local2)
                            }
                        }
                    }

                    Method (DSR2, 2, NotSerialized)
                    {
                        CreateWordField (Arg0, 0x11, IRQT)
                        CreateByteField (Arg0, 0x14, DMAT)
                        CreateWordField (Arg0, 0x02, IOT1)
                        CreateWordField (Arg0, 0x0A, IOT2)
                        ENFG (CGLD (Arg1))
                        And (IOT1, 0xFF, IOAL)
                        ShiftRight (IOT1, 0x08, IOAH)
                        And (IOT2, 0xFF, IOL2)
                        ShiftRight (IOT2, 0x08, IOH2)
                        If (IRQT)
                        {
                            FindSetRightBit (IRQT, Local0)
                            Subtract (Local0, One, INTR)
                        }
                        Else
                        {
                            Store (Zero, INTR)
                        }

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

                        EXFG ()
                        DCNT (Arg1, One)
                        Store (Arg1, Local2)
                        If (LGreater (Local2, Zero))
                        {
                            Subtract (Local2, One, Local2)
                        }
                    }

                    Method (SIOK, 1, NotSerialized)
                    {
                        ENFG (0x0A)
                        While (OPT3)
                        {
                            Stall (0x80)
                            Store (0xFF, OPT3)
                        }

                        And (Arg0, One, Local0)
                        And (OPT2, 0xFE, Local1)
                        Or (Local0, Local1, OPT2)
                        Store (And (Arg0, One), ACTR)
                        EXFG ()
                    }

                    Method (SLED, 1, NotSerialized)
                    {
                        ENFG (0x0B)
                        If (Arg0)
                        {
                            If (LEqual (OPT7, 0x87))
                            {
                                Store (0x45, OPT7)
                            }
                        }
                        Else
                        {
                            If (LNotEqual (OPT7, Zero))
                            {
                                Store (0x87, OPT7)
                            }
                        }

                        EXFG ()
                    }
                }

                Name (PMFG, Zero)
                Method (SIOS, 1, NotSerialized)
                {
                    Store ("SIOS", Debug)
                    ^SIO1.ENFG (0x0A)
                    OperationRegion (KBIO, SystemIO, 0x60, 0x05)
                    Field (KBIO, ByteAcc, NoLock, Preserve)
                    {
                        KBDT,   8, 
                                Offset (0x02), 
                                Offset (0x03), 
                                Offset (0x04), 
                        KBST,   8
                    }

                    If (LNotEqual (Arg0, 0x05))
                    {
                        Sleep (0xC8)
                        And (KBST, One, Local0)
                        While (Local0)
                        {
                            Store (KBDT, Local0)
                            Sleep (0xC8)
                            And (KBST, One, Local0)
                        }
                    }

                    If (LEqual (Arg0, One))
                    {
                        ^SIO1.SIOK (Ones)
                        ^SIO1.ENFG (0x0A)
                        If (KBFG)
                        {
                            Or (^SIO1.OPT6, 0x10, ^SIO1.OPT6)
                        }

                        If (MSFG)
                        {
                            Or (^SIO1.OPT6, 0x20, ^SIO1.OPT6)
                        }

                        If (LOr (LOr (LEqual (OSFL (), 0x04), LEqual (OSFL (), 0x09)), LOr (
                            LEqual (OSFL (), 0x0A), LEqual (OSFL (), 0x0B))))
                        {
                            And (^SIO1.RGE0, 0xF7, ^SIO1.RGE0)
                            If (CRFG)
                            {
                                Or (^SIO1.RGE0, 0x08, ^SIO1.RGE0)
                            }

                            If (CRFG)
                            {
                                Or (^SIO1.OPT2, One, ^SIO1.OPT2)
                            }

                            If (CRFG)
                            {
                                And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            }

                            If (CRFG)
                            {
                                Or (^SIO1.OPT7, 0x10, ^SIO1.OPT7)
                            }

                            If (CRFG)
                            {
                                And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            }

                            If (CRFG)
                            {
                                Or (^SIO1.RGE8, 0xC0, ^SIO1.RGE8)
                            }
                        }
                        Else
                        {
                            Or (^SIO1.OPT2, One, ^SIO1.OPT2)
                            And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            Or (^SIO1.OPT7, 0x10, ^SIO1.OPT7)
                            And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            Or (^SIO1.RGE8, 0xC0, ^SIO1.RGE8)
                        }
                    }

                    If (LGreaterEqual (Arg0, 0x03))
                    {
                        And (^SIO1.RGE0, 0x9F, ^SIO1.RGE0)
                        Store (Zero, ^SIO1.RGE1)
                        Store (Zero, ^SIO1.RGE2)
                        Store (^SIO1.RGE3, Local0)
                        Sleep (0xC8)
                        If (KBFG)
                        {
                            Or (^SIO1.RGE0, 0x41, ^SIO1.RGE0)
                        }

                        If (MSFG)
                        {
                            Or (^SIO1.RGE0, 0x22, ^SIO1.RGE0)
                        }

                        If (LOr (LOr (LEqual (OSFL (), 0x04), LEqual (OSFL (), 0x09)), LOr (
                            LEqual (OSFL (), 0x0A), LEqual (OSFL (), 0x0B))))
                        {
                            And (^SIO1.RGE0, 0xF7, ^SIO1.RGE0)
                            If (CRFG)
                            {
                                Or (^SIO1.RGE0, 0x08, ^SIO1.RGE0)
                            }

                            If (CRFG)
                            {
                                And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            }

                            If (CRFG)
                            {
                                And (^SIO1.OPT7, 0xEF, ^SIO1.OPT7)
                            }
                        }
                        Else
                        {
                            And (^SIO1.RGE8, 0x3F, ^SIO1.RGE8)
                            And (^SIO1.OPT7, 0xEF, ^SIO1.OPT7)
                        }
                    }

                    If (Or (LEqual (Arg0, One), LEqual (Arg0, 0x03)))
                    {
                        ^SIO1.SLED (Ones)
                    }

                    ^SIO1.EXFG ()
                }

                Method (SIOW, 1, NotSerialized)
                {
                    Store ("SIOW", Debug)
                    ^SIO1.ENFG (0x0A)
                    ^SIO1.SIOK (Zero)
                    ^SIO1.ENFG (0x0A)
                    While (^SIO1.OPT3)
                    {
                        Stall (0x80)
                        Store (0xFF, ^SIO1.OPT3)
                    }

                    And (^SIO1.RGE0, 0x9F, ^SIO1.RGE0)
                    And (^SIO1.OPT6, 0xCF, ^SIO1.OPT6)
                    And (^SIO1.OPT2, 0xFE, ^SIO1.OPT2)
                    ^SIO1.SLED (Zero)
                    ^SIO1.EXFG ()
                    ^SIO1.ENFG (0x0B)
                    Or (^SIO1.ACTR, 0xE0, ^SIO1.ACTR)
                    ^SIO1.EXFG ()
                }

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

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

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

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

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

                    Name (_PRS, 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 ()
                                {4}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x02F8,             // Range Minimum
                                0x02F8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {3}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x03E8,             // Range Minimum
                                0x03E8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {4}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x02E8,             // Range Minimum
                                0x02E8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {3}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        EndDependentFn ()
                    })
                }

                OperationRegion (WIN2, SystemIO, 0x2E, 0x02)
                Field (WIN2, ByteAcc, NoLock, Preserve)
                {
                    IND1,   8, 
                    DAT1,   8
                }

                IndexField (IND1, DAT1, ByteAcc, NoLock, Preserve)
                {
                            Offset (0x07), 
                    LDN1,   8, 
                            Offset (0x1B), 
                    MFP1,   8, 
                            Offset (0x24), 
                    MFP2,   8, 
                            Offset (0x26), 
                    GLO1,   8, 
                    GLO2,   8, 
                            Offset (0x2A), 
                    MFP3,   8, 
                            Offset (0x30), 
                    ACT1,   8, 
                            Offset (0x60), 
                    IOH1,   8, 
                    IOL1,   8, 
                            Offset (0x70), 
                    INT1,   8, 
                            Offset (0xE0), 
                    VBAT,   8
                }

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

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

                Device (CIR)
                {
                    Name (_HID, EisaId ("NTN0530"))
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (IRST (0x10))
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x06, LDN1)
                        Store (Zero, ACT1)
                        Store (0x0E, LDN1)
                        Store (Zero, ACT1)
                        EXF1 ()
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF1, ResourceTemplate ()
                        {
                            IO (Decode16,
                                0x0230,             // Range Minimum
                                0x0230,             // Range Maximum
                                0x00,               // Alignment
                                0x10,               // Length
                                )
                            IRQ (Edge, ActiveHigh, Shared, )
                                {3}
                            IO (Decode16,
                                0x0240,             // Range Minimum
                                0x0240,             // Range Maximum
                                0x00,               // Alignment
                                0x10,               // Length
                                )
                        })
                        Return (BUF1)
                    }

                    Method (_SRS, 1, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x06, LDN1)
                        CreateWordField (Arg0, 0x09, IRQE)
                        If (IRQE)
                        {
                            FindSetRightBit (IRQE, Local0)
                            Subtract (Local0, One, INT1)
                        }
                        Else
                        {
                            Store (Zero, INT1)
                        }

                        Store (One, ACT1)
                        Store (0x0E, LDN1)
                        Store (One, ACT1)
                        EXF1 ()
                    }

                    Method (IRST, 1, NotSerialized)
                    {
                        ^^SIO1.ENFG (^^SIO1.CGLD (Arg0))
                        If (^^SIO1.ACTR)
                        {
                            Store (0x0A, LDN1)
                            Store (VBAT, Local0)
                            Or (Local0, 0x08, Local0)
                            Store (Local0, VBAT)
                            Store (0x0F, Local0)
                        }
                        Else
                        {
                            If (^^SIO1.IOAH)
                            {
                                If (And (MFP1, 0x10))
                                {
                                    Store (0x0D, Local0)
                                }
                                Else
                                {
                                    Store (Zero, Local0)
                                }
                            }
                            Else
                            {
                                Store (Zero, Local0)
                            }
                        }

                        ^^SIO1.EXFG ()
                        Return (Local0)
                    }

                    Method (NCAP, 0, NotSerialized)
                    {
                        Store (0x02, Local0)
                        Or (0xF0000000, Local0, Local0)
                        Return (Local0)
                    }

                    Method (NRXL, 0, NotSerialized)
                    {
                        Store (Zero, Local0)
                        ShiftLeft (Local0, 0x08, Local0)
                        Or (Local0, 0x80, Local0)
                        ShiftLeft (Local0, 0x08, Local0)
                        Or (Local0, 0xF5, Local0)
                        ShiftLeft (Local0, 0x08, Local0)
                        Or (Local0, 0x09, Local0)
                        Return (Local0)
                    }

                    Method (NTXP, 1, NotSerialized)
                    {
                        ENF1 ()
                        Store (MFP3, Local0)
                        And (Local0, 0xF7, Local0)
                        Store (Local0, MFP3)
                        Store (MFP2, Local1)
                        Or (Local0, 0x40, Local1)
                        Store (Local1, MFP2)
                        If (LEqual (Arg0, One))
                        {
                            Or (Local0, 0x08, Local0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x02))
                            {
                                And (Local1, 0xBF, Local1)
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x03))
                                {
                                    Or (Local0, 0x08, Local0)
                                    And (Local1, 0xBF, Local1)
                                }
                            }
                        }

                        Store (Local0, MFP3)
                        Store (Local1, MFP2)
                        EXF1 ()
                    }

                    Method (NLED, 0, NotSerialized)
                    {
                        ENF1 ()
                        Store (0x09, LDN1)
                        Store (0x0A, Local1)
                        While (Local1)
                        {
                            Sleep (0x32)
                            Sleep (0x32)
                            Decrement (Local1)
                        }

                        EXF1 ()
                    }

                    Method (_PSW, 1, NotSerialized)
                    {
                        Store (Arg0, CRFG)
                    }
                }

                Scope (\)
                {
                    Name (CRFG, One)
                }

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

                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
                            )
                    })
                }

                Scope (\_SB)
                {
                    Scope (PCI0)
                    {
                        Scope (SBRG)
                        {
                            Method (RRIO, 4, NotSerialized)
                            {
                                Store ("RRIO", Debug)
                            }

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

                Device (RMSC)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x10)
                    Name (CRS1, 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,
                            0x0044,             // Range Minimum
                            0x0044,             // Range Maximum
                            0x00,               // Alignment
                            0x1C,               // 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,
                            0x00E0,             // Range Minimum
                            0x00E0,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x04D0,             // Range Minimum
                            0x04D0,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                    })
                    Name (CRS2, 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,
                            0x0044,             // Range Minimum
                            0x0044,             // Range Maximum
                            0x00,               // Alignment
                            0x1C,               // 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,
                            0x00E0,             // Range Minimum
                            0x00E0,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x04D0,             // Range Minimum
                            0x04D0,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        If (And (MBEC, 0xFFFF))
                        {
                            Return (CRS1)
                        }
                        Else
                        {
                            Return (CRS2)
                        }
                    }
                }

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

                Device (NBRM)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x99)
                    Name (CRS, ResourceTemplate ()
                    {
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (CRS)
                    }
                }

                Device (PS2K)
                {
                    Name (_HID, EisaId ("PNP0303"))
                    Name (_CID, EisaId ("PNP030B"))
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (IOST, 0x0400))
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            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}
                    })
                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFn (0x00, 0x00)
                        {
                            FixedIO (
                                0x0060,             // Address
                                0x01,               // Length
                                )
                            FixedIO (
                                0x0064,             // Address
                                0x01,               // Length
                                )
                            IRQNoFlags ()
                                {1}
                        }
                        EndDependentFn ()
                    })
                    Method (_PSW, 1, NotSerialized)
                    {
                        Store (Arg0, KBFG)
                    }
                }

                Scope (\)
                {
                    Name (KBFG, One)
                }

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

                Device (PS2M)
                {
                    Name (_HID, EisaId ("PNP0F03"))
                    Name (_CID, EisaId ("PNP0F13"))
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (IOST, 0x4000))
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            Return (Zero)
                        }
                    }

                    Name (CRS1, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {12}
                    })
                    Name (CRS2, 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 ()
                            {12}
                    })
                    Method (_CRS, 0, NotSerialized)
                    {
                        If (And (IOST, 0x0400))
                        {
                            Return (CRS1)
                        }
                        Else
                        {
                            Return (CRS2)
                        }
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        StartDependentFn (0x00, 0x00)
                        {
                            IRQNoFlags ()
                                {12}
                        }
                        EndDependentFn ()
                    })
                    Method (_PSW, 1, NotSerialized)
                    {
                        Store (Arg0, MSFG)
                    }
                }

                Scope (\)
                {
                    Name (MSFG, One)
                }

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

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

                    Method (_STA, 0, Serialized)
                    {
                        If (And (IOST, One))
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            Return (Zero)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        ^^SIO1.DCNT (Zero, Zero)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (^^SIO1.DCRS (Zero, Zero))
                    }

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

                    Name (_PRS, 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 ()
                                {4}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x02F8,             // Range Minimum
                                0x02F8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {3}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x03E8,             // Range Minimum
                                0x03E8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {4}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        StartDependentFnNoPri ()
                        {
                            IO (Decode16,
                                0x02E8,             // Range Minimum
                                0x02E8,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IRQNoFlags ()
                                {3}
                            DMA (Compatibility, NotBusMaster, Transfer8, )
                                {}
                        }
                        EndDependentFn ()
                    })
                }

                Method (UAR1._PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x16, 0x04))
                }
            }

            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, 0x04))
                }
            }

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

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

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

            Device (USB5)
            {
                Name (_ADR, 0x00160000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0B, 0x04))
                }
            }

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

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

            Device (SATA)
            {
                Name (_ADR, 0x00110000)
                If (LEqual (STCL, 0x0101))
                {
                    Method (_INI, 0, NotSerialized)
                    {
                    }

                    OperationRegion (SACS, PCI_Config, Zero, 0x40)
                    Field (SACS, AnyAcc, NoLock, Preserve)
                    {
                                Offset (0x24), 
                        STB5,   32
                    }

                    Name (SPTM, Buffer (0x14)
                    {
                        /* 0000 */    0x78, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 
                        /* 0008 */    0x78, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 
                        /* 0010 */    0x1F, 0x00, 0x00, 0x00
                    })
                    Device (PRID)
                    {
                        Name (_ADR, Zero)
                        Method (_GTM, 0, NotSerialized)
                        {
                            Return (SPTM)
                        }

                        Method (_STM, 3, NotSerialized)
                        {
                        }

                        Name (PRIS, Zero)
                        Method (_PS0, 0, NotSerialized)
                        {
                            OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                            Field (BAR, AnyAcc, NoLock, Preserve)
                            {
                                        Offset (0x120), 
                                    ,   7, 
                                PMBY,   1, 
                                        Offset (0x128), 
                                PMS0,   4, 
                                        Offset (0x129), 
                                PMS1,   4, 
                                        Offset (0x220), 
                                    ,   7, 
                                PSBY,   1, 
                                        Offset (0x228), 
                                PSS0,   4, 
                                        Offset (0x229), 
                                PSS1,   4, 
                                        Offset (0x2A0), 
                                    ,   7
                            }

                            If (LOr (LEqual (OSTY, 0x06), LEqual (OSTY, 0x04)))
                            {
                                If (PMS1)
                                {
                                    Store (0x32, Local0)
                                    While (LAnd (LEqual (PMBY, One), Local0))
                                    {
                                        Sleep (0xFA)
                                        Decrement (Local0)
                                    }
                                }

                                If (PSS1)
                                {
                                    Store (0x32, Local0)
                                    While (LAnd (LEqual (PSBY, One), Local0))
                                    {
                                        Sleep (0xFA)
                                        Decrement (Local0)
                                    }
                                }
                            }

                            Store (Zero, PRIS)
                        }

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

                        Method (_PSC, 0, NotSerialized)
                        {
                            Return (PRIS)
                        }

                        Device (P_D0)
                        {
                            Name (_ADR, Zero)
                            Method (_STA, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x128), 
                                    PMS0,   4, 
                                            Offset (0x129), 
                                    PMS1,   4
                                }

                                If (Not (LEqual (PMS1, Zero)))
                                {
                                    Return (0x0F)
                                }
                                Else
                                {
                                    Return (Zero)
                                }
                            }

                            Name (S12P, Zero)
                            Method (_PS0, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x120), 
                                        ,   7, 
                                    PMBY,   1
                                }

                                Store (0x32, Local0)
                                While (LAnd (LEqual (PMBY, One), Local0))
                                {
                                    Sleep (0xFA)
                                    Decrement (Local0)
                                }

                                Store (Zero, S12P)
                            }

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

                            Method (_PSC, 0, NotSerialized)
                            {
                                Return (S12P)
                            }
                        }

                        Device (P_D1)
                        {
                            Name (_ADR, One)
                            Method (_STA, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x228), 
                                    PSS0,   4, 
                                            Offset (0x229), 
                                    PSS1,   4
                                }

                                If (Not (LEqual (PSS1, Zero)))
                                {
                                    Return (0x0F)
                                }
                                Else
                                {
                                    Return (Zero)
                                }
                            }

                            Name (S12P, Zero)
                            Method (_PS0, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x220), 
                                        ,   7, 
                                    PSBY,   1
                                }

                                Store (0x32, Local0)
                                While (LAnd (LEqual (PSBY, One), Local0))
                                {
                                    Sleep (0xFA)
                                    Decrement (Local0)
                                }

                                Store (Zero, S12P)
                            }

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

                            Method (_PSC, 0, NotSerialized)
                            {
                                Return (S12P)
                            }
                        }
                    }

                    Device (SECD)
                    {
                        Name (_ADR, One)
                        Method (_GTM, 0, NotSerialized)
                        {
                            Return (SPTM)
                        }

                        Method (_STM, 3, NotSerialized)
                        {
                        }

                        Name (SECS, Zero)
                        Method (_PS0, 0, NotSerialized)
                        {
                            OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                            Field (BAR, AnyAcc, NoLock, Preserve)
                            {
                                        Offset (0x1A0), 
                                    ,   7, 
                                SMBY,   1, 
                                        Offset (0x1A8), 
                                SMS0,   4, 
                                        Offset (0x1A9), 
                                SMS1,   4, 
                                        Offset (0x2A0), 
                                    ,   7, 
                                SSBY,   1, 
                                        Offset (0x2A8), 
                                SSS0,   4, 
                                        Offset (0x2A9), 
                                SSS1,   4, 
                                        Offset (0x2AC)
                            }

                            If (LOr (LEqual (OSTY, 0x06), LEqual (OSTY, 0x04)))
                            {
                                If (SMS1)
                                {
                                    Store (0x32, Local0)
                                    While (LAnd (LEqual (SMBY, One), Local0))
                                    {
                                        Sleep (0xFA)
                                        Decrement (Local0)
                                    }
                                }

                                If (SSS1)
                                {
                                    Store (0x32, Local0)
                                    While (LAnd (LEqual (SSBY, One), Local0))
                                    {
                                        Sleep (0xFA)
                                        Decrement (Local0)
                                    }
                                }
                            }

                            Store (Zero, SECS)
                        }

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

                        Method (_PSC, 0, NotSerialized)
                        {
                            Return (SECS)
                        }

                        Device (S_D0)
                        {
                            Name (_ADR, Zero)
                            Method (_STA, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x1A8), 
                                    SMS0,   4, 
                                            Offset (0x1A9), 
                                    SMS1,   4
                                }

                                If (Not (LEqual (SMS1, Zero)))
                                {
                                    Return (0x0F)
                                }
                                Else
                                {
                                    Return (Zero)
                                }
                            }

                            Name (S12P, Zero)
                            Method (_PS0, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x1000)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x1A0), 
                                        ,   7, 
                                    SMBY,   1
                                }

                                Store (0x32, Local0)
                                While (LAnd (LEqual (SMBY, One), Local0))
                                {
                                    Sleep (0xFA)
                                    Decrement (Local0)
                                }

                                Store (Zero, S12P)
                            }

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

                            Method (_PSC, 0, NotSerialized)
                            {
                                Return (S12P)
                            }
                        }

                        Device (S_D1)
                        {
                            Name (_ADR, One)
                            Method (_STA, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x2A8), 
                                    SSS0,   4, 
                                            Offset (0x2A9), 
                                    SSS1,   4
                                }

                                If (Not (LEqual (SSS1, Zero)))
                                {
                                    Return (0x0F)
                                }
                                Else
                                {
                                    Return (Zero)
                                }
                            }

                            Name (S12P, Zero)
                            Method (_PS0, 0, NotSerialized)
                            {
                                OperationRegion (BAR, SystemMemory, STB5, 0x0400)
                                Field (BAR, AnyAcc, NoLock, Preserve)
                                {
                                            Offset (0x2A0), 
                                        ,   7, 
                                    SSBY,   1
                                }

                                Store (0x32, Local0)
                                While (LAnd (LEqual (SSBY, One), Local0))
                                {
                                    Sleep (0xFA)
                                    Decrement (Local0)
                                }

                                Store (Zero, S12P)
                            }

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

                            Method (_PSC, 0, NotSerialized)
                            {
                                Return (S12P)
                            }
                        }
                    }
                }
            }

            Device (PE20)
            {
                Name (_ADR, 0x00150000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x0F, 0x04))
                }

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

                    Return (PR20)
                }
            }

            Device (PE21)
            {
                Name (_ADR, 0x00150001)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x10, 0x04))
                }

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

                    Return (PR21)
                }
            }

            Device (PE22)
            {
                Name (_ADR, 0x00150002)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x11, 0x04))
                }
            }

            Device (PE23)
            {
                Name (_ADR, 0x00150003)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (GPRW (0x12, 0x04))
                }

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

                    Return (PR23)
                }
            }
        }

        Scope (\_GPE)
        {
            Method (_L18, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.PC02, 0x02)
                Notify (\_SB.PCI0.PC04, 0x02)
                Notify (\_SB.PCI0.PC05, 0x02)
                Notify (\_SB.PCI0.PC06, 0x02)
                Notify (\_SB.PCI0.PC09, 0x02)
                Notify (\_SB.PCI0.PC0A, 0x02)
                Notify (\_SB.PCI0.PC0B, 0x02)
                Notify (\_SB.PCI0.PC0D, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

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

            Method (_L1D, 0, NotSerialized)
            {
                \_SB.PCI0.SBRG.SIOH ()
            }

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

            Method (_L16, 0, NotSerialized)
            {
                \_SB.PCI0.SBRG.SIOH ()
            }

            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.USB3, 0x02)
                Notify (\_SB.PCI0.UHC4, 0x02)
                Notify (\_SB.PCI0.USB5, 0x02)
                Notify (\_SB.PCI0.UHC6, 0x02)
                Notify (\_SB.PCI0.UHC7, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L0F, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.PE20, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L10, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.PE21, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L11, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.PE22, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L12, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.PE23, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }
        }

        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C"))
            Name (_UID, 0xAA)
            Name (_STA, 0x0B)
        }
    }

    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, 
            PIRE,   8, 
            PIRF,   8, 
            PIRG,   8, 
            PIRH,   8, 
                    Offset (0x10), 
            PIRS,   8, 
                    Offset (0x13), 
            HDAD,   8, 
                    Offset (0x15), 
            GEC,    8, 
                    Offset (0x30), 
            USB1,   8, 
            USB2,   8, 
            USB3,   8, 
            USB4,   8, 
            USB5,   8, 
            USB6,   8, 
            USB7,   8, 
                    Offset (0x40), 
            IDE,    8, 
            SATA,   8, 
                    Offset (0x50), 
            GPP0,   8, 
            GPP1,   8, 
            GPP2,   8, 
            GPP3,   8
        }

        OperationRegion (KBDD, SystemIO, 0x64, One)
        Field (KBDD, ByteAcc, NoLock, Preserve)
        {
            PD64,   8
        }

        Method (IRQC, 0, NotSerialized)
        {
            INTA (0x1F)
            INTB (0x1F)
            INTC (0x1F)
            INTD (0x1F)
            Store (PD64, Local1)
            Store (0x1F, PIRE)
            Store (0x1F, PIRF)
            Store (0x1F, PIRG)
            Store (0x1F, PIRH)
        }

        Method (INTA, 1, NotSerialized)
        {
            Store (Arg0, PIRA)
            Store (Arg0, HDAD)
            Store (Arg0, GEC)
            Store (Arg0, GPP0)
            Store (Arg0, GPP0)
        }

        Method (INTB, 1, NotSerialized)
        {
            Store (Arg0, PIRB)
            Store (Arg0, USB2)
            Store (Arg0, USB4)
            Store (Arg0, USB6)
            Store (Arg0, GPP1)
            Store (Arg0, IDE)
        }

        Method (INTC, 1, NotSerialized)
        {
            Store (Arg0, PIRC)
            Store (Arg0, USB1)
            Store (Arg0, USB3)
            Store (Arg0, USB5)
            Store (Arg0, USB7)
            Store (Arg0, GPP2)
        }

        Method (INTD, 1, NotSerialized)
        {
            Store (Arg0, PIRD)
            Store (Arg0, SATA)
            Store (Arg0, GPP3)
        }

        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)
            {
                INTA (0x1F)
            }

            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)
                INTA (Local0)
            }
        }

        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)
            {
                INTB (0x1F)
            }

            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)
                INTB (Local0)
            }
        }

        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)
            {
                INTC (0x1F)
            }

            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)
                INTC (Local0)
            }
        }

        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)
            {
                INTD (0x1F)
            }

            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)
                INTD (Local0)
            }
        }

        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 (0x1F, 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 (0x1F, 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 (0x1F, 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 (0x1F, 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.PCI0.SBRG)
    {
        Method (SIOH, 0, NotSerialized)
        {
            Notify (PWRB, 0x02)
        }
    }

    Scope (_PR)
    {
        OperationRegion (SSDT, SystemMemory, 0xFFFF0000, 0xFFFF)
        Name (DCOR, 0x02)
        Name (TBLD, 0x04)
        Name (NPSS, 0x05)
        Name (HNDL, 0x80000000)
        Name (APSS, Package (0x0A)
        {
            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }, 

            Package (0x06)
            {
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF, 
                0xFFFF
            }
        })
        Processor (P001, 0x01, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P002, 0x02, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P003, 0x03, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P004, 0x04, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P005, 0x05, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P006, 0x06, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P007, 0x07, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }

        Processor (P008, 0x08, 0x00000810, 0x06)
        {
            Name (TYPE, 0x80000000)
            Method (_PDC, 1, NotSerialized)
            {
                CreateDWordField (Arg0, 0x08, DAT0)
                Store (DAT0, TYPE)
                If (LAnd (LEqual (TBLD, Zero), LNotEqual (NPSS, Zero)))
                {
                    If (LOr (LEqual (And (TYPE, 0x1B), 0x1B), LEqual (DCOR, 
                        Zero)))
                    {
                        Store (One, TBLD)
                        Load (SSDT, HNDL)
                    }
                }
            }
        }
    }

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

    Device (HPET)
    {
        Name (_HID, EisaId ("PNP0103"))
        Name (CRS, ResourceTemplate ()
        {
            Memory32Fixed (ReadOnly,
                0xFED00000,         // Address Base
                0x00000400,         // Address Length
                _Y23)
        })
        Method (_STA, 0, NotSerialized)
        {
            Return (0x0F)
        }

        Method (_CRS, 0, NotSerialized)
        {
            CreateDWordField (CRS, \HPET._Y23._BAS, HPT)
            Store (0xFED00000, HPT)
            Return (CRS)
        }
    }

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

        PTS (Arg0)
        Store (Zero, Index (WAKP, Zero))
        Store (Zero, Index (WAKP, One))
        Store (ASSB, WSSB)
        Store (AOTB, WOTB)
        Store (AAXB, WAXB)
        Store (Arg0, ASSB)
        Store (OSFL (), AOTB)
        Store (Zero, AAXB)
    }

    Method (_WAK, 1, NotSerialized)
    {
        ShiftLeft (Arg0, 0x04, DBG8)
        WAK (Arg0)
        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)
    }

    Device (OMSC)
    {
        Name (_HID, EisaId ("PNP0C02"))
        Name (_UID, 0x0E11)
    }

    Device (_SB.RMEM)
    {
        Name (_HID, EisaId ("PNP0C01"))
        Name (_UID, One)
    }

    If (OSCF)
    {
        Scope (_SB.PCI0)
        {
            Method (_OSC, 4, NotSerialized)
            {
                Name (SUPP, Zero)
                Name (CTRL, Zero)
                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)
                    }

                    And (CTRL, 0x1D, CTRL)
                    If (Not (And (CDW1, One)))
                    {
                        If (And (CTRL, One)) {}
                        If (And (CTRL, 0x04))
                        {
                            Store (One, EPNM)
                        }
                        Else
                        {
                            Store (Zero, EPNM)
                        }

                        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)
                }
            }
        }
    }

    Name (GNLD, 0x02)
    Name (OBDP, 0x02)
    Method (DBGL, 1, NotSerialized)
    {
        If (LEqual (Arg0, One))
        {
            Or (\_SB.PCI0.SBRG.IOPD, 0x20, \_SB.PCI0.SBRG.IOPD)
            \_SB.PCI0.SBRG.SIO1.ENFG (0x08)
            And (\_SB.PCI0.SBRG.SIO1.SCF7, 0xEF, \_SB.PCI0.SBRG.SIO1.SCF7)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
        Else
        {
            And (\_SB.PCI0.SBRG.IOPD, 0xDF, \_SB.PCI0.SBRG.IOPD)
            \_SB.PCI0.SBRG.SIO1.ENFG (0x08)
            Or (\_SB.PCI0.SBRG.SIO1.SCF7, 0x10, \_SB.PCI0.SBRG.SIO1.SCF7)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
    }

    Method (SYSL, 1, NotSerialized)
    {
        If (LEqual (Arg0, One))
        {
            \_SB.PCI0.SBRG.SIO1.ENFG (0x08)
            And (\_SB.PCI0.SBRG.SIO1.OPT0, 0x7F, \_SB.PCI0.SBRG.SIO1.OPT0)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
        Else
        {
            \_SB.PCI0.SBRG.SIO1.ENFG (0x08)
            Or (\_SB.PCI0.SBRG.SIO1.OPT0, 0x80, \_SB.PCI0.SBRG.SIO1.OPT0)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
    }

    Method (LEDS, 1, NotSerialized)
    {
        If (LEqual (GNLD, One))
        {
            \_SB.PCI0.SBRG.SIO1.ENFG (0x0B)
            And (\_SB.PCI0.SBRG.SIO1.OPT7, Zero, \_SB.PCI0.SBRG.SIO1.OPT7)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
    }

    Method (LEDW, 1, NotSerialized)
    {
        If (LEqual (GNLD, 0x02))
        {
            SYSL (Zero)
        }

        If (LEqual (GNLD, One))
        {
            \_SB.PCI0.SBRG.SIO1.ENFG (0x0B)
            And (\_SB.PCI0.SBRG.SIO1.OPT7, Zero, \_SB.PCI0.SBRG.SIO1.OPT7)
            \_SB.PCI0.SBRG.SIO1.EXFG ()
        }
    }

    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)
        {
            SPTS (Arg0)
            \_SB.PCI0.SBRG.IPTS (Arg0)
            \_SB.PCI0.NPTS (Arg0)
            S4RS (Arg0)
            LEDS (Arg0)
            \_SB.PCI0.SBRG.SIOS (Arg0)
        }
    }

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

Link to comment
Share on other sites

Apple is withholding an entire folder called xcpm which contains numerous function definitions of which two are called directly outside of the kernel.  It doesn't matter what platform you compile the kernel from, the system will output errors since the symbols for those functions are not available.  I have some understand of how those functions work, and, fortunately, they are not critical to the normal functioning of the OS.  You can pretty much ignore those errors for now.

 

I hope El Capo doesn't mark the beginning of an era where Apple releases only the barebone kernel source code to the public and keep critical kernel functions to themselves.  

Don't need me to tell ! I need you to answer two questions : are You a programmer ? As you inserted these two symbols ? Or someone helped you ?

Because I see what is in the kernel ) .

 

p.s. if you boot the system you get's this problem symbol's is because in the kernel there are no symbols - that is, functions !

Link to comment
Share on other sites

 Share

×
×
  • Create New...