olarila.com

Mac OS X x86 - Hackintosh
It is currently 23 Apr 2014, 11:07

All times are UTC [ DST ]




Post new topic Reply to topic  [ 97 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
 Post subject: DSDT editor and patcher
PostPosted: 26 Dec 2010, 21:38 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1137
el coniglio released this DSDT editor with automated patching capabilities

Image

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 ";")
Quote:
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





Screenshots:

Linux
Image

Windows
Image


Credits:

Editor component: jsyntaxpane (http://code.google.com/p/jsyntaxpane/)
IASL Copyright © Intel Corporation
Written in Java


Top
 Profile  
 
PostPosted: 25 Sep 2011, 04:38 
User avatar
GeekInTraining

Joined: 14 Sep 2011, 10:58
Posts: 10
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)


Top
 Profile  
 
PostPosted: 25 Sep 2011, 17:15 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1137
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.


Top
 Profile  
 
PostPosted: 27 Sep 2011, 13:10 
User avatar
GeekInTraining

Joined: 14 Sep 2011, 10:58
Posts: 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)


Top
 Profile  
 
PostPosted: 27 Sep 2011, 15:13 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1137
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/


Top
 Profile  
 
PostPosted: 02 Oct 2011, 07:41 
User avatar
GeekInTraining

Joined: 14 Sep 2011, 10:58
Posts: 10
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)


Top
 Profile  
 
PostPosted: 02 Oct 2011, 15:41 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1137
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).


Top
 Profile  
 
PostPosted: 05 Oct 2011, 00:30 
User avatar
GeekInTraining

Joined: 14 Sep 2011, 10:58
Posts: 10
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)


Top
 Profile  
 
PostPosted: 05 Oct 2011, 01:23 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1137
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.


Top
 Profile  
 
PostPosted: 05 Oct 2011, 13:42 
User avatar
GeekInTraining

Joined: 14 Sep 2011, 10:58
Posts: 10
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)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 97 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group