IPB

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

> DSDT

Differentiated System Description Table (DSDT) - DSDT is a part of the ACPI specification and it supplies configuration information about a base system. ACPI capable computers come with a preinstalled DSDT from the manufacturer. A common Linux/OS X problem is missing ACPI functionality (fans not running, laptop screens not shutting off, etc.)

This subforum is dedicated to patches/fixes able to be inserted/modified from an extracted dsdt.dsl, which is then compiled into a DSDT.aml for OS X to pick up and use (with a proper bootloader).

These fixes are not permanent, and do not damage your BIOS.

2 Pages V   1 2 >  
Start a new topic Add Reply
> Slow SATA issue FIX, How to fix HPET IRQ conflict that cause that ^^^
THe KiNG
post Sep 14 2009, 10:48 AM
Post #1
After many trial and failure I finally found how to fix HPET IRQ conflict on some ASUS boards including mine.
I lost so many time trying to change the IRQ used by both SATA and HPET, and turned out that was wrong!
After I've looked better in MacPro4,1 ioreg dump I saw that HPET use there IRQ 2 and 8, and on my board 14 and 8.
The trick is to free that IRQ (2) in order to be used by HPET.
Here are the changes:

Original HPET:
CODE
Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (CRS, ResourceTemplate ()
{
Memory32Fixed (ReadOnly,
0xFED00000, // Address Base
0x00000400, // Address Length
_Y0F)
})
OperationRegion (^LPCR, SystemMemory, 0xFED1F404, 0x04)
Field (LPCR, AnyAcc, NoLock, Preserve)
{
HPTS, 2,
, 5,
HPTE, 1,
Offset (0x04)
}

Method (_STA, 0, NotSerialized)
{
If (LEqual (OSFL (), Zero))
{
If (HPTE)
{
Return (0x0F)
}
}
Else
{
If (HPTE)
{
Return (0x0B)
}
}

Return (Zero)
}

Method (_CRS, 0, NotSerialized)
{
CreateDWordField (CRS, \_SB.PCI0.SBRG.HPET._Y0F._BAS, HPT)
Multiply (HPTS, 0x1000, Local0)
Add (Local0, 0xFED00000, HPT)
Return (CRS)
}
}


Changed HPET:

CODE
Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (CRS, ResourceTemplate ()
{
IRQNoFlags ()
{0}
IRQNoFlags ()
{8}
Memory32Fixed (ReadOnly,
0xFED00000, // Address Base
0x00000400, // Address Length
_Y0F)
})
OperationRegion (^LPCR, SystemMemory, 0xFED1F404, 0x04)
Field (LPCR, AnyAcc, NoLock, Preserve)
{
HPTS, 2,
, 5,
HPTE, 1,
Offset (0x04)
}

Method (_STA, 0, NotSerialized)
{
If (LEqual (OSFL (), Zero))
{
If (HPTE)
{
Return (0x0F)
}
}
Else
{
If (HPTE)
{
Return (0x0B)
}
}

Return (Zero)
}

Method (_CRS, 0, NotSerialized)
{
CreateDWordField (CRS, \_SB.PCI0.SBRG.HPET._Y0F._BAS, HPT)
Multiply (HPTS, 0x1000, Local0)
Add (Local0, 0xFED00000, HPT)
Return (CRS)
}
}


Original RTC0:

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


Changed RTC0:

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


Original TMR:

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


Changed TMR:

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


Original PIC:

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


Changed PIC:

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


After all this HPET looks in ioreg identical with MacPro4,1 one:


And SATA is using IRQ 14 as it should:


I recommend this changes for all boards.

Enjoy!
Slice
post Sep 14 2009, 12:21 PM
Post #2
My HPET works without any IRQ
CODE
                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103"))
                    Name (ATT3, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadWrite,
                            0xFED00000,         // Address Base
                            0x00000400,         // Address Length
                            )
                    })
                    Name (ATT4, ResourceTemplate ()
                    {
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Return (ATT3)
                    }
                }

as well as RTC and TMR.
PIC uses IRQ 2
But in ioreg I see that HPET and RTC uses interrupts
CODE
    | +-o HPET  <class IOACPIPlatformDevice, id 0x10000012e, registered, matched, active, busy 0 (96 ms), retain 7>
    | | | {
    | | |   "_STA" = 0xf
    | | |   "IODeviceMemory" = (({"address"=0xfffffffffed00000,"length"=0x400}))
    | | |   "name" = <504e503031303300>
    | | |   "IOInterruptControllers" = ("io-apic-0","io-apic-0")
    | | |   "IOInterruptSpecifiers" = (<1700000000000000>,<0b00000000000000>)
    | | | }
    | | |
    | | +-o AppleHPET  <class AppleHPET, id 0x1000001f3, !registered, !matched, active, busy 0, retain 4>
    | |     {
..............
    | +-o RTC  <class IOACPIPlatformDevice, id 0x100000127, registered, matched, active, busy 0 (94 ms), retain 8>
    | | | {
    | | |   "IODeviceMemory" = (({"address"=0x70,"length"=0x2}),({"address"=0x72,"length"=0x6}))
    | | |   "_STA" = 0xf
    | | |   "IOInterruptSpecifiers" = (<0400000000000000>)
    | | |   "acpi-wake-type" = 0x4
    | | |   "name" = <504e503042303000>
    | | |   "IOInterruptControllers" = ("ACPIEventController")
    | | | }
    | | |
    | | +-o AppleRTC  <class AppleRTC, id 0x1000001f1, registered, matched, active, busy 0 (0 ms), retain 6>
    | |     {


Snow 10.6.1 on Dell 1525 Chipset ICH8M.
Пожалуйста, прочитайте ЧаВо!
My page
THe KiNG
post Sep 14 2009, 12:40 PM
Post #3
Yes, HPET works w/o IRQ added in DSDT, that is just for cosmetic wink.gif
PIC(IPIC) was the key...
Slice
post Sep 14 2009, 12:45 PM
Post #4
When I add IRQ 0,8 to HPET I got more interrupts but not exclude b and 17.
Attached File  Screen_shot_2009_09_14_at_16.41.04.png ( 136.44K ) Number of downloads: 256
Пожалуйста, прочитайте ЧаВо!
My page
THe KiNG
post Sep 17 2009, 07:42 AM
Post #5
QUOTE (Slice @ Sep 14 2009, 01:45 PM) *
When I add IRQ 0,8 to HPET I got more interrupts but not exclude b and 17.

Did you removed IRQ from RTC and PIC as I suggested?

As a tip, try to remove from DSDT unused crap like floppy and/or PS2, apple use other stuff on those irq's, I made my DSDT as much clean I could, still keeping functionality....
Slice
post Sep 17 2009, 12:18 PM
Post #6
CODE
Device (RTC)
{
Name (_HID, EisaId ("PNP0B00"))
Name (RT, ResourceTemplate ()
{
IO (Decode16,
0x0070, // Range Minimum
0x0070, // Range Maximum
0x10, // Alignment
0x02, // Length
)
IO (Decode16,
0x0072, // Range Minimum
0x0072, // Range Maximum
0x02, // Alignment
0x06, // Length
)
})
Method (_CRS, 0, NotSerialized)
{
Return (RT)
}
}

Device (TIMR)
{
Name (_HID, EisaId ("PNP0100"))
Name (TM, ResourceTemplate ()
{
IO (Decode16,
0x0040, // Range Minimum
0x0040, // Range Maximum
0x10, // Alignment
0x04, // Length
)
IO (Decode16,
0x0050, // Range Minimum
0x0050, // Range Maximum
0x10, // Alignment
0x04, // Length
)
})
Method (_CRS, 0, NotSerialized)
{
Return ™
}
}

For PIC I set IRQ 2 - this is help me for brightness control.
HPET - no IRQ
Пожалуйста, прочитайте ЧаВо!
My page
Gringo Vermelho
post Sep 17 2009, 02:14 PM
Post #7
After making the changes, my SATA is on IRQ 13.

I was wondering if it would be okay to strip out unused stuff like floppy and PS2 from the DSDT, so thanks. I'll try it.

KiNG, do you have P-and C-states added to your DSDT?
If you do, is it working with the RTC,TMR,PIC and HPET changes you've outlined here?

I had made some similar changes earlier using the information here:
http://aserebln.blogspot.com/2009/07/20.html
But got horrible jumpy sound when using a DSDT with SSDT data.

If it works fine for you with your modifications to HPET and friends, please let me know.

This post has been edited by Gringo Vermelho: Sep 17 2009, 02:16 PM
ASUS P5Q-E - P45/ICH10R - Marvell 88SE6121 - Marvell 88E8056 - ADI AD2000B - 9800 GTX+ - C2D E8500 - 10.6.3 retail - AsereBLN 1.1.9
THe KiNG
post Sep 18 2009, 11:25 AM
Post #8
QUOTE (Gringo Vermelho @ Sep 17 2009, 03:14 PM) *
After making the changes, my SATA is on IRQ 13.

I was wondering if it would be okay to strip out unused stuff like floppy and PS2 from the DSDT, so thanks. I'll try it.

KiNG, do you have P-and C-states added to your DSDT?
If you do, is it working with the RTC,TMR,PIC and HPET changes you've outlined here?

I had made some similar changes earlier using the information here:
http://aserebln.blogspot.com/2009/07/20.html
But got horrible jumpy sound when using a DSDT with SSDT data.

If it works fine for you with your modifications to HPET and friends, please let me know.

I have no SSDT data added in my DSDT, it works just fine with original SSDT and with my dummy kext for SpeedStep.
Still this is a temporary solution since I want to get SpeedStep working w/o touching SMC_Platform_Plugin same as it works for MacPro4,1.
And yes it works just fine with this DSDT fixes.

About your jumpy sound, that mean you didn't set SSDT data for your CPU ok, try more tongue.gif
Gringo Vermelho
post Sep 19 2009, 05:10 AM
Post #9
Triumph!

It's working now - without editing the SMCPlugin. I use iMac9,1 for model identifier.

http://www.insanelymac.com/forum/index.php...t&p=1272462

This post has been edited by Gringo Vermelho: Sep 19 2009, 05:11 AM
ASUS P5Q-E - P45/ICH10R - Marvell 88SE6121 - Marvell 88E8056 - ADI AD2000B - 9800 GTX+ - C2D E8500 - 10.6.3 retail - AsereBLN 1.1.9
blackCH
post Sep 21 2009, 09:57 PM
Post #10
Thanks for this!. It finally solved HPET & USBs IRQ conflicts on my HP6720s!
Gusar
post Sep 23 2009, 10:22 PM
Post #11
CODE
Device (RTC0)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Name (BUF0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                    })
                    Name (BUF1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {8}
                    })
                    Method (_CRS, 0, Serialized)
                    {
                        If (^^HPET.HPTE)
                        {
                            Return (BUF0)
                        }

                        Return (BUF1)
                    }
                }


All works without problems.
THe KiNG
post Sep 24 2009, 06:09 AM
Post #12
That is half of the problem, IRQ 2 is still set on TMR, so the bug is still present...
I don't see why add more code instead just remove that IRQ and add it to HPET, maybe you should explain the reason, and also to specify what board you have.
Gusar
post Sep 24 2009, 07:43 AM
Post #13
QUOTE (THe KiNG @ Sep 24 2009, 10:09 AM) *
That is half of the problem, IRQ 2 is still set on TMR, so the bug is still present...
I don't see why add more code instead just remove that IRQ and add it to HPET, maybe you should explain the reason, and also to specify what board you have.

I have a very nice HPET rolleyes.gif
MacPro4,1 has acpi-tables idetifically Asus Q-series Mobo. Sorry for my English.
THe KiNG
post Sep 24 2009, 08:12 AM
Post #14
Q Series is a long board list LOL, can you be more specific?
Also check in ioreg and tell me what IRQ it use on SATA(first one)

Thanks.
Gusar
post Sep 24 2009, 10:01 AM
Post #15
QUOTE (THe KiNG @ Sep 24 2009, 12:12 PM) *
Q Series is a long board list LOL, can you be more specific?
Also check in ioreg and tell me what IRQ it use on SATA(first one)

Thanks.

P5QL Pro
13

This post has been edited by Gusar: Sep 24 2009, 10:01 AM
THe KiNG
post Sep 24 2009, 12:13 PM
Post #16
QUOTE (Gusar @ Sep 24 2009, 10:01 AM) *
P5QL Pro
13

That explain why it works for you, look on first post on pics, on boards with AHCI problem it use IRQ 14 for SATA and HPET b/c IRQ 2 is set on PIC. Once is removed and HPET get 2 and 8 avail it use them. IRQ 2 on PIC is not needed on desktop boards so is safe to remove it.
IMO save space and remove that IRQ on RTC(that check you added does the same thing but in a fashion way... tongue.gif )
Stick with MacPro4,1 DSDT as example wink.gif

Now if someone know how to get both io-apic's to be used?
Seems they are used on linux(guess on win too) but not on OS X:
CODE
[ 0.000000] ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: IOAPIC (id[0x09] address[0xfec8a000] gsi_base[24])
[ 0.000000] IOAPIC[1]: apic_id 9, version 32, address 0xfec8a000, GSI 24-47
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Enabling APIC mode: Flat. Using 2 I/O APICs


BTW as you can see in linux dmesg IRQ's 0, 2 and 9 are used for override...
Slice
post Sep 25 2009, 07:39 AM
Post #17
QUOTE (THe KiNG @ Sep 24 2009, 03:13 PM) *
Now if someone know how to get both io-apic's to be used?

I am not clear about this. Look my post #2
QUOTE
Seems they are used on linux(guess on win too) but not on OS X:


BTW as you can see in linux dmesg IRQ's 0, 2 and 9 are used for override...

It depends on driver if it can share interrupts.
Пожалуйста, прочитайте ЧаВо!
My page
THe KiNG
post Sep 25 2009, 05:22 PM
Post #18
I'm not clear either what is not clear for you laugh.gif

A very good article: Plug-and-Play-HOWTO
Gringo Vermelho
post Oct 22 2009, 05:23 AM
Post #19
Look, I found a lost DRAM Controller:
Attached File  Screen_shot_2009_10_22_at_3.17.13_AM.png ( 98.35K ) Number of downloads: 151

00:00.0 Host bridge [0600]: Intel Corporation 4 Series Chipset DRAM Controller [8086:2e20] (rev 02)
Any way to deal with it in the DSDT? Does it exist on real Macs in some shape or form?

This post has been edited by Gringo Vermelho: Oct 22 2009, 05:29 AM
ASUS P5Q-E - P45/ICH10R - Marvell 88SE6121 - Marvell 88E8056 - ADI AD2000B - 9800 GTX+ - C2D E8500 - 10.6.3 retail - AsereBLN 1.1.9
Slice
post Oct 30 2009, 07:59 AM
Post #20
QUOTE (Gringo Vermelho @ Oct 22 2009, 08:23 AM) *
Look, I found a lost DRAM Controller:
Attached File  Screen_shot_2009_10_22_at_3.17.13_AM.png ( 98.35K ) Number of downloads: 151

00:00.0 Host bridge [0600]: Intel Corporation 4 Series Chipset DRAM Controller [8086:2e20] (rev 02)
Any way to deal with it in the DSDT? Does it exist on real Macs in some shape or form?

It always present in any computer and it does'n need any drivers or DSDT patch.
On AGP system driver AGPGart deals with the controller. On PCIe system no tunings needed.
Пожалуйста, прочитайте ЧаВо!
My page

2 Pages V   1 2 >
Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: