Jump to content

DSDT editor and patcher


oldnapalm
 Share

999 posts in this topic

Recommended Posts

Good idea, for the next release we will add comments to the included patch files.

 

For now the included patches are the ones I use in my Asus P5E, you can find their descriptions here

http://www.insanelymac.com/forum/index.php?showtopic=199816

 

Most patches just insert code in a device.

 

Example:

 

into method label _DSM parent_adr 0x001F0002 remove_entry;

Removes method _DSM (if exists) which parent _ADR is 0x001F0002 (SATA device).

 

into device name_adr 0x001F0002 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
   Store (Package (0x02)\n
       {\n
           "device-id", \n
           Buffer (0x04)\n
           {\n
               0x81, 0x26, 0x00, 0x00\n
           }\n
       }, Local0)\n
   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
   Return (Local0)\n
}\n
end

Inserts the code between begin and end in the device with _ADR 0x001F0002 (note that the \n in the end of each line is needed).

Link to comment
Share on other sites

Good idea, for the next release we will add comments to the included patch files.

 

For now the included patches are the ones I use in my Asus P5E, you can find their descriptions here

http://www.insanelymac.com/forum/index.php?showtopic=199816

 

Most patches just insert code in a device.

 

Example:

 

into method label _DSM parent_adr 0x001F0002 remove_entry;

Removes method _DSM (if exists) which parent _ADR is 0x001F0002 (SATA device).

 

into device name_adr 0x001F0002 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
   Store (Package (0x02)\n
       {\n
           "device-id", \n
           Buffer (0x04)\n
           {\n
               0x81, 0x26, 0x00, 0x00\n
           }\n
       }, Local0)\n
   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
   Return (Local0)\n
}\n
end

Inserts the code between begin and end in the device with _ADR 0x001F0002 (note that the \n in the end of each line is needed).

 

 

It sounds like an interesting Utility, but wonder where i can find the patch codes from, for instant codes for my graphic card ?. Sorry if this is a dump question.

Link to comment
Share on other sites

As the app was just released and is still in development, there aren't many patches in this format yet.

 

We are thinking about a way to centralize the patches, so experienced users could make their patches available in the "automated patch" format, and users without DSDT patching knowledge could easily find and apply the patches to their DSDT.

 

Maybe we can make a topic or a site with the patches, but the contribution from experienced users is essential.

Link to comment
Share on other sites

The original post have been updated with the latest release. I don't know how the "compile" error handling will perform on Windows and Linux since I couldn't test. Please report if something is not working.

 

anyway to have a fix for vaio snc aka s"sony notebook control" aka sny50001 aka sny60001 aka sonypi (linux) that enable fn keys, lan ,qe/ci on internal screen memory card reader etc... on all vaio

 

thanx for attention :D

Link to comment
Share on other sites

We don't have Sony or Lenovo notebooks, but if you know the needed patches, or have a patched and the original DSDT, we can help to make the automated patches, so it would be easy for other people with similar notebooks to patch their DSDT.

Link to comment
Share on other sites

hi

thx for reply

 

i hope you can help all i can give is related information by g""gle about sonypi sonypi is the name in linux for the equivalent of snc

 

i'v found this:

http://sony-tools.homeunix.net/sony.html

 

that give script to have info or control of snc

 

more links about documentation:

 

http://www.insanelymac.com/forum/index.php...18556&st=60

 

read my post and those of mammoth they contains some of thethings i ve found about snc component

search the file:

SONY_VAIO_INFO_JLVAIO.zip :)

 

 

thanx for your attention

 

i can t do more i m so noob

 

regards

Link to comment
Share on other sites

I've just finished the dsdt extraction for windows, so in the next release it will have all options on all 3 OSes. I'm working on adding some error handlings to warn the user of problems the program may encounter (as trying to read the dsdt in linux w/o permission). If you find any issue please report so I can take a look on it before releasing a new version. =)

Link to comment
Share on other sites

Hi, this looks to be the best patcher thus far.

I have questions though.

When i extract the dsdt dynamically, it's like 8000 lines. the tool only has a row showing 3 digits for the line numbers.

Is it possible to make it 1 digit wider? or adjustable maybe?

 

2nd question:

when i extract dsdt, then recompile it without any changes, it has tons of errors.

I read that it's because my bios is "buggy". but this buggy bios works in windows and mac etc.

so even if i fix the errors, recompiling it without errors would then work, but the dsdt is unusable, i can't boot with it. macos complains about some acpi stuff and locks right there (no Kernel panic though).

how is it possible that i extract my bios. not make any changes other than the if loops that complained, and the dsdt is not useable.

PS: i have an HP insyde bios. (dv7 3180us). with the latest bios installed.

any idea?

Link to comment
Share on other sites

When i extract the dsdt dynamically, it's like 8000 lines. the tool only has a row showing 3 digits for the line numbers.

Is it possible to make it 1 digit wider? or adjustable maybe?

 

It is an issue from the editor component, we opened a report about this and it is fixed in the svn, the next release will have the updated library so this won't happen.

 

About the second question, I've experienced a similar situation with dsdt of a hp mini, removing the compilation errors made it to compile but it didn't work (boot) until I added some patches. I think this happes due to the decompiler. oldnapalm can help you out more since he has more experience.

Link to comment
Share on other sites

when i extract dsdt, then recompile it without any changes, it has tons of errors.

I read that it's because my bios is "buggy". but this buggy bios works in windows and mac etc.

so even if i fix the errors, recompiling it without errors would then work, but the dsdt is unusable, i can't boot with it. macos complains about some acpi stuff and locks right there (no Kernel panic though).

how is it possible that i extract my bios. not make any changes other than the if loops that complained, and the dsdt is not useable.

PS: i have an HP insyde bios. (dv7 3180us). with the latest bios installed.

any idea?

Does Mac OS boot without a dsdt.aml file? (using original DSDT from BIOS)

Can you attach your original DSDT and the fixed/recompiled one? What message do you see in verbose boot before it locks?

Maybe you need another patch, or fix the errors another way.

Link to comment
Share on other sites

Does Mac OS boot without a dsdt.aml file? (using original DSDT from BIOS)

Can you attach your original DSDT and the fixed/recompiled one? What message do you see in verbose boot before it locks?

Maybe you need another patch, or fix the errors another way.

 

oh man that would be great if you could help yeah!

 

Yes i can boot very nicely in the macos without any dsdt file.

I wanted to fix little details by editing the dsdt itself.

 

I will attach the original DSDT as extracted, then the 2nd "fixed" one as soon as i boot that computer.

 

i have seen 2 types of messages.

Either a KP, with some acpi exceptions.

2nd message was without any exception, it just locked at NULLCPUxxxx

also, one thing that confused me,

iasl -c file would show 0 errors.

but iasl -ta would show 8 errors or so.

why the inconsistency?

Link to comment
Share on other sites

Does Mac OS boot without a dsdt.aml file? (using original DSDT from BIOS)

Can you attach your original DSDT and the fixed/recompiled one? What message do you see in verbose boot before it locks?

Maybe you need another patch, or fix the errors another way.

 

 

Here are the 2 dsl files.

 

1 is directly an extract from bios.

2nd one is one i tried to fix using a post here on insanelymac, saying to remove some if() as they were invalid.

It indeed dropped the numbers of errors by a lot.

All i really need is able to compile the "original" by cleaning it. leaving all standard statements and definitions identical to the original BIOS. Once i know i have a stable, unpatched dsl file, then i can play with it and make modifications.

 

Hope you can help :D

Thank you so much!

straightfrombios.dsl.txt

dsdt_edited_errorsonly_no_optimization.dsl.txt

Link to comment
Share on other sites

The errors are caused by the If (IGDS) inside Device (RP05). If you remove If and Else but leave the code inside both, you will have devices PXSX and J380-J384 at the same time, while the original code defines the first or the others, depending on IGDS.

 

I believe you need to remove the code from one of the blocks, as well as the references to it.

 

dsdt.dsl.zip

Link to comment
Share on other sites

The errors are caused by the If (IGDS) inside Device (RP05). If you remove If and Else but leave the code inside both, you will have devices PXSX and J380-J384 at the same time, while the original code defines the first or the others, depending on IGDS.

 

I believe you need to remove the code from one of the blocks, as well as the references to it.

 

dsdt.dsl.zip

 

with the one you just provided, i still get 8 errors, 13 warnings.

Does it mean it is good or not good?

Link to comment
Share on other sites

with the one you just provided, i still get 8 errors, 13 warnings.

Does it mean it is good or not good?

What version of the IASL compiler are you using?

 

I get no errors using version 20090730 [Aug 12 2009]

 

ASL Input:  dsdt.dsl - 12802 lines, 477048 bytes, 6705 keywords
AML Output: dsdt.aml - 56015 bytes, 1083 named objects, 5622 executable opcodes

Compilation complete. 0 Errors, 10 Warnings, 2 Remarks, 7 Optimizations

Link to comment
Share on other sites

We don't have Sony or Lenovo notebooks, but if you know the needed patches, or have a patched and the original DSDT, we can help to make the automated patches, so it would be easy for other people with similar notebooks to patch their DSDT.

 

I have a DSDT for lenovo patched by someone else and a stock one if that will help. The idea for me is get all the patches for the laptop to reduce the kext count.

 

At the moment the patched on which was based on a Y Lenovo is causing the CMOS to reset itself if its Bombed when mac crashes i have checked and the RTC patch is there.

 

So i was going to redo the DSDT but i am a noob for that hence why i like the way your Utillitie is going.

Link to comment
Share on other sites

What version of the IASL compiler are you using?

 

I get no errors using version 20090730 [Aug 12 2009]

 

ASL Input:  dsdt.dsl - 12802 lines, 477048 bytes, 6705 keywords
AML Output: dsdt.aml - 56015 bytes, 1083 named objects, 5622 executable opcodes

Compilation complete. 0 Errors, 10 Warnings, 2 Remarks, 7 Optimizations

Holy {censored}!

yours worked. i ignored (forced) the errors and it actually loaded without errors, without crashes.

i added the brightness control and it then showed up in the control panel.

I am not sure why my edit failed while yours worked.

any way to automate something like that, to basically "correct" the parsing. the errors indicated by iasl are very cryptic in my opinion.

i got the latest iasl, and i get 0 errors if i use -c option

but when compiling with -ta -f that's when it shows like 3 errors or so.

oh well, it works. maybe mine is not the latest latest, i thought it was.

Thank you soooo so much!

i can now start to patch and play around with dsdt!

 

EDIT: actually i am using version 20100331 (Apr 1 2010)

Link to comment
Share on other sites

I have a DSDT for lenovo patched by someone else and a stock one if that will help.

Attach them and I will take a look.

 

I am not sure why my edit failed while yours worked.

any way to automate something like that, to basically "correct" the parsing. the errors indicated by iasl are very cryptic in my opinion.

The difference from your edit to mine is that you removed the If and Else statements (which were causing the errors) but left the code that were inside both, and I removed the code inside Else.

 

You can make a patch for this specific situation, but you can't automate the error fix because other DSDTs may have different code, it's a trial and error to determine which code have to be used (from If or from Else).

Link to comment
Share on other sites

Attach them and I will take a look.

 

 

The difference from your edit to mine is that you removed the If and Else statements (which were causing the errors) but left the code that were inside both, and I removed the code inside Else.

 

You can make a patch for this specific situation, but you can't automate the error fix because other DSDTs may have different code, it's a trial and error to determine which code have to be used (from If or from Else).

well, no matter what, you're awesome, thank you again!

Link to comment
Share on other sites

The EVo DSDTSE that lacked this feature. They give you nice hacks but really never help you insert them properly

 

oldnapalm,

 

Is there a way to apply all the patching to my DSDT file I have attached? Its was extracted using the ubuntu v9.04 live cd.

 

Its really odd that the the Dell XPS M1330 Non CPu specific DSDT works on my Dell D830, thanks to Brett Whinnen's thread. It works nearly 100% working. I believe they have the same chipsets. My Graphics is the Nvidia NVS Quadra 140M which is supposedly the same graphics card in the M1330, the Nvidia 8400M. I believe they are both actually the equivalent 7300GT from my research on the net. Both Dell Notebooks are suppose to be the same chipset motherboards.

 

I have done some mods and still cannot get sleep to work properly as well as the Ethernet Gigabit Nextreme BCM5755.

 

Otherwise everything else works 100% including shutdown and restart with using only AppleACPIPS2Nub.kext, ApplePS2Controller.kext, fakesmc.kext and smbios.plist. I don't need any other kexts. Even Speed step works.

 

The other issue which they cannot figure out to fix is the "Warning LPC Initialization failed". I do not get the error many of us see "_CST evaluation failed". Just the LPC warning.

 

Many people working on this to try and figure out how to fix it. No luck so far. AB___73, Brett any many others with the Dell XPS M1330/M1550 are trying to resolve this.

 

 

I am attaching 4 files. Ioreg my final dsdt a M1330 dsdt which is the foundation of my final dsdt and a linux extracted DSDT. I was wondering if you could have a peak to see what might be causing my machine to freeze when it wakes from sleep.

 

 

Thanks

Files.zip

Link to comment
Share on other sites

I am attaching 4 files. Ioreg my final dsdt a M1330 dsdt which is the foundation of my final dsdt and a linux extracted DSDT. I was wondering if you could have a peak to see what might be causing my machine to freeze when it wakes from sleep.

Does it happen with any DSDT or just with the modified one?

 

Maybe it's something about \_SB.PCI0.VID.GLID (Local0) or Notify (\_SB.MBTN, 0x02) and HSCO (0x02) which are only called in method _WAK if OSID () >= 0x20 (it's a OS version check).

Link to comment
Share on other sites

Does it happen with any DSDT or just with the modified one?

 

Maybe it's something about \_SB.PCI0.VID.GLID (Local0) or Notify (\_SB.MBTN, 0x02) and HSCO (0x02) which are only called in method _WAK if OSID () >= 0x20 (it's a OS version check).

 

I am not sure about that script?

 

Should I remove it or change it to see? If I remove it what other script would I need to modify so it will compile correctly?

 

The M1330.dsdt also causes the wak crash. If I could get the linux.dsdt hacked with all the fixes I guess I could try and incorporate all the others that Brett inserted if I can figure them out like shutdown/restart. Any CPU DSDT and my graphics card script Nvidia Quadra NVS 140M (7300GT) card.

 

 

 

I guess I would start out with fassl famous dsdt patcher to fix hpet and the _T_ and _0_T_ issues and some of the local 0 stuff.

 

 

 

Then use EVO DSDTSE hack list to see what I need to insert for the other fixes? I have no idea how to do the final tweaking as Brett did for his NOn CPU DSDT which is the M1330.dsdt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...