Jump to content

Chameleon bootloader with SSDT and DSDT override


  • Please log in to reply
130 replies to this topic

#61
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,713 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
hy
I need your help.
I've created SSDT.aml and DSDT.aml
but the ssdtboot won't work.

i've chameleon2 and at boot now it say:
apple boot plist not found

then.. if I boot from another drive (external) with chamel2 and I select my hdd it boots fine.

#62
Dr. Hurt

Dr. Hurt

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,493 posts
  • Gender:Male
  • Location:Cairo, Egypt and NYC, USA
  • Interests:Wandering around on the internet!! Politics, Sci/Tech, Medicine.
Can you add SSDT override to chameleon 2 and disable the debugging mode?

#63
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
chameleon2 supports ssdt override, you just have to put all your ssdt tables into your dsdt and add dropssdt=y as a boot argument. btw, I have all the tables from a mb4,1, which is a kind of a clone of my low-cost laptop :thumbsdown_anim:. I copied and pasted all the c-states in my ssdt because my laptop has the very same processor (t8100), but I still get this on boot:


17/04/2009 01:36:33 kernel ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed
17/04/2009 01:36:33 kernel ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized

I tried both with my original cstates and with the ones from the macbook4,1... I also emulate smc in my dsdt but this doesn't seem to help... any idea?

btw these are the mb's tables:

Attached Files



#64
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,713 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello

chameleon2 supports ssdt override, you just have to put all your ssdt tables into your dsdt and add dropssdt=y as a boot argument. btw, I have all the tables from a mb4,1, which is a kind of a clone of my low-cost laptop :huh: . I copied and pasted all the c-states in my ssdt because my laptop has the very same processor (t8100), but I still get this on boot:


17/04/2009 01:36:33 kernel ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed
17/04/2009 01:36:33 kernel ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized

I tried both with my original cstates and with the ones from the macbook4,1... I also emulate smc in my dsdt but this doesn't seem to help... any idea?

btw these are the mb's tables:



put into dsdt how?
cut and paste ssdt.dsl text file in the queue of dsdt.aml and then compile the only one?
and after.. put it in E/E or / ?

#65
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
as someone stated at the beginning of this post, this should be only for people who are confident with this stuff.. however yes, look at the scopes in your ssdts, cut and paste from there to the proper place in your dsdt, compile it and put it where it usually is. then add dropssdt=y.

btw, has anybody succeeded in using appleintelcpupm properly? my laptop has the very same chipset, graphics and processor of a macbook4,1.. the only problem seems to be the smc device that I obviously don't have..

#66
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts
This is DSDT+SSDT table taken from Acer Aspire 9420.
Attached File  aceraspire9420_ssdt.zip   31.52KB   210 downloads
CPU speedstep working with vanilla kernel & AppleIntelCPUPowerManagement.kext. I only add code for audio ALC883 (still need patched/legacy AppleHDAPlatformDriver kext) in DSDT.

Hope this help. :)

kizwan

#67
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
how did u manage to get speedstep working with appleintelcpupm?!

#68
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

how did u manage to get speedstep working with appleintelcpupm?!

I don't know how to explain it, it just....works. I just migrated from hack to retail setup (about a month ago). I was hoping somebody can explain it to me actually. This is the main reason I shared my ssdt file here.

Speedstep did not working while I'm using hack (JaS 10.5.4 & iPC 10.5.6) setup even with DSDT override. Geekbench always scored 1600. After I applied VoodooPower, speedstep working & geekbench scored 2300-2400. But I'm experiencing extreme CPU temperature & occasional kernel panic. So, I removed it. Then I changed to retail setup (without installing VoodooPower because past experience). Just recently (this week) I applied DSDT override because I want to add HDEF code for my audio, ALC883, so that I can remove HDAEnabler.kext & legacy HDAController.kext. This afternoon while doing some works, I detect 'abnormal' changes to my CPU temperature. I know that changes is not possible if I don't have speedstep. So I execute geekbench & supprisingly it scored 2200-2300. To confirm it I did a couple of reboot & shutdown. I also installed "MSR Tools" just to make sure.

BTW, I installed VMware Fusion 2.0.4. I don't know if it has anything to do with it.

kizwan

#69
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
well, have you checked if you have speedstep with cpu-x for example? also, do you get these errors on boot?

27/04/2009 01:10:21 kernel ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed 
27/04/2009 01:10:21 kernel ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized

btw I'm on a retail installation as well, I only load dsmos, VoodooPS2 and HDA kexts from the efi partition and I installed voodoopower and voodoobattery in s/l/e

#70
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

well, have you checked if you have speedstep with cpu-x for example?

Yes, the CPU have speedstep capability.

also, do you get these errors on boot?

27/04/2009 01:10:21 kernel ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed 
 27/04/2009 01:10:21 kernel ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized

No, I did not get that error either on hack or retail.

btw I'm on a retail installation as well, I only load dsmos, VoodooPS2 and HDA kexts from the efi partition and I installed voodoopower and voodoobattery in s/l/e

I only load AppleACPIBatteryManager, HDA, SMBIOSResolver, AppleACPIPlatform.kext (vanilla kext for ApplePS2Controller dependency), AppleDecrypt.kext, ApplePS2Controller.kext, IO80211Family.kext (vanilla kext, just add '4315' in broadcom info.plist) and IONetworkingFamily.kext (vanilla kext for IO80211Family.kext dependency) from the efi partition. I did not install voodoopower.

kizwan

#71
ab___73

ab___73

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts
Hi folks,

THIS IS NOT FOR THE CASUAL USER

C-States are usually stored in hard coded memory addresses.

If one of your SSDT tables contains something similar to the following:

[codebox] Scope (\)
{
Name (SSDT, Package (0x0C)
{
"CPU0IST ",
0x7F7F4852,
0x000001FB,
"CPU1IST ",
0x7F7F478A,
0x000000C8,
"CPU0CST ",
0x7F7F4AD2,
0x000004CB,
"CPU1CST ",
0x7F7F4A4D,
0x00000085
})
[/codebox]

This indicates that your computer has C-States hard coded in to memory addresses.

The above code is an array of the hard coded memory locations and sizes of your C-States. These are usually unique to the oem BIOS version.

I've found that for some strange reason the ACPI_SMC....kext only recognises and loads C-States when they are loaded using the above method.

I've used acpidump with a ubuntu live CD to dump my C-State tables. (google acpidump dsdt linux).

I've also modified them and loaded them by compiling them to a .aml file renamed them to SSDT-X.aml (where X is a number above the last SSDT table you have in your root folder), copied them to the root folder.
For example I have the following files in my root folder:

SSDT-0.aml (first oem ssdt table from my laptop)
SSDT-1.aml (second "" "" "" "" )
..
SSDT-4.aml (last oem table from my laptop)
SSDT-5.aml (dump of my first C-State table that i dumped with ubuntu using acpidump)
SSDT-6.aml (dump of my second "" "" "" "")
..
SSDT-8.aml (dump of my last C-State table "" "" "")

these C-State tables are now loaded into a memory location different from the oem hard coded tables.

You can find the memory location of these by booting with the voodoo kernel in kprintf=1 mode.

When you run "sudo dmesg" from terminal you will find something similar to the following:

[codebox]ACPI: SSDT @ 0x18b3000/0x0024 (v001 HP HPQNLP 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18b4000/0x02E9 (v001 HP HPQSAT 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18b5000/0x0232 (v001 HP Cpu0Tst 0x00003000 INTL 0x20080926)
ACPI: SSDT @ 0x18b6000/0x00A0 (v001 HP Cpu1Tst 0x00003000 INTL 0x20080926)
ACPI: SSDT @ 0x18b7000/0x0024 (v001 HP HPQNLP 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18b8000/0x0024 (v001 HP HPQNLP 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18b9000/0x0064 (v001 HP CPU0IST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18ba000/0x0056 (v001 HP CPU1IST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18bb000/0x0034 (v001 HP CPU0CST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18bc000/0x0064 (v001 HP CPU1CST 0x00000001 INTL 0x20080926)
[/codebox]

The code above indicates the location of the C-State tables that have been modified and have been loaded into a lower memory location.

these are the lines to look for:

ACPI: SSDT @ 0x18b9000/0x0064 (v001 HP CPU0IST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18ba000/0x0056 (v001 HP CPU1IST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18bb000/0x0034 (v001 HP CPU0CST 0x00000001 INTL 0x20080926)
ACPI: SSDT @ 0x18bc000/0x0064 (v001 HP CPU1CST 0x00000001 INTL 0x20080926)

Then modify the SSDT table that contained the array to the hardcoded location of the C-States to the following to suit the memory locations above: (for example)
[codebox]Scope (\)
{
Name (SSDT, Package (0x0C)
{
"CPU0IST ",
0x18b9000,
0x0000064,
"CPU1IST ",
0x18ba000,
0x0000056,
"CPU0CST ",
0x18bb000,
0x0000034,
"CPU1CST ",
0x18bc000,
0x0000064
})[/codebox]

Recompile this modified SSDT table to an aml file and copy it into the root folder.

When you reboot ACPI_SMC....kext will now load the modified C-State tables.

I've attached my C-States dumped with acpidump using the ubuntu live CD

Attached File  hp530_cstates_orig.zip   4.87KB   120 downloads

I hope this helps someone.


Cheers
ab

#72
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
thankyou I'll try this tomorrow hopefully, but how do you modify your c-states? I mean, how do you get the correct values that are meant to be injected? It would be great to have a macbook4,1 c-state dump 'cos I have the very same processor.. but I know this is a quite difficult request :(

also, from what I know the c-states are 'only' useful to control the power management, will this enable vailla speedstep as well?

finally, would you mean to tell me what should I write in the linux terminal to dump my c-states? I'm now downloading ubuntu live 'cos I keep on losing the cds every time :)

#73
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
so this is what I did: in my ssdt I have for example

"CPU0IST ",
0xBF6D501D,
0x027A,

so, in linux, acpidump --addr 0xBF6D501D --length 0x027A

but it seems that the addresses and the lengths are all messed up cos none of the output I get can be decompiled. I always get an error like TableHeader length [0x5F314348] greater than the input file size [0x27A] in iasl. This is probably the reason why my c-states are not loading in os x. is there any way to get the correct addresses from linux?

#74
ab___73

ab___73

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts

so this is what I did: in my ssdt I have for example

"CPU0IST ",
0xBF6D501D,
0x027A,

so, in linux, acpidump --addr 0xBF6D501D --length 0x027A

but it seems that the addresses and the lengths are all messed up cos none of the output I get can be decompiled. I always get an error like TableHeader length [0x5F314348] greater than the input file size [0x27A] in iasl. This is probably the reason why my c-states are not loading in os x. is there any way to get the correct addresses from linux?


Sorry i missed a step. You need to decompile them before modifying them.

in linux:

acpidump -a 0xBF6D501D -l 0x027A -o CPU0IST.aml

iasl -d CPU0IST.aml

(this shoud create CPU0IST.dsl or CPU0IST.dat)

check this by:

pico CPU0IST.dsl (or dat)

Repeat this for all the other memory addresses, change the output file name to match the string from the table e.g. CPU1IST.aml CPU0CST.aml etc. (this is not required it just keeps things tidy).

Copy these files onto a memory stick or other removable media for use in mac.

--

AB

#75
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts

Sorry i missed a step. You need to decompile them before modifying them.

in linux:

acpidump -a 0xBF6D501D -l 0x027A -o CPU0IST.aml

iasl -d CPU0IST.aml

(this shoud create CPU0IST.dsl or CPU0IST.dat)

check this by:

pico CPU0IST.dsl (or dat)

Repeat this for all the other memory addresses, change the output file name to match the string from the table e.g. CPU1IST.aml CPU0CST.aml etc. (this is not required it just keeps things tidy).

Copy these files onto a memory stick or other removable media for use in mac.

--

AB



yes of course I tried to decompile them, but iasl gives an error and doesn't create the dsl file. In fact, I found out that in linux the cst addresses are different and they don't decompile as well... I'm starting to think that there are not cst tables in my bios. Here's my whole acpi memory section dumped from linux (dsdt+ssdt and everything else): Attached File  1.dat.zip   35.5KB   4 downloads

It's not possible to decompile it 'cos it includes everything and it must be splitted first, if you could have a look at it however it would be cool :)

edit: I decompiled everything and there's no trace of cst tables :thumbsup_anim: . I already have pstates from a macbook4,1 ioreg (same processor as my laptop), do you know if I can extract the cst from the ioreg as well?

finally, I have this in linux: Attached File  states.zip   7.89KB   24 downloads
so I could try to inject them maybe, bu they seem to be a bit 'dirty'

#76
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
never mind I finally found them even if the addresses I had were completely wrong.. I'm trying to inject them in the dsdt and use dropssdt in chameleon now

edit: it works :rolleyes: , I got rid of those errors and my fan isn't always spinning like before.. however according to cpu-x I don't have throttling (always stuck at 2100mhz). tomorrow I'll see how long does the battery last now, these are my tables btw: Attached File  Archive.zip   5.34KB   57 downloads

any suggestion on the throttling? I may try to copy and paste the pstates of the mb4,1 tomorrow

#77
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts

never mind I finally found them even if the addresses I had were completely wrong.. I'm trying to inject them in the dsdt and use dropssdt in chameleon now

edit: it works :hammer: , I got rid of those errors and my fan isn't always spinning like before.. however according to cpu-x I don't have throttling (always stuck at 2100mhz). tomorrow I'll see how long does the battery last now, these are my tables btw: Attached File  Archive.zip   5.34KB   57 downloads

any suggestion on the throttling? I may try to copy and paste the pstates of the mb4,1 tomorrow

You can not trust cpu-x completely. Use other measuring tools instead, for example MSR Tools. I always run MSR Tools + Geekbench to test the throttling.

EDIT: cpu-x vs. coolbook
Posted Image

kizwan

#78
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
alright here's my ioreg dump vs a mb4,1 one that has the same processor. I already modified the _PSS section so as you can see (under CPU0 - ACPI_SMC_Platformplugin) the PerformanceStateArray and the stepper-data sections are identical in the two ioregs. Almost everything else is the same as well but the CPUPLimit value, which is 0x0 in the macbook and 0x6 in mine. I think this value locks my cpu to the highest pstate. if I put for example 5 pstates under _PSS (instead of 7), I will get CPUPLimit=0x04 and so on... any way to manually force this value to 0x0 through dsdt?

You can not trust cpu-x completely. Use other measuring tools instead, for example MSR Tools. I always run MSR Tools + Geekbench to test the throttling.

kizwan


kizwan, I think cpu-x reads the info directly from the processor. It used to detect throttling with every power management kext I've been using. If it shows the processor stuck at 2100 I'm pretty sure it is not throttling :D

edit: just a confirmation.. sysctl -a output:

[...]
hw.ncpu = 2
hw.cpufrequency = 2100000000
hw.availcpu = 2
hw.ncpu: 2
hw.activecpu: 2
hw.cpufrequency_max: 2100000000
hw.cpufrequency_min: 2100000000
hw.cpufrequency: 2100000000
[...]

Attached Files



#79
ab___73

ab___73

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts

never mind I finally found them even if the addresses I had were completely wrong.. I'm trying to inject them in the dsdt and use dropssdt in chameleon now

edit: it works :) , I got rid of those errors and my fan isn't always spinning like before.. however according to cpu-x I don't have throttling (always stuck at 2100mhz). tomorrow I'll see how long does the battery last now, these are my tables btw: Attached File  Archive.zip   5.34KB   57 downloads

any suggestion on the throttling? I may try to copy and paste the pstates of the mb4,1 tomorrow


coconup,

How did you find you CState tables? I would love to find out.

-
AB

#80
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts

coconup,

How did you find you CState tables? I would love to find out.

-
AB


basically I found the beginning of the first cst table at the end of what I extracted according to my ssdt (which was wrong), then I extracted a huge piece of memory beggining more or less from there and I chopped it with hexedit to get all the correct tables :)

I installed msr tools and it reports some weird things like a 37x multiplier at 2.1ghz (it should be 10.5).. no vanilla throttling so far.. however I have throttling if I use coolbook but I still have that 37x at full speed. also, I lost that 'stepper-data' section in my ioreg, I think it happened after installing coolbook so I'll remove it in order to make some tests on an eventual vanilla throttling.

btw has anybody a clean vanilla throttling with applecpupm?

edit: I removed coolbook and msr-tools reporst I'm stuck at 800mhz (lowest pstate)... it is definitely that CPUPLimit value that must be changed, any idea?
btw I got back to the ioreg I posted before, and it's not cosmetic.. my cpu is really stuck at 800mhz cos benchmarks went down from 2800 to 1000 in geekbench :wacko:





0 user(s) are reading this topic

0 members, 0 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