Jump to content

DSDT fixes for Gigabyte boards


  • Please log in to reply
1907 replies to this topic

#861
mm67

mm67

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 673 posts
  • Gender:Male
  • Location:Finland

@Master Chief Is lspci 64bit compatible?

86:lspci zoliky$ sudo kextload lspcidrv.kext
Password:
/Users/zoliky/Desktop/lspci/lspcidrv.kext failed to load - (libkern/kext) requested architecture/executable not found; check the system/kernel logs for errors or try kextutil(8).


This one is 64-bit compatible
Attached File  lspci_V1.1.pkg.zip   281.85KB   105 downloads

#862
Shaj

Shaj

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 166 posts

Hi Shaj

Here you go my DSDT based on MM67(Thank you !) work.

sleep-autosleep, sleep by pwr button, audio (+LegacyHDA), 9600GT (efi string), E8400 speedstepping, Firewire with Hotplug = works

using:
LegacyHDA.kext (thanks to THE KING and tmongkol)
OSXRestart.kext (Thanks Go.. oops MasterChieff :])
fakesmc.kext (Spasiba Netkas !)


Awesome swavek. Thanks for posting that. Two quick questions:

1) Are the above three the only kexts you use in Exra?
2) Is your CPU overclocked?

Thanks again mate!

#863
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male

This one is 64-bit compatible
Attached File  lspci_V1.1.pkg.zip   281.85KB   105 downloads

thanks, mate!

#864
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,053 posts
  • Gender:Male
  • Location:UK

This isn't a DSDT fix but a way to help navigate the very long DSDT files. One of my favorite tools for text editing is BBEdit.

Thanks for the tip kdawg.
I haven't used BBEdit in years, though I have been using TextWrangler (which is Bare Bones' free text editor). I have just tried the BBEdit demo and yes, the option to collapse code is something I was looking for a while back when I started reading and understanding a DSDT's structure. I agree it definitely helps with long DSDT files to visualise what's where etc.

#865
thiagomorales

thiagomorales

    Think different...

  • Members
  • PipPipPip
  • 121 posts
  • Gender:Male
  • Location:Brazil - Rio de Janeiro

Thanks for the tip kdawg.
I haven't used BBEdit in years, though I have been using TextWrangler (which is Bare Bones' free text editor). I have just tried the BBEdit demo and yes, the option to collapse code is something I was looking for a while back when I started reading and understanding a DSDT's structure. I agree it definitely helps with long DSDT files to visualise what's where etc.


In Windows i always use Notepad++ to view and Edit DSDT..On mac i have using BBEdit too..
It helps to view the DSDT structure and your sections..and for some peoples get rid of syntax errors.. "(", ")" ..

Very usefull tip.

#866
kdawg

kdawg

    InsanelyMac Legend

  • Donators
  • 508 posts
  • Gender:Male
  • Location:Boston, MA

In Windows i always use Notepad++ to view and Edit DSDT..On mac i have using BBEdit too..
It helps to view the DSDT structure and your sections..and for some peoples get rid of syntax errors.. "(", ")" ..

Very usefull tip.

I have to mention DiffMerge too… again. Sorry, but I see too many people here ask what they did wrong then ask someone else to fix it. I don't mind lending a hand when I know they've tried to track it down themselves. Best thing is this one's FREE. It will compare two files against each other and mark the differences. Easy! Occasionally when it gets confused you have to put in a manual alignment marker to get things lined up again.
http://www.sourcegear.com/diffmerge/

Attached File  diffmerge.png   225.66KB   107 downloads

as we say in Scouse land - Ta La' - works for me!
:D

Now Master Jedi- I have an issue that I know effects others - I'm booting a SW RAID (sure this is issue generally) also, my drives keep switching around. mainly my boots are 1s3 and 2s3 (this in it's self is odd as my 2 RAID'd drives are 0 ans 1 in BIOS.) but sometimes I have 0s3 and 2s3 or 3s3 etc etc .. i believe IRQ routing table issue ??
http://www.projectos...?...ic=532&st=0 post14

{censored} annoying especially if making changes to 2 drives (RAID setup.) and each boot you have too look them up!

