Jump to content

DSDT editor and patcher


oldnapalm
 Share

999 posts in this topic

Recommended Posts

oldnapalm,

 

Thanks for answering all my posts.

 

I have a question that I posted on the ProjectOSX Forum that I don't think that Slice can answer. So I am giving it a try here.

 

This is the snippit of my D830 LCPB (ISAB)

 

 

            Device (ISAB)
           {
               Name (_ADR, 0x001F0000)
               Device (PS2M)
               {
                   Name (_HID, EisaId ("PNP0F13"))
                   Name (CRS, ResourceTemplate ()
                   {
                       IRQNoFlags ()
                           {12}
                   })
                   Method (_CRS, 0, NotSerialized)
                   {
                       Return (CRS)
                   }
               }

 

 

Snippet from Slice's Dell 1525 which is nearly the same as the M1330/D830/D820. This script is almost 100% the same in the XPS M1530. All of these laptops share the same motherboard chipset GM965.

 

 

            Device (LPCB)
           {
               Name (_ADR, 0x001F0000)
               Device (WSEC)
               {
                   Name (TBSE, 0x0AAC)
                   Name (_HID, EisaId ("PNP0C02"))
                   Name (_CID, "monitor")
                   Name (_CRS, ResourceTemplate ()
                   {
                       IO (Decode16,
                           0x004E,             // Range Minimum
                           0x004E,             // Range Maximum
                           0x01,               // Alignment
                           0x02,               // Length
                           )
                       IO (Decode16,
                           0x0068,             // Range Minimum
                           0x0068,             // Range Maximum
                           0x01,               // Alignment
                           0x08,               // Length
                           )
                       Memory32Fixed (ReadWrite,
                           0xFF800000,         // Address Base
                           0x00100000,         // Address Length
                           )
                       Memory32Fixed (ReadWrite,
                           0xFFC00000,         // Address Base
                           0x00100000,         // Address Length
                           )
                   })
                   OperationRegion (MBOX, SystemMemory, 0xFF800000, 0x0200)
                   Field (MBOX, ByteAcc, Lock, Preserve)
                   {
                               Offset (0x101), 
                       MBX0,   8, 
                       MBX1,   8, 
                       MBX2,   8, 
                       MBX3,   8, 
                       MBX4,   8, 
                       MBX5,   8, 
                       MBX6,   8, 
                       MBX7,   8, 
                       MBX8,   8, 
                       MBX9,   8
                   }

                   OperationRegion (TMIF, SystemMemory, 0xFF800160, 0x20)
                   Field (TMIF, ByteAcc, Lock, Preserve)
                   {
                       THS0,   8, 
                       THS1,   8, 
                       THS2,   8, 
                       THS3,   8, 
                               Offset (0x08), 
                       FAN1,   8, 
                               Offset (0x10), 
                       TSP0,   8, 
                       TSC0,   8, 
                       TSP1,   8, 
                       TSC1,   8
                   }

                   OperationRegion (KBMP, SystemMemory, 0xFF800180, 0x70)
                   Field (KBMP, ByteAcc, Lock, Preserve)
                   {
                   }

                   Method (C2K, 1, NotSerialized)
                   {
                       Store (Arg0, Local0)
                       If (LLessEqual (Local0, 0x10))
                       {
                           Store (0x1E, Local0)
                       }

                       If (LGreaterEqual (Local0, 0x7F))
                       {
                           Store (0x1E, Local0)
                       }

                       Add (Multiply (Local0, 0x0A), TBSE, Local0)
                       Return (Local0)
                   }

                   Method (SMC0, 0, NotSerialized)
                   {
                       Store (FAN1, Local0)
                       Return (Local0)
                   }

                   Method (SMCA, 0, NotSerialized)
                   {
                       Store (THS2, Local0)
                       Return (Local0)
                   }

                   Method (SMCB, 0, NotSerialized)
                   {
                       Store (THS1, Local0)
                       Return (Local0)
                   }

                   Method (SMCE, 0, NotSerialized)
                   {
                       Store (THS3, Local0)
                       Return (Local0)
                   }
               }

 

 

Can I just replace my snippet in the D830 with the entire snippet posted above? It works perfect on my XPS M1530 and has the same script except for the 2nd script posted enables fakeSMA plugs modules for iSTAT Pro. It also seems to work fine on the D830/D620 but I do not get FAN, Northbridge nor heatsink readings in iSTAT pro for the D830. Just CPU and GPU diode readings.

 

I get the CPU and GPU diode reading without adding the 2nd script posted by Slice.

 

I have all those modules working fine in iSTAT Pro for the M1530 though.

 

I also observe the D830 vanilla DSDT has _HID as PNP0F13 versus SLice's and XPS M1530 _HID has

PNP0C02.

 

I ran the DSDT both ways and did not notice any differences . No crashes etc.

 

The Extra Decode that the D830/D620 throws me, because I am not sure what that entire section is used for but adding it to the D830 DSDT has not caused it to crash nor has it added those nice Northbridge and Heat sink Modules in iSTAT pro.

 

In other words the extra script does not get me the extra module support in the iSTAT pro widget.

 

I am just curious about the extra Decode and operation script how it can help or hinder the system?

 

Thanks for reading ant trying to help

Link to comment
Share on other sites

@kizwan: sorry, I didn't know the difference between one or more sticks of RAM was a bug in Asus BIOS. But NCPU also changes depending on number of CPU cores, independent of SpeedStep code (actually I only need _CST to get it working, so it wouldn't be a problem).

			OperationRegion (STBL, SystemMemory, 0x7FF8E0D0, 0x01D2)
		Name (NCPU, 0x04)

 

@oSxFr33k: I would compare Slice's modified device and the original one, and add just the extra code. Do these laptops have the same chipset? I guess the bitfields and operation regions may change depending on the chipset, take a look at Intel specs.

Link to comment
Share on other sites

@oldnapalm,

 

Well from the first snippit that is the only code you will see in the D830. The second snippiet is Slice's Dell 1525.

 

The 1525 share the same code, 2nd one I posted as the XPS M1330, XPS M1530.

 

The D830/D630 share almost exactly the same code as the M1330, except that one device section ISAB. It is exactly as I have printed it and no other code in that section for ISAB?

 

I can't figure out why all the extra code in the ISAB (LPCB) is missing for the D830. So that was my question can I add all that extra code? The Decode and Operation regions are not there from the Ubuntu Vanilla Extracted DSDT?

 

I can worry about the Operation Region Values later but I cannot figure out why those sections of code are missing?

 

Will it hurt to add it?

 

The only necessary code to actually add to make iSTAT Pro show the Modules for CPU/GPU/Northbridge are:

 

 

                    Method (SMC0, 0, NotSerialized)
                   {
                       Store (FAN1, Local0)
                       Return (Local0)
                   }

                   Method (SMCA, 0, NotSerialized)
                   {
                       Store (THS2, Local0)
                       Return (Local0)
                   }

                   Method (SMCB, 0, NotSerialized)
                   {
                       Store (THS1, Local0)
                       Return (Local0)
                   }

                   Method (SMCE, 0, NotSerialized)
                   {
                       Store (THS3, Local0)
                       Return (Local0)
                   }
               }

 

 

