DSDT editor and patcher

DSDT editor and patcher

Postby oldnapalm » 26 Dec 2010, 21:38

Updated:

MaciASL
New editor developed by phpdev32, compatible with DSDT Editor patches.


el coniglio released this DSDT editor with automated patching capabilities

dsdt-editor.png


The main editor windows allows the user to open a DSL file or extract the DSDT from IOReg. It has some useful resources, like syntax highlighting, navigation tree and some options that came with the text editor component it uses, like regex matching, auto completion, jump to pair, etc.

The patcher window parses a script-like language representing the patches. The user can preview the modifications before applying them. This "language" allows us to write dynamic patches that can be applied in various situations. More specific commands can be written as they become necessary.

For now these are the implemented commands (which can be stacked separated by ";")
syntax:

into <type> <property1> <property_argument1> [<property2> <property_argument2> ... <propertyN> <property_argumentN>] <action> begin [action_argument] end
(will be applied to the first occurrence)

into_all <type> <property1> <property_argument1> [<property2> <property_argument2> ... <propertyN> <property_argumentN>] <action> begin [action_argument] end
(will be applied to all occurrences)

where

type: DefinitionBlock, Scope, Method, Device, Processor, ThermalZone, All

property:
label -- first argument for the constructor of selected type
name_adr -- Name (_ADR) value
name_hid -- Name (_HID) value
code_regex -- regular expression to match the code of the selected type (not other types inside of it)
code_regex_not -- regular expression NOT to match the code of the selected type (not other types inside of it)
parent_label -- parent label
parent_type -- parent type
parent_adr -- parent _ADR value
parent_hid -- parent _HID value

action:
insert <code> -- inserts the provided code to the type
set_label <new_label> -- sets the label
replace_matched <code> -- replaces the matched code for the property with the provided code. Regex groups are inserted with %1, %2, ... up to %9
replaceall_matched <code> -- same as replace_matched but will affect all matches
remove_matched -- removes the matched code
removeall_matched -- removes all the ocurrencies of the matched code
remove_entry -- removes the entry and all children nodes
replace_content -- replaces the content of the object (everything inside its main brackets)
store_%8 -- stores the matched group 1 into %8
store_%9 -- stores the matched group 1 into %9

note: replacer will always consider the last provided value


Changes in latest release:

  • fixed bug which caused data loss if number of open and close brackets don't match
  • fixed compile window to work with new IASL versions
  • updated IASL to 20120420


Download: (last updated on 17/May/2012)

Mac OS: DSDTEditor_Mac.zip

Linux and Windows: DSDTEditor_Linux_Windows.zip





Credits:

Editor component: jsyntaxpane (http://code.google.com/p/jsyntaxpane/)
IASL Copyright © Intel Corporation
Written in Java
You do not have the required permissions to view the files attached to this post.
User avatar
oldnapalm
Staff
 
Posts: 1173
Joined: 05 Dec 2010, 21:49

Re: DSDT editor and patcher

Postby hackerz » 25 Sep 2011, 04:38

Hello oldnapalm...

There is a DSDT editor and patcher that can be run in Windows rite... So I ran it in Windows, extract DSDT, I get dsdt.aml and dsdt.dsl... My question is can this dsdt.aml and dsdt.dsl be used in the OSX that I've installed? I mean it will reflect the same setting whether it is in Windows or in OSX rite... :ugeek:
OSX Mountain Lion : 10.8.2
HP Envy 17
1.60 GHz Intel Core i7-720QM
8GB DDR3 RAM
2TB HDD (2x1TB)
ATI Mobility Radeon HD 5850
43.9 cm (17.3") diagonal Full High-Definition HP Ultra BrightView Infinity Display (1920 x 1080)
User avatar
hackerz
 
Posts: 10
Joined: 14 Sep 2011, 10:58

Re: DSDT editor and patcher

Postby oldnapalm » 25 Sep 2011, 17:15

If you extract DSDT in Windows and copy it to Mac OS without patching, it will make no difference. Windows uses DSDT from BIOS, untouched. It would be the same as leaving Mac OS (Chameleon) without a dsdt.aml file, it will get the original from BIOS.
User avatar
oldnapalm
Staff
 
Posts: 1173
Joined: 05 Dec 2010, 21:49

Re: DSDT editor and patcher

Postby hackerz » 27 Sep 2011, 13:10

Ooo... I see :o ... So dsdt.aml is mainly needed by Chameleon and to act as it is a BIOS itself... Am I rite? How about Chimera? Is it the same if I use Chimera instead of Chameleon? Or is it the same bootloader thingy? Ehehehehe... :ugeek:

Another thing I want to ask... What kind of patching do you usually do to the dsdt.aml? What sort of data that you add/patch to dsdt.aml? Sorry for asking this question as I have no clue about dsdt.aml and most of the thing that I must have to run OSX on my HP Envy 17 (with all hardware functioning as in Windows :D )
OSX Mountain Lion : 10.8.2
HP Envy 17
1.60 GHz Intel Core i7-720QM
8GB DDR3 RAM
2TB HDD (2x1TB)
ATI Mobility Radeon HD 5850
43.9 cm (17.3") diagonal Full High-Definition HP Ultra BrightView Infinity Display (1920 x 1080)
User avatar
hackerz
 
Posts: 10
Joined: 14 Sep 2011, 10:58

Re: DSDT editor and patcher

Postby oldnapalm » 27 Sep 2011, 15:13

Actually the boot loader (no matter if it's Chameleon or Chimera) loads the patched DSDT from file (dsdt.aml) and passes it to the OS, instead of passing the original DSDT from BIOS.

The needed patches depends on hardware, here are some examples
http://olarila.com/Patches/
User avatar
oldnapalm
Staff
 
Posts: 1173
Joined: 05 Dec 2010, 21:49

Re: DSDT editor and patcher

Postby hackerz » 02 Oct 2011, 07:41

Hello oldnapalm...

I've gone through the link you've given... But from what I've seen, the lists seem have nothing to do with my hardware... Could you recommend me which patch/patches I should apply to my dsdt? (or don't need to... Ehehehe)

I have HP Envy 17 laptop... My hardware is similar to what scorpioserve has from http://www.olarila.com/forum/viewtopic.php?f=17&t=264 except that my HDD is 2TB (2x1TB)...
OSX Mountain Lion : 10.8.2
HP Envy 17
1.60 GHz Intel Core i7-720QM
8GB DDR3 RAM
2TB HDD (2x1TB)
ATI Mobility Radeon HD 5850
43.9 cm (17.3") diagonal Full High-Definition HP Ultra BrightView Infinity Display (1920 x 1080)
User avatar
hackerz
 
Posts: 10
Joined: 14 Sep 2011, 10:58

Re: DSDT editor and patcher

Postby oldnapalm » 02 Oct 2011, 15:41

I can't tell what patches you need without installing Mac OS and testing first.

Probably some of these patches will be usefull for you

Notebook Core i Nehalem

Also, like scorpioserve, you will probably need the lapic kernel (Taptun).
User avatar
oldnapalm
Staff
 
Posts: 1173
Joined: 05 Dec 2010, 21:49

Re: DSDT editor and patcher

Postby hackerz » 05 Oct 2011, 00:30

Thank you for your excellent link... This is absolutely like what I said before... I've got basically Intel Core i7 but the thing that I should have a look at is Core i Nehalem rite... Without your guide, I wouldn't bother on that thing :mrgreen:

Anyway, what do you mean by testing first? Do you have any software for that? Or something...? And I would like also to ask you about the lapic kernel (Taptun)... What is the function of this kernel compared to the original Mac OS kernel (I believed it is called mach_kernel rite...)?

Thank you for your time in answering my noob question... You are the best oldnapalm... Ehehehe :geek:
OSX Mountain Lion : 10.8.2
HP Envy 17
1.60 GHz Intel Core i7-720QM
8GB DDR3 RAM
2TB HDD (2x1TB)
ATI Mobility Radeon HD 5850
43.9 cm (17.3") diagonal Full High-Definition HP Ultra BrightView Infinity Display (1920 x 1080)
User avatar
hackerz
 
Posts: 10
Joined: 14 Sep 2011, 10:58

Re: DSDT editor and patcher

Postby oldnapalm » 05 Oct 2011, 01:23

By "testing first" I mean install Mac OS, check what issues you have and if they are fixable via DSDT.

The vanilla kernel doesn't work on many Core i HP laptops, you have to use "cpus=1" or you get kernel panic (local apic error). The Taptun kernel is patched to fix that problem.
User avatar
oldnapalm
Staff
 
Posts: 1173
Joined: 05 Dec 2010, 21:49

Re: DSDT editor and patcher

Postby hackerz » 05 Oct 2011, 13:42

Oo ok... Well, actually this is my situation...

I've installed Lion on my laptop... I've used rBoot from tonymac and the installer is located in an external HDD... I've used cpus=1 busratio=12 as the kernel flags... So the default PCIRootUID should be 0 rite... After a few minutes passing the apple logo, my screen became like the picture below :

Image

When I include PCIRootUID=1 in the kernel flag, after a few minutes passing the apple logo, my laptop screen becomes blank and I have to use external screen to proceed with the installation and so on until I get to the desktop... This situation also happens every time I boot my laptop into Mac OS... In the end, I have to use external screen (connecting monitor using VGA or connecting my TV through HDMI port) to see my desktop... That is one thing that puzzles me coz when I installed and run SL 10.6.3, I've no problem at all to get the display on my laptop screen (using PCIRootUID=1 or else the screen will becomes like the image above)... But after I combo update Snow Leopard to 10.6.8, the same situation occured...

So what do you think oldnapalm? Do you have any idea to get around this problem? Or any suggestion/solution? Ehehehe :mrgreen: :geek:
OSX Mountain Lion : 10.8.2
HP Envy 17
1.60 GHz Intel Core i7-720QM
8GB DDR3 RAM
2TB HDD (2x1TB)
ATI Mobility Radeon HD 5850
43.9 cm (17.3") diagonal Full High-Definition HP Ultra BrightView Infinity Display (1920 x 1080)
User avatar
hackerz
 
Posts: 10
Joined: 14 Sep 2011, 10:58

Next

Return to DSDT

Who is online

Users browsing this forum: No registered users and 2 guests