Appol' for OT and appol' if I've missed a fix.

Any ideas?

D.

Did you specify your UUID as a kernel flag in your com.apple.boot.plist?

Like so:
<key>Kernel Flags</key>    <string>arch=i386 boot-uuid=6BC6A3B2-DDA3-3CED-88CF-44E38C66F473</string>    <key>Default Partition</key>    <string>hd(1,2)</string>


#867
emil_arkman

emil_arkman

    InsanelyMac Protégé

  • Members
  • Pip
  • 5 posts
@mitch_de

Would you mind sharing your latest dsdt for EP35-DS3. Would be highly appreciated.

Cheers
Emil

#868
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male
Where can I obtain the shutdown fix for OSXRestart? Thanks!

#869
thiagomorales

thiagomorales

    Think different...

  • Members
  • PipPipPip
  • 121 posts
  • Gender:Male
  • Location:Brazil - Rio de Janeiro

Where can I obtain the shutdown fix for OSXRestart? Thanks!


Shutdown fix was made by mm67, it´s a DSDT fix not an OSXRestart patch..

OSXRestart.kext by MasterChief fix RESTART only.

You can get mm67 DSDT on Post#744 page 38..Try using Method _PTS from his DSDT..

Regards.

#870
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male
Thank you for your answer! Yes. I need the DSDT patch.

#871
Duvel300

Duvel300

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts
Hey guys,

Back after a long absence.... Anyway I noticed still a lot of people have problems restarting their hack and are using some type of kext file to accomplish this. I solved this a while back by modifying the boot file to load a different FADT file (also known as FACP). Hack's that will not reboot are missing some information in the FADT table that the OS needs to initiate a successful restart. I included both the boot file which is based on the latest Chameleon RC4 and a FADT.aml that should get you started. the aml file should work on all Gigabyte EP45 boards, EP35 users might need to remove the PM2 address. You will need a hex editor for this and use the DSL file as a reference for the offsets. But always compare the address offsets in the included FADT file with your own FADT to be sure. The boot file will take care of the CRC after modifying the file.

How to Install:
- Copy the boot file to the root of your OSX partition.
- Copy the FADT.aml to the same folder where you have your DSDT.aml file.
- Reboot

The other 2 files included in the package is the source file with the changes I made and the decompilation of the FADT.aml file.

Good Luck!

Attached Files



#872
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
Thank you Duvel300.

Now people here can also fix the wrong latency values – in the same table – because like I said here this might be blocking ACPI CA from entering a C2+ state (the values are wrong anyway). Let's see what this brings.

Good job!

Note: If you have something like this:
[05Fh 095  1]				 _CST Support : E3
[060h 096  2]				   C2 Latency : 0065
[062h 098  2]				   C3 Latency : 03E9
Then you need to fix it. Just follow the provided link.

#873
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Gurus
  • 680 posts
  • Gender:Male

Hack's that will not reboot are missing some information in the FADT table that the OS needs to initiate a successful restart. I included both the boot file which is based on the latest Chameleon RC4 and a FADT.aml that should get you started. the aml file should work on all Gigabyte EP45 boards, EP35 users might need to remove the PM2 address. You will need a hex editor for this and use the DSL file as a reference for the offsets. But always compare the address offsets in the included FADT file with your own FADT to be sure. The boot file will take of the CRC after modifying the file.

Thanks for sharing the info and the patch.
However would be great if you can get in more details, about what is missing and what should be replaced/added.
I tried some fixes in my BIOS, but stupid sucker overwrite all I did on boot, so loading modified one is best IMHO...unless I'll find where in BIOS is the culprit code that does {censored}...

#874
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Thanks for sharing the info and the patch.
However would be great if you can get in more details, about what is missing and what should be replaced/added.
I tried some fixes in my BIOS, but stupid sucker overwrite all I did on boot, so loading modified one is best IMHO...unless I'll find where in BIOS is the culprit code that does {censored}...