But there is some code above "Fields" that make reference to FAN and THS etc. So thats why I just grabbed the entire code and replaced it with the code from the first snippet (D830)

 

I am not sure if I need the Operation Region and Decode sections or not?

 

 

Here is a copy of my D830 Vanilla DSDT (Extracted from Ubuntu without any mods)

 

DSDT_VANILLA_D830.aml.zip

Link to comment
Share on other sites

Yikes I did not realize that there was another device which I should not have removed.

 

So just add the WSEC script between Name (_ADR, 0x001F0000) and Device (PS2M)? Keeping the original Device (PS2M) and the script below it? I actually removed it by mistake.

 

 

Maybe put the WSEC device and script at the end of the PS2M Device script?

 

 

            Device (ISAB)
           {
               Name (_ADR, 0x001F0000)
               Device (PS2M)
               {
                   Name (_HID, EisaId ("PNP0F13"))
                   Name (CRS, ResourceTemplate ()
                   {
                       IRQNoFlags ()
                           {12}
                   })
                   Method (_CRS, 0, NotSerialized)
                   {
                       Return (CRS)
                   }
               }

Link to comment
Share on other sites

@oSxFr33k: no worries

 

@el coniglio: another patch to be applied "on load", from oSxFr33k DSDT:

DSDT_VANILLA_D830.dsl  7046:			 Name (_HID, "*pnp0c14")
Error	4001 -		  String must be entirely alphanumeric ^  (*pnp0c14)

Link to comment
Share on other sites

Update : This is now solved, see my next post...

 

Hi,

 

First of all thanks for the great work on the patcher, it's a great way for beginners like me to experiment with DSDT editing and hopefully learn a thing or two.

 

I hope someone can help me with some post-installation issues I'm having:

 

I installed SL using Kakewalk 2.2 (http://puru.se) with the Gigabyte EP45-DS3L settings, which worked ok in enough that it installed and I could boot to the OS. This method uses Chameleon boot loader. 2 things which didn't work were sleep which I'm not fussed about and my Texas Instruments PCI firewire card (which worked fine in Leopard out of the box).

 

I decided to try and get this all working by editing my boards own dsdt and getting rid of the one supplied by Kakewalk. I got my dsdt using the Windows 7 version of Dsdt Editor and fixed 3 errors and 1 warning so it compiled properly. I have attached this file DSDT_errors_fixed.aml in the zip. The untouched one is DSDT_untouched.aml in the zip.

 

My installation will not boot with my dsdt like this, I do not get a KP but after the grey Apple screen I just get a blank screen, and in verbose mode I do not get any errors that I can see, but again it goes to the blank screen. At first I thought it was the graphics but these are enabled in the com.apple.Boot.plist file (also attached in the zip). The graphics work fine using the dsdt supplied with Kakewalk, so I guess there is some difference that is stopping me from booting fully.

 

I began to patch my dsdt using Dsdt Editor, but even after applying all the patches relevant to me (DSDT_mine_patched.aml in zip), I still cannot get to the desktop, so I am at a bit of a loss as to where to go from here. Does anyone have an idea about why I am getting this blank screen? Is there another debugging method I could use to find out?

 

As I need to get the firewire working to use my sound card, I decided to patch the Kakewalk dsdt that boots to the desktop ok (DSDT_kakewalk_ep45_with_patches.aml), and I got sleep working (waking from sleep with mouse causes system to freeze after a couple of minutes, not sure whether it has locked up or USB stops working yet), as well as speedstep as far as I can tell, but firewire still doesn't. I've been doing a lot of reading on firewire issues and it seems people are having success by adding the device in their dsdt, see here : http://www.insanelymac.com/forum/index.php...l=firewire+dsdt. I have already tried moving the firewire card to other pci slots and also removing AppleHPET.kext (which caused KP), but neither worked.

 

I get the following error when booting in verbose mode FireWire runtime power conservation disabled. (2)

And console.log shows SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.

And system profiler shows unable to list firewire devices.

 

I haven't tried any firewire dsdt fixes yet, as I would like to get my own dsdt working properly first, but some guidance on doing this would be very much appreciated. I have attached my ioreg and lspci -nn outputs in the zip as well, and also my smbios.plist file just for good measure!

 

Once again thanks for the great tool you've made, it has really helped me get this far! :thumbsup_anim:

x0b_dsdt_etc.zip

Link to comment
Share on other sites

I managed to get my SL firewire working, it appears the dsdt that i was saving from the windows version wasn't working properly. it seems saving was intermittent, it wasn't clear whether i should save my edited dsdt file using the 'AML' menu or the 'Load' menu, I tried both, but I could only save using the 'Load' menu. If i tried to save using 'AML' menu then no file would be created in my chosen output folder.

 

I ended up realising that a dsdt.aml got created in the same directory as the DSDT Editor application when I clicked on compile, and so I took this dsdt and used it to boot my SL installation, and my firewire is now working! :D

 

I don't know whether this is a bug or I just used the application wrong, but maybe a small pdf file explaining the process would help others not to make the same mistake as me.

 

In any case, thank you for making a great little app, it made patching my dsdt very simple.

 

Now sleep doesn't work properly, it seems to sleep the computer but when I wake with either the mouse or the power button, the computer reboots. Does anyone have an idea what i can do to fix this? I tried the patches included and also the ones uploaded specifically for gigabyte boards on page 3 but neither has seemed to work.

update : :) sleep issue was fixed by ticking the bottom option in energy saver panel as shown in the image here http://bit.ly/d5rmkI

 

i think i am fully operational now, woohoo!

Link to comment
Share on other sites

Hello guys,

 

I was hoping to find an answer here.

 

I have recently installed SL on my notebook, it's on my sig. I was trying do Lid Sleep. The machine can sleep by clicking on the menu, power button menu and Fn+F1 key. But it can't when I close the lid.

 

I have attached here my dsdt.dsl, if anybody of you have the kindness of heart to take a look at my edited dsdt on the LID section. It appears to have an error when I am trying to compile it.

 

Error:

Intel ACPI Component Architecture

ASL Optimizing Compiler version 20091214 [Dec 16 2009]

Copyright © 2000 - 2009 Intel Corporation

Supports ACPI Specification Revision 4.0

 

/Users/Nameci/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 5158: Store (^^PCI0.SBRG.EC0.SF13, LIDS) //LID register

Error 4065 - Object not found or not accessible from scope ^ (^^PCI0.SBRG.EC0.SF13)

 

ASL Input: /Users/Nameci/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl - 6302 lines, 211262 bytes, 2493 keywords

Compilation complete. 1 Errors, 0 Warnings, 0 Remarks, 44 Optimizations

 

Here is the dsdt.dsl file

dsdt.dsl.zip

Link to comment
Share on other sites

I'm back from vacancy, I just started coding the "auto-fixes" to supress warning/errors/remarks, hope to release a new version soon. If you have a suggestion/error to report, the time is now. =)

Dear el coniglio welcome back! From me, just to note the following (which are mentioned already, just check-list):

1. If there are comments after some line of code, especially in a Device (XXXX) ignore them. Comments of // and /* */ style.

2. When you click on the device list (left) push the screen on the right to the topmost position, starting with the device itself (now it's in the middle and only if you reverse-click from bottom-to-top it will show the first line in the top).

Thanks again!

Link to comment
Share on other sites

If i tried to save using 'AML' menu then no file would be created in my chosen output folder.

It's a bug in Windows version, will be fixed in next release. Thanks for reporting.

 

I have attached here my dsdt.dsl, if anybody of you have the kindness of heart to take a look at my edited dsdt on the LID section. It appears to have an error when I am trying to compile it.

Device EC0 is inside LPCB in your DSDT, not inside SBRG, and there's no SF13 inside it. Look in the DSDT you got the code from.

 

how do i DSTD Inject AppleHDA ?

Check patches HDEF, AZAL to HDEF and ALC*. See this thread for reference http://www.insanelymac.com/forum/index.php?showtopic=140941

Link to comment
Share on other sites

Hey guys, a new version is available on the first post.

 

Changes:

 

- When clicking on a node the 1st line will be on top (same on compile errors window)

- Comments on "node" creation lines will be preserved

- Improved reading/parsing performance

- IASL for Mac updated to version 20100702

- Auto patching of known errors on Compile output window ("method local variable is not initialized", "string must be entirely alphanumeric", "invalid combination of length and min/max fixed flags", "length is larger than min/max window", "invalid object type for reserved name (found integer, requires buffer)", "invalid object type for reserved name (found buffer, requires package)")

- General bug fixes

 

 

Mac OS: zip.gif DSDTEditor.zip ( 864.59K )

 

Linux and Windows: zip.gif DSDTEditor_Linux_Mac_Win.zip ( 1.22MB )

Link to comment
Share on other sites

It's a bug in Windows version, will be fixed in next release. Thanks for reporting.

 

 

Device EC0 is inside LPCB in your DSDT, not inside SBRG, and there's no SF13 inside it. Look in the DSDT you got the code from.

 

 

Check patches HDEF, AZAL to HDEF and ALC*. See this thread for reference http://www.insanelymac.com/forum/index.php?showtopic=140941

 

So what would be the register I am looking for?

Link to comment
Share on other sites

"^^PCI0.LPCB.EC0.LSTE" I believe.

 

http://www.projectosx.com/forum/index.php?showtopic=979

 

I have not patched yet my dsdt. I have found out that I can my notebook can sleep on lid close on battery but not on ac adapter. But when i wake it using the power button it returns to sleep.

 

Now this is getting to be more interesting.

 

:)

 

Thanks man for the replies, I will try to understand everything...

Link to comment
Share on other sites

Hey guys, a new version is available on the first post.

 

Changes:

 

- When clicking on a node the 1st line will be on top (same on compile errors window)

- Comments on "node" creation lines will be preserved

- Improved reading/parsing performance

- IASL for Mac updated to version 20100702

- Auto patching of known errors on Compile output window ("method local variable is not initialized", "string must be entirely alphanumeric", "invalid combination of length and min/max fixed flags", "length is larger than min/max window", "invalid object type for reserved name (found integer, requires buffer)", "invalid object type for reserved name (found buffer, requires package)")

- General bug fixes

Nice! Good job el coniglio & oldnapalm. I already tried it & I found it load DSL file much faster now. The Fix errors button works as it should be. I have a suggestion for your next release. Add an option to install the patch files to DSDT Editor working directory. Installed patch files will be available at the menu.

Link to comment
Share on other sites

java virtual machine launcher: could not find the main class: DSDTParser.jar. The program will now exit.

That is strange. We tested it on this same setup. I think the problem can be:

* You extracted just the app jar and forgot the libs;

* You have more than one vm installed and is using a < 1.6 as default;

 

You can check the default version using java -version in the console; you can also try to run the program in the prompt:

navigate to the directory and execute "java -jar DSDTParser.jar". It will provide a more specific error in output.

Link to comment
Share on other sites

That is strange. We tested it on this same setup. I think the problem can be:

* You extracted just the app jar and forgot the libs;

* You have more than one vm installed and is using a < 1.6 as default;

 

You can check the default version using java -version in the console; you can also try to run the program in the prompt:

navigate to the directory and execute "java -jar DSDTParser.jar". It will provide a more specific error in output.

 

First to answer your suggestions

 

*No, i extracted everything

*No, i installed only Java 6

 

Second, program is running from the prompt, but with error:

 

2010-8-5 13:06:07 jsyntaxpane.DefaultSyntaxKit loadConfig

INFO: unable to load configuration for: class jsyntaxpane.syntaxkits.DsdtSyntaxKit from:

jsyntaxpane/syntaxkits/DsdtSyntaxKit/config.properties

Loaded Preferences

 

 

and java -version returns:

 

java version "1.6.0_21"

Java SE Runtime Environment (build 1.6.0_21-b07)

Java Hotspot Client VM (build 17.0-b17, mixed mode, sharing)

 

Don't know if it is stable but i'll find DSDT and tell you later

 

Hope you find this useful :hysterical:

Link to comment
Share on other sites

program is running from the prompt, but with error:

 

2010-8-5 13:06:07 jsyntaxpane.DefaultSyntaxKit loadConfig

INFO: unable to load configuration for: class jsyntaxpane.syntaxkits.DsdtSyntaxKit from:

jsyntaxpane/syntaxkits/DsdtSyntaxKit/config.properties

Loaded Preferences

It's just an info, not an error, the app should work fine.

 

About running with double click, maybe Explorer is configured to open jar files with "java" instead of "java -jar". Try running "java DSDTParser.jar" in the command prompt, you will see the same error message, "Could not find the main class: DSDTParser.jar. Program will exit."

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...