Jump to content

DSDT editor and patcher


oldnapalm
 Share

999 posts in this topic

Recommended Posts

Well, proving the adage that you shouldn't mess with something that is working, I updated to Chameleon RC5 and my WOL seems to have stopped working on my GA-EP45-DS3R. Regular sleep works fine (forced and using PleaseSleep, timed leaves the fans on and, I believe, doesn't really put the computer to sleep). To troubleshoot, I went whole hog and redid my DSDT using DSDTEditor. Interestingly, Wake on Network is an available option in System Preferences.

 

Right now, I am running Chameleon RC5. The com.apple.boot.plist looks like this:

 

	<key>Graphics Mode</key>
<string>1344x840x60</string>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>x32</string>
<key>GraphicsEnabler</key>
<string>yes</string>
<key>EthernetBuiltIn</key>
<string>yes</string>
<key>GeneratePStates</key>
<string>yes</string>
<key>GenerateCStates</key>
<string>yes</string>

plus a string for my video and Ethernet (maybe I should remove the ethernet string?)

 

The only kexts that I am running non-standard in /E/E/ are:

 

fakesmc.kext

IOAHCIBlockStorageInjector.kext

LegacyHDA.kext

 

I installed the following DSDT patches:

 

EHCI sleep

WAK

GIGE

ALC889a

AZAL to HDEF

HPET

RTC

Q6600, CPU0-3

 

I am also running the ifconfig Bonjour fix.

 

attached is the generated DSDT.txt. Does anyone have any thoughts? I am using the standard Apple network driver. It appears that the network card is getting shut down on sleep. Any way to avoid that? I appreciate the assistance.

NEW_DSDT.txt

Link to comment
Share on other sites

Hi all here :robot:

I have a request.

 

It would be possible given a specific file IOREG, extract a specific device in the form of "injection" for DSDT (like GFX card)?

 

Somewhat as with ChameleonPrefpanel and gfxutil for EFI strings?

 

"Example" I open my DSDT with "DSDT Editor" and I point on my "P0P2" device now I know my GFX could be injected with the "data" stored in a specific IOREG file... the program read this info and "trasform" it...

This could be a easy and quick way to get some device working from people (his IOREG) having it already work...

 

Maybe if the request may seem a bit strange I apologize

 

(sorry for my very bad English)

Fabio

Link to comment
Share on other sites

OUT OF THE QUESTION

I installed the following DSDT patches:

 

EHCI sleep

WAK

GIGE

ALC889a

AZAL to HDEF

HPET

RTC

Q6600, CPU0-3

 

Apply the LPC(No speedstepping without that) blowupj.gif, SHUTDOWN, HID/CID, SBUS, IRQs, REMOVED, RENAMED

dsdt.aml_EXAMPLE.zip

 

Use

<key>GeneratePStates</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>

for native power management

eurow.gif

Link to comment
Share on other sites

@oldnapalm

 

thanks for _DSM method, i applied this as a patch, but when i compiled it i got 15 errors, mostly reserved name, so i fixed errors and had 1 error....

 

name already exists in scope (_DSM)

Try comparing the IODisplayEDID value with EDID value in windows. You can use an application called MonInfo in windows (the Raw Data is the EDID value).

 

However, I recommend you to try the _DSM control method first before trying anything else. It looks like there is already _DSM control method exist in _SB.PCI0.P0P2.VGA. Locate the original _DSM control method & remove it. So that it will only have one _DSM control method (the one oldnapalm gave to you earlier).

 

UPDATE: You need to remove this:-

	Scope (_SB.PCI0.P0P2.VGA)
   {
	   Method (_DSM, 4, NotSerialized)
	   {
		   Store ("----- DGPU _DSM --------", Debug)
		   P8XH (Zero, 0x10)
		   If (CMPB (Arg0, Buffer (0x10)
				   {
					   /* 0000 */	0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47, 
					   /* 0008 */	0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0
				   }))
		   {
			   Return (NVOP (Arg0, Arg1, Arg2, Arg3))
		   }
		   Return (Zero)
	   }
   }

 

UPDATE 2: Try this modified DSDT - included CMOS Reset Fix, Nvidia injection & other common fix. Search for // start to see the fix I add to your DSDT. Boot without GraphicsEnabler.

http://www.mediafire.com/?drc6d7dayzdfi7z

Link to comment
Share on other sites

Hi i have use this tool, but I got some errors from the DSD_Patcher 1.0.1e

If this is critical, can some one look into this and see if it possible to fix this errors?

 

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct  4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

./dsdt_fixed.txt  2382:			 Method (WMAA, 3, NotSerialized)
Warning  1087 -								^ Not all control paths return a value (WMAA)

./dsdt_fixed.txt  2552:	 Method (\_WAK, 1, NotSerialized)
Warning  1080 -						 ^ Reserved method must return a value (_WAK)

ASL Input:  ./dsdt_fixed.txt - 7863 lines, 264002 bytes, 2521 keywords
AML Output: ././dsdt.aml - 26103 bytes, 789 named objects, 1732 executable opcodes

Compilation complete. 0 Errors, 2 Warnings, 0 Remarks, 1194 Optimizations



Compiling done, if it worked, you have now a patched DSDT in dsdt.aml

 

I have attached the debug files :-)

dsdt.aml.zip

Debug.zip

Link to comment
Share on other sites

Hi i have use this tool, but I got some errors from the DSD_Patcher 1.0.1e

If this is critical, can some one look into this and see if it possible to fix this errors?

Just warnings, not critical at all. Usually to fix these warnings, just put return codes at the end:-

Return (Package (0x02) {0x00, 0x00})

For example:-

			Method (_WED, 1, NotSerialized)
		 {
			 Store (Arg0, P80H)
			 If (LEqual (Arg0, 0xB0))
			 {
				 Return (B0ED)
			 }

			 If (LEqual (Arg0, 0xB2))
			 {
				 GACR ()
				 Return (B2ED)
			 }

			 If (LEqual (Arg0, 0xB4))
			 {
				 Return (B4ED)
			 }

			 Return (Package (0x02) {0x00, 0x00})
		 }

It just cosmetic to satisfy the compiler. If one of the condition satisfied, for example If (LEqual (Arg0, 0xB4)) - which means - Arg0 = 0xB4, Return (B4ED) will be executed. So, the Return (Package (0x02) {0x00, 0x00}) will be ignored.

Link to comment
Share on other sites

OK, anything you can recommend :-)

- RTC fix

- LPC fix - only if your LPC device have different device ID or the device ID is not listed in AppleLPC.kext - for speedstep working properly

- SBUS fix - SMBUS controller communicate with low-bandwidth devices for example fan or voltage sensors, lid switches and clock chips. On macbook, SMBUS controller required for smart battery. Usually non-apple computer use control method battery instead.

 

For SBUS fix, if you don't mind, I recommend do it manually. If SBUS device already exist in your DSDT, just add the codes which is not already there. Inject device ID only if your SMBUS controller have different device ID or the device ID is not listed in SMBUS kext.

Link to comment
Share on other sites

OK I copied my file in the my Extra folder, but one question....(stupid ?)

 

How can I verify that this is working, using EFI boot loader from Iatkos DVD

Boot with boot flags: Wait=Yes -v

If you see something like dsdt is found & loaded, for example like this: Read HFS+ file: [hd(0,3)/Extra/DSDT.aml] 75764 bytes.

It means it is loaded.

 

yes, but even in this case AppleSMBusPCI is not loading. Any ideas why is that ?

The device ID you need to inject is not your SMBUS controller device ID but the device ID found in SMBUS kext. Please post here your DSDT & IOReg dump (using IORegistryExplorer app).

Link to comment
Share on other sites

Hi i have use this tool, but I got some errors from the DSD_Patcher 1.0.1e

If this is critical, can some one look into this and see if it possible to fix this errors?

 

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct  4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

./dsdt_fixed.txt  2382:			 Method (WMAA, 3, NotSerialized)
Warning  1087 -								^ Not all control paths return a value (WMAA)

./dsdt_fixed.txt  2552:	 Method (\_WAK, 1, NotSerialized)
Warning  1080 -						 ^ Reserved method must return a value (_WAK)

ASL Input:  ./dsdt_fixed.txt - 7863 lines, 264002 bytes, 2521 keywords
AML Output: ././dsdt.aml - 26103 bytes, 789 named objects, 1732 executable opcodes

Compilation complete. 0 Errors, 2 Warnings, 0 Remarks, 1194 Optimizations



Compiling done, if it worked, you have now a patched DSDT in dsdt.aml

 

I have attached the debug files :-)

 

Hi Peter_sm

 

AMD???

kernel mod disables power management

 

Look it

dsdt.aml_Peter_sm.zip

Use Diffmerge

 

patches related to power management

will not make a difference

I applied the "obligatory"

 

DTGP

IRQs

RTC

***SBUS

REMOVED

RENAMED

Link to comment
Share on other sites

The device ID you need to inject is not your SMBUS controller device ID but the device ID found in SMBUS kext. Please post here your DSDT & IOReg dump (using IORegistryExplorer app).

 

ok, let's start from the beginning - my SMBus id from lspci is :

 

00:1f.3 SMBus [0c05]: Intel Corporation 82801JI (ICH10 Family) SMBus Controller [8086:[b]3a30[/b]]

 

and the id from smbuspci is:

 

  <key>IONameMatch</key>
		<array>
			<string>pci10de,aa2</string>
			<string>pci10de,d79</string>
			<string>pci8086,[b]3a30[/b]</string>
			<string>pci8086,3b30</string>
		</array>

 

So ids do match, but strangely enough AppleSMBusPCI.kext is not loading ! Now, if i add this same id via DSM method in DSDT the kext is loading ok. Weird, isn't it ?

 

 

As for the AppleSMBusController.kext is normal not to load because it has name to match rather then id.

.

<key>IONameMatch</key>
<string>smbus</string>

 

 

my original SBUS section:

 

Device (SBUS) //renamed from PX43
		{
			Name (_ADR, 0x001F0003)
			OperationRegion (PBAS, PCI_Config, 0x20, 0x02)
			Field (PBAS, ByteAcc, NoLock, Preserve)
			{
				BAS0,   16
			}

			Method (SMBB, 0, NotSerialized)
			{
				And (BAS0, 0xFFFE, Local0)
				Return (Local0)
			}
		}

 

and the modified one which loads both kexts

 

Device (SBUS)
		{
			Name (_ADR, 0x001F0003)
			Device (BUS0)
			{
				Name (_CID, "smbus")
				Name (_ADR, Zero)
				Device (DVL0)
				{
					Name (_ADR, 0x57)
					Name (_CID, "diagsvault")
				}
			}
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x02)
					{
						"device-id", 
						Buffer (0x04)
						{
							0x30, 0x3A, 0x00, 0x00
						}
					}, Local0)
					MCDP (Arg2, RefOf (Local0))
					Return (Local0)
			}
		}

 

So far so good ! But from which ICH is this fix ? And is my ICH10R working correctly with it ? How to tell ?

Link to comment
Share on other sites

So ids do match, but strangely enough AppleSMBusPCI.kext is not loading ! Now, if i add this same id via DSM method in DSDT the kext is loading ok. Weird, isn't it ?

I have read a couple of people complain about this. Can you do one test for me? Replace the SBUS device with this one:-

            Device (SBUS)
           {
               Name (_ADR, 0x001F0003)
               OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)
               Field (SMBP, DWordAcc, NoLock, Preserve)
               {
                       ,   2, 
                   I2CE,   1
               }
               OperationRegion (SMBI, SystemIO, 0x18C0, 0x10)
               Field (SMBI, ByteAcc, NoLock, Preserve)
               {
                   HSTS,   8, 
                           Offset (0x02), 
                   HCON,   8, 
                   HCOM,   8, 
                   TXSA,   8, 
                   DAT0,   8, 
                   DAT1,   8, 
                   HBDR,   8, 
                   PECR,   8, 
                   RXSA,   8, 
                   SDAT,   16
               }
               Method (SSXB, 2, Serialized)
               {
                   If (STRT ())
                   {
                       Return (Zero)
                   }
                   Store (Zero, I2CE)
                   Store (0xBF, HSTS)
                   Store (Arg0, TXSA)
                   Store (Arg1, HCOM)
                   Store (0x48, HCON)
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (One)
                   }
                   Return (Zero)
               }
               Method (SRXB, 1, Serialized)
               {
                   If (STRT ())
                   {
                       Return (0xFFFF)
                   }
                   Store (Zero, I2CE)
                   Store (0xBF, HSTS)
                   Store (Or (Arg0, One), TXSA)
                   Store (0x44, HCON)
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (DAT0)
                   }
                   Return (0xFFFF)
               }
               Method (SWRB, 3, Serialized)
               {
                   If (STRT ())
                   {
                       Return (Zero)
                   }
                   Store (Zero, I2CE)
                   Store (0xBF, HSTS)
                   Store (Arg0, TXSA)
                   Store (Arg1, HCOM)
                   Store (Arg2, DAT0)
                   Store (0x48, HCON)
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (One)
                   }
                   Return (Zero)
               }
               Method (SRDB, 2, Serialized)
               {
                   If (STRT ())
                   {
                       Return (0xFFFF)
                   }
                   Store (Zero, I2CE)
                   Store (0xBF, HSTS)
                   Store (Or (Arg0, One), TXSA)
                   Store (Arg1, HCOM)
                   Store (0x48, HCON)
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (DAT0)
                   }
                   Return (0xFFFF)
               }
               Method (SBLW, 4, Serialized)
               {
                   If (STRT ())
                   {
                       Return (Zero)
                   }
                   Store (Arg3, I2CE)
                   Store (0xBF, HSTS)
                   Store (Arg0, TXSA)
                   Store (Arg1, HCOM)
                   Store (SizeOf (Arg2), DAT0)
                   Store (Zero, Local1)
                   Store (DerefOf (Index (Arg2, Zero)), HBDR)
                   Store (0x54, HCON)
                   While (LGreater (SizeOf (Arg2), Local1))
                   {
                       Store (0x0FA0, Local0)
                       While (LAnd (LNot (And (HSTS, 0x80)), Local0))
                       {
                           Decrement (Local0)
                           Stall (0x32)
                       }
                       If (LNot (Local0))
                       {
                           KILL ()
                           Return (Zero)
                       }
                       Store (0x80, HSTS)
                       Increment (Local1)
                       If (LGreater (SizeOf (Arg2), Local1))
                       {
                           Store (DerefOf (Index (Arg2, Local1)), HBDR)
                       }
                   }
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (One)
                   }
                   Return (Zero)
               }
               Method (SBLR, 3, Serialized)
               {
                   Name (TBUF, Buffer (0x0100) {})
                   If (STRT ())
                   {
                       Return (Zero)
                   }
                   Store (Arg2, I2CE)
                   Store (0xBF, HSTS)
                   Store (Or (Arg0, One), TXSA)
                   Store (Arg1, HCOM)
                   Store (0x54, HCON)
                   Store (0x0FA0, Local0)
                   While (LAnd (LNot (And (HSTS, 0x80)), Local0))
                   {
                       Decrement (Local0)
                       Stall (0x32)
                   }
                   If (LNot (Local0))
                   {
                       KILL ()
                       Return (Zero)
                   }
                   Store (DAT0, Index (TBUF, Zero))
                   Store (0x80, HSTS)
                   Store (One, Local1)
                   While (LLess (Local1, DerefOf (Index (TBUF, Zero))))
                   {
                       Store (0x0FA0, Local0)
                       While (LAnd (LNot (And (HSTS, 0x80)), Local0))
                       {
                           Decrement (Local0)
                           Stall (0x32)
                       }
                       If (LNot (Local0))
                       {
                           KILL ()
                           Return (Zero)
                       }
                       Store (HBDR, Index (TBUF, Local1))
                       Store (0x80, HSTS)
                       Increment (Local1)
                   }
                   If (COMP ())
                   {
                       Or (HSTS, 0xFF, HSTS)
                       Return (TBUF)
                   }
                   Return (Zero)
               }
               Method (STRT, 0, Serialized)
               {
                   Store (0xC8, Local0)
                   While (Local0)
                   {
                       If (And (HSTS, 0x40))
                       {
                           Decrement (Local0)
                           Sleep (One)
                           If (LEqual (Local0, Zero))
                           {
                               Return (One)
                           }
                       }
                       Else
                       {
                           Store (Zero, Local0)
                       }
                   }
                   Store (0x0FA0, Local0)
                   While (Local0)
                   {
                       If (And (HSTS, One))
                       {
                           Decrement (Local0)
                           Stall (0x32)
                           If (LEqual (Local0, Zero))
                           {
                               KILL ()
                           }
                       }
                       Else
                       {
                           Return (Zero)
                       }
                   }
                   Return (One)
               }
               Method (COMP, 0, Serialized)
               {
                   Store (0x0FA0, Local0)
                   While (Local0)
                   {
                       If (And (HSTS, 0x02))
                       {
                           Return (One)
                       }
                       Else
                       {
                           Decrement (Local0)
                           Stall (0x32)
                           If (LEqual (Local0, Zero))
                           {
                               KILL ()
                           }
                       }
                   }
                   Return (Zero)
               }
               Method (KILL, 0, Serialized)
               {
                   Or (HCON, 0x02, HCON)
                   Or (HSTS, 0xFF, HSTS)
               }
           Device (BUS0)
           {
               Name (_CID, "smbus")
               Name (_ADR, Zero)
               Device (DVL0)
               {
                   Name (_ADR, 0x57)
                   Name (_CID, "diagsvault")
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package (0x03)
                       {
                           "address",
                           0x57,
                           Buffer (One)
                           {
                               Zero
                           }
                       }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }
           }
           }

As you can see, I didn't inject device ID. Please test & let me know does the SMBUS kexts loaded or not this time.

Link to comment
Share on other sites

yes, they are ! should i keep it like this ?

Yes. Most of DSDT I found, including MacBook's DSDT have similar SBUS codes with the one I gave you earlier. So, I think yes, you should keep it like that. Device (BUS0) is additional codes. Without Device (BUS0) not all SMBUS kexts will be loaded.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...