The failing tables are missing the Reset Register bits:
[074h 116 12]			   Reset Register : <Generic Address Structure>
[074h 116  1]					 Space ID : 01 (SystemIO)
[075h 117  1]					Bit Width : 08
[076h 118  1]				   Bit Offset : 00
[077h 119  1]				 Access Width : 00
[078h 120  8]					  Address : 0000000000000CF9
[080h 128  1]		 Value to cause reset : 06
If you have this register in your table then OSXRestart.kext should work – which is the case for your hardware if I remember it correctly.

Note: See also ACPI specification. And here "Reset Register Supported" was 0, which I changed into 1 as a test. Not that it changed anything but anyway.

#875
cparm

cparm

    InsanelyMac Legend

  • Retired
  • 997 posts
  • Gender:Male

Hey guys,

Back after a long absence€€ Anyway I noticed still a lot of people have problems restarting their hack and are using some type of kext file to accomplish this. I solved this a while back by modifying the boot file to load a different FADT file (also known as FACP). Hack's that will not reboot are missing some information in the FADT table that the OS needs to initiate a successful restart. I included both the boot file which is based on the latest Chameleon RC4 and a FADT.aml that should get you started. the aml file should work on all Gigabyte EP45 boards, EP35 users might need to remove the PM2 address. You will need a hex editor for this and use the DSL file as a reference for the offsets. But always compare the address offsets in the included FADT file with your own FADT to be sure. The boot file will take of the CRC after modifying the file.

How to Install:
- Copy the boot file to the root of OSX partition.
- Copy the FADT.aml to the same folder where you have your DSDT.aml file.
- Reboot

The other 2 files included in the package is the source file with the changes I made and the decompilation of the FADT.aml file.

Good Luck!


brilliant :)

now, no kext are needed to reboot neither to shutdown/sleep

excellent work, only question :

can you explain how to patch the fadt.aml, i have a P35 and the PM2 address is 0000000000000000

or how to recompile our own facp table, iasl gives me errors (even if i don't edit the dsl file) :

/Users/cparm/Desktop/facp.dsl	12: [000
Error	4096 -					  ^ Invalid character (0x5B), expecting ASL keyword or name

/Users/cparm/Desktop/facp.dsl	12: [000
Error	4096 -						 ^ syntax error, unexpected PARSEOP_INTEGER, expecting PARSEOP_DEFINITIONBLOCK


ps: i have recompiled PC_EFI 10.5 with your patch, since chameleon Rc4 gives me an error with system profiler in the sata section : "no device found" ???

with the patched pc_efi all work like a charm ;) =>

#876
Duvel300

Duvel300

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts

Thank you Duvel300.

Now people here can also fix the wrong latency values €“ in the same table €“ because like I said here this might be blocking ACPI CA from entering a C2+ state (the values are wrong anyway). Let's see what this brings.

Good job!

Note: If you have something like this:

[05Fh 095  1]				 _CST Support : E3
[060h 096  2]				   C2 Latency : 0065
[062h 098  2]				   C3 Latency : 03E9
Then you need to fix it. Just follow the provided link.


I am not completely sure about this, I tried it as well with no result. It seems Apple doesn't use this at all. Also comparing the FADT from different Mac's they all contain the max value for those fields which means it's not in use. I might be wrong tho and it doesn't hurt to give it a try.

Thanks for sharing the info and the patch.
However would be great if you can get in more details, about what is missing and what should be replaced/added.


Hey The King, you are right and I might make a little tutorial around it. I have read some of your work with regards to sound etc, great work! (hint.. ;) ).

The failing tables are missing the Reset Register bits:

[074h 116 12]			   Reset Register : <Generic Address Structure>
[074h 116  1]					 Space ID : 01 (SystemIO)
[075h 117  1]					Bit Width : 08
[076h 118  1]				   Bit Offset : 00
[077h 119  1]				 Access Width : 00
[078h 120  8]					  Address : 0000000000000CF9
[080h 128  1]		 Value to cause reset : 06


Master Chief is correct, this is the missing piece of the puzzle.


brilliant :)

now, no kext are needed to reboot neither to shutdown/sleep

excellent work, only question :

can you explain who to patch the fadt.aml, i have a P35 and the PM2 address is 0000000000000000

or who to recompile our own facp table, iasl gives me errors (ever if i don't edit the dsl file) :

/Users/cparm/Desktop/facp.dsl	12: [000
Error	4096 -					  ^ Invalid character (0x5B), expecting ASL keyword or name

/Users/cparm/Desktop/facp.dsl	12: [000
Error	4096 -						 ^ syntax error, unexpected PARSEOP_INTEGER, expecting PARSEOP_DEFINITIONBLOCK


ps: i have recompiled PC_EFI 10.5 with your patch, since chameleon Rc4 gives me an error with system profiler in the sata section : "no device found" ???

with the patched pc_efi all work like a charm :) =>


That's the bummer here so to say, you can't compile the dsl file, you can only decompile it to show you the contents of the file. So we will have to resort to editing the binary or aml file directly. You can do this with any decent hex editor. Personally I use Hex Editor Neo Free (Windows....).

To take your example of editing the value for your PM2 address, look up the offset for PM2 in your DSL file and you'll see it's at offset 0x48 and 4 bytes in length. Open the AML file with a hexeditor go to offset 0x48 and change the bytes to 0x00, and save the file. Take a look at the 2 included pictures.

Oh and good work you got it already ported to PC EFI!

Attached Files



#877
cparm

cparm

    InsanelyMac Legend

  • Retired
  • 997 posts
  • Gender:Male

That's the bummer here so to say, you can't compile the dsl file, you can only decompile it to show you the contents of the file. So we will have to resort to editing the binary or aml file directly. You can do this with any decent hex editor. Personally I use Hex Editor Neo Free (Windows....).

To take your example of editing the value for your PM2 address, look up the offset for PM2 in your DSL file and you'll see it's at offset 0x48 and 4 bytes in length. Open the AML file with a hexeditor go to offset 0x48 and change the bytes to 0x00, and save the file. Take a look at the 2 included pictures.

Oh and good work you got it already ported to PC EFI!


many thanks !!!

my patched fadt.aml =>

PM2 Control Block Length changed from 01 to 00

i also changed
PM2 Control Block : <Generic Address Structure>
.
.
.
Address : 0000000050040000

to

PM2 Event Block : <Generic Address Structure>
.
.
.
Address : 0000000000000000

and those value (because we never know ???)
C2 Latency changed from 005A to the original 0065
C3 Latency changed from 0384 to the original 03E9

#878
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK

1) Are the above three the only kexts you use in Exra?
2) Is your CPU overclocked?

ad1) yes, in fact, only two now - see Duvel300 post #871
ad2) slightly overclocked 9.5x333 (bios F12a)

Hey guys,

Back after a long absence€€ Anyway I noticed still a lot of people have problems restarting their hack and are using some type of kext file to accomplish this. I solved this a while back..

And gooood you popped in ! :)
works great here, thanks for sharing !

#879
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
I looked at the source code and noticed this line:
DBG("File read and stored at: %x\n", kernelAddr);
Now the question is: Do you see the same address being used over and over? Because that would mean that we can fix this in our DSDT. And I do have the reset register yet restart isn't working here. What happens when people here change "Reset Register Supported (V2) : 1" into 0 (by changing A5 04 into A5 00). Thanks.

#880
Duvel300

Duvel300

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts

I looked at the source code and noticed this line:

DBG("File read and stored at: %x\n", kernelAddr);
Now the question is: Do you see the same address being used over and over? Because that would mean that we can fix this in our DSDT. And I do have the reset register yet restart isn't working here. What happens when people here change "Reset Register Supported (V2) : 1" into 0 (by changing A5 04 into A5 00). Thanks.


It might look that it's using the same address each time, but it's definitely dynamic. The offset depends on several factors like the size of the boot loader (boot loader changes in size so will the offset, well in a 1024k boundary). Also the size of the DSDT and other factors will come in to play. If you are using your original FADT and are adding the reset registers to it make sure to update the length indicator in the header as well.

EDIT: What I totally forgot to mention is that this will only work if you have a ACPI 1.0 table. (oops). I will see if I can update the source to include ACPI 2.0 as well.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy