Jump to content

Chameleon RC5 mode with mem detection enabled and automatic P-States & C-States generation for native power managment


kozlek
 Share

1,214 posts in this topic

Recommended Posts

If you experienced a problem patching your DSDT/SSDT to enable Mac OS X native power management, or you don't know how to do this - the new bootloader is for you! Should work on most modern systems/processors.

 

Bootloader based on latest Chameleon RC5 rev184. Mem detection is enabled and slightly modified: fixed system profiler returns error while reading memory info in some cases. P-States & C-States are exported to the system via additional SSDTs, so if you have native SSDTs with _CST methods you should use "DropSSDT" = "Yes" option in boot.plist. If you have modded DSDT with _CST methods you should remove them or it'll be kernel panic on system start. The bootloader also supports multiple SSDT loading (names should be SSDT.aml, SSDT-1.aml ... SSDT-29.aml). Bootloader also supports latest graphic cards (code was obtained from here)

 

To enable native power management you should use proper mac model + HPET enabled. To enable C-States you must have LPC working on your system. It could be enabled via DSDT mod or injector.

 

To activate P-States generation add "GeneratePStates"="Yes" option into boot.plist. To activate C-States generation add "GenerateCStates"="Yes" option into boot.plist. Those features are not activated by default!

 

Sources available here.

P-States generation algo based on original superhai's algo from VoodooPower project.

 

P-States generation for newer motherboards with Core ix processors now supported.

  • Like 2
Link to comment
Share on other sites

I felt this days ago, when we talked on the other topic .. and it works amazing on my q9300 (only on this i have try for now). I have remove ss code in dsdt,, great! :(

 

Thanks for this.

Link to comment
Share on other sites

I have already native speedstep with my MSi board but have to add _CST data to DSDT.

Will give this a go tonight.

 

Really glad to see this implemented to Chameleon.

Nice one mojodojo :)

 

D

Link to comment
Share on other sites

I've been hearing the buzz about this.. and have just downloaded the source. I'll build it tonight and test with it when I get home to my hack. But great job Mojodojo :(

Well after many trials I can't seem to get it to work.

 

I can have native power management when using either Cartri's modified Gigabyte BIOS, or standard Gigabyte BIOS with my DSDT patched with _PSS / _CST info. But not with this modded chameleon bootloader, using standard Gigabyte BIOS and DSDT without _PSS / _CST info.

 

AppleLPC loads by default on my board and doesn't need to be patched.

 

If I manually add patched SSDT tables to /Extra then I can see in VoodooMonitor my Multiplier changing and the CPU temps come down, but voltage doesn't change. But I am missing PerformanceStateArray from ioreg.

post-331032-1279696739_thumb.jpg

 

So am I right in saying the P-States and C-States aren't working automatically for me with this bootloader mod, but manually adding correct SSDT tables to /Extra enables C-States?

 

If it helps, I have attached the SSDT tables I am manually adding to get the C-states, as well as the SSDT tables extracted from the running system when just using the modded bootloader without the manually added SSDT tables.

SSDT_Tables_Added_to_Extra.zip

SSDT_Tables_from_system_with_bootloader.zip

Link to comment
Share on other sites

blackosx, the problem could be in your patched DSDT, if it has different CPU names from CPU0, CPU1 ... CPUn. The fix almost complete, need to back to home to finish it.

 

P.S. And you have already SSDTs with _CST, this is a problem. You need to DropSSDT or not to use GenerateCStates feature.

  • Like 1
Link to comment
Share on other sites

Thanks for the quick reply mozodojo.

blackosx, the problem could be in your patched DSDT, if it has different CPU names from CPU0, CPU1 ... CPUn. The fix almost complete, need to back to home to finish it.

I think that must be it!.. As thinking about it, I quickly removed the _PSS / _CST info last night from my patched DSDT and must have missed adding back the default CPU declarations.

 

I am at work now and will have a look at it again this evening and report back. I did play with the DropSSDT option last night and I'll remember to double check the setting again tonight.

 

Thanks for the help :(

Link to comment
Share on other sites

Hi mojodojo

 

Not having too much luck here either.

I have tried with original scope _pr, with and without CPU alias removed (actually no KP now with CPU alias, which is great!) and have tried both, with and without DropSSDT=Yes

 

Either way I get _cst evaluation errors again and significantly higher temps.

 

ApplePLC is loading.

 

EDIT: - Using iMac9,1 and Speedstep continues to work, but works naively anyway.

 

Thanks again for the hard work.

 

Rgds

D

Link to comment
Share on other sites

Hi mojodojo

 

Not having too much luck here either.

I have tried with original scope _pr, with and without CPU alias removed (actually no KP now with CPU alias, which is great!) and have tried both, with and without DropSSDT=Yes

 

Either way I get _cst evaluation errors again and significantly higher temps.

 

ApplePLC is loading.

same for me. cst error if I don't inject them

Link to comment
Share on other sites

Hi Mozodojo

 

Sorry to report but I still don't have success. If you get time, I have attached some files for you to look at to hopefully see what's going on. The files are:

 

• DSDT file I use for power management when using normal Chameleon

• DSDT file i am using when booting your modified Chameleon

• Extracted ACPI tables from my system booted with r346 using both DropSSDT and not.

• Extracted ACPI tables from my system booted with r350 using both DropSSDT and not.

• Screenshots of ioreg showing LPC and APCI SMC PlatformPlugin

• kernel log when booting from r350 without DropSST

 

If there's anything else I can supply then let me know.

Thanks

Blackosx_Feedback.zip

Link to comment
Share on other sites

I am not sure how the new Pstate/C-State generator works.

But the Adress of the Control Register is on some mainbaords 0x4xx and some 0x8xx (400,410,415, 416 like my EP35 vs 800,810,815,816). Maybe here is the problem ? (patched DSDT works, chameleon PStates gen not).

Link to comment
Share on other sites

Hi all!

 

thx mozodojo!

 

I compiled the rev351

 

my kernl.log

 

[size=1]Jul 22 01:23:02 localhost kernel[0]: npvhash=4095
Jul 22 01:23:02 localhost kernel[0]: Darwin Kernel Version 10.4.0: Fri Apr 23 18:27:12 PDT 2010; root:xnu-1504.7.4~1/RELEASE_X86_64
Jul 22 01:23:02 localhost kernel[0]: vm_page_bootstrap: 1474045 free pages and 98819 wired pages
Jul 22 01:23:02 localhost kernel[0]: kext submap [0xffffff7f80600000 - 0xffffff8000000000], kernel text [0xffffff8000200000 - 0xffffff8000600000]
Jul 22 01:23:02 localhost kernel[0]: standard timeslicing quantum is 10000 us
Jul 22 01:23:02 localhost kernel[0]: mig_table_max_displ = 73
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=1 LocalApicId=0 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=2 LocalApicId=2 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=3 LocalApicId=4 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=4 LocalApicId=6 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=5 LocalApicId=1 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=6 LocalApicId=3 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=7 LocalApicId=5 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=8 LocalApicId=7 Enabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=9 LocalApicId=136 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=10 LocalApicId=137 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=11 LocalApicId=138 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=12 LocalApicId=139 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=13 LocalApicId=140 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=14 LocalApicId=141 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=15 LocalApicId=142 Disabled
Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=16 LocalApicId=143 Disabled
Jul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for Quarantine
Jul 22 01:23:02 localhost kernel[0]: Security policy loaded: Quarantine policy (Quarantine)
Jul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for Sandbox
Jul 22 01:23:02 localhost kernel[0]: Security policy loaded: Seatbelt sandbox policy (Sandbox)
Jul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for TMSafetyNet
Jul 22 01:23:02 localhost kernel[0]: Security policy loaded: Safety net for Time Machine (TMSafetyNet)
Jul 22 01:23:02 localhost kernel[0]: Copyright © 1982, 1986, 1989, 1991, 1993
Jul 22 01:23:02 localhost kernel[0]: The Regents of the University of California. All rights reserved.
Jul 22 01:23:02 localhost kernel[0]: MAC Framework successfully initialized
Jul 22 01:23:02 localhost kernel[0]: using 16384 buffer headers and 4096 cluster IO buffer headers
Jul 22 01:23:02 localhost kernel[0]: IOAPIC: Version 0x20 Vectors 64:87IOAPIC: Version 0x20 Vectors 88:111
Jul 22 01:23:02 localhost kernel[0]: ACPI: System State [s0 S3 S4 S5] (S3)
Jul 22 01:23:02 localhost kernel[0]: RTC: Only single RAM bank (128 bytes)
Jul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagement: Turbo Ratios 1112
Jul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagement: initialization complete
Jul 22 01:23:02 localhost kernel[0]: mbinit: done (64 MB memory set for mbuf pool)
Jul 22 01:23:02 localhost kernel[0]: From path: "uuid", 
Jul 22 01:23:02 localhost kernel[0]: Waiting for boot volume with UUID 35ED5B00-AAA3-3059-AD87-F458E4B85284
Jul 22 01:23:02 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
Jul 22 01:23:02 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib kmod start
Jul 22 01:23:02 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib load succeeded
Jul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagementClient: ready
Jul 22 01:23:02 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SATA@1F,2/AppleAHCI/PRT0@0/IOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlockStorageDevice/IOBlockStorageDriver/ST3500412AS Media/IOGUIDPartitionScheme/Buono@2
Jul 22 01:23:02 localhost kernel[0]: BSD root: disk0s2, major 14, minor 2
Jul 22 01:23:02 localhost kernel[0]: FireWire (OHCI) VendorID 1106 ID 3044 built-in now active, GUID fedcba9876543210; max speed s400.
Jul 22 01:23:02 localhost kernel[0]: Kernel is LP64
Jul 22 01:23:02 localhost kernel[0]: Bluetooth: Adaptive Frequency Hopping is not supported.
Jul 22 01:23:05 localhost kernel[0]: NVDANV50HAL loaded and registered.
Jul 22 01:23:11 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8056 Singleport Copper  SA
Jul 22 01:23:11 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8056 Singleport Copper  SA
Jul 22 01:23:11 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RX_MAX_LE 1024, TX_MAX_LE 768, ST_MAX_LE 3328
Jul 22 01:23:15 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RX_MAX_LE 1024, TX_MAX_LE 768, ST_MAX_LE 3328
Jul 22 01:23:14 localhost kernel[0]: Waiting for DSMOS...
Jul 22 01:23:14 localhost kernel[0]: systemShutdown false
Jul 22 01:23:15 localhost kernel[0]: FakeSMC: Opensource SMC device emulator by netkas © 2009
Jul 22 01:23:15 localhost kernel[0]: FakeSMC: Monitoring plugins support by mozodojo © 2010
Jul 22 01:23:15 localhost kernel[0]: FakeSMC: Original idea of plugins and code sample by usr-sse2 © 2010
Jul 22 01:23:15 Fabios-Mac-Pro kernel[0]: Previous Shutdown Cause: 0
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU family 0x6, model 0x1a, stepping 0x4
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: Found 4 cores 8 threads
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#0 Tjmax 100
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#1 Tjmax 100
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#2 Tjmax 100
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#3 Tjmax 100
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: DSMOS has arrived
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: PTKawainVi: started
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: Vendor ID: 10de, Device ID: 19d
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: Architecture: 20000
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: G80 [Quadro FX 5600]
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: yukon: Ethernet address 00:xx:xx:xx:xx:xx
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: yukon: Ethernet address 00:xx:xx:xx:xx:xx
Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: RT2573USBWirelessDriver: Ethernet address 00:xx:xx:xx:xx:xx
Jul 22 01:23:25 Fabios-Mac-Pro kernel[0]: AppleTyMCEDriver::start coreVIDPID = 0xffffffff Number of packages = 1 Number of cpus = 8 memory monitor trough MCA[/size]

 

My CPU section & LPCB in DSDT

After rename the CPU1, CPU2, CPUn ecc to P001,P002,P00n the error relate to _CST is gone :D

Jul 22 01:07:33 Fabios-Mac-Pro kernel[0]: ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed

:D

[size=1]
   Scope (_PR)
   {
       Processor (P001, 0x01, 0x00000810, 0x06) {}
       Processor (P002, 0x02, 0x00000810, 0x06) {}
       Processor (P003, 0x03, 0x00000810, 0x06) {}
       Processor (P004, 0x04, 0x00000810, 0x06) {}
       Processor (P005, 0x05, 0x00000810, 0x06) {}
       Processor (P006, 0x06, 0x00000810, 0x06) {}
       Processor (P007, 0x07, 0x00000810, 0x06) {}
       Processor (P008, 0x08, 0x00000810, 0x06) {}
   }
//-----*****-----//

           Device (LPCB)
           {
               Name (_ADR, 0x001F0000)
               Method (_DSM, 4, NotSerialized)
               {
                   Return (MCID (Arg2, 0x[b]3A18[/b]8086))
               }
...

[/size]

 

Fabio

Link to comment
Share on other sites

Hi mozodojo!

 

Grats for your nice changes! :) Just merged back your rev 351 changes to our trunk.

 

Many thanks!

 

Bye,

zef

 

Hi zef. Thank you! Merged back your changes too :)

Link to comment
Share on other sites

Great Work mojodo !

 

Thanks especially for fixing the system profiler problem happening on few systems, I couldn't figure that alphas-digits-only-char-allowed problem :)

 

We could improve the memory detection speed as well, by reading only the headers instead of a full spd page and finally read it only when a slot is not empty.

 

I wanted to improve that myself after my first mem detect impl., but found a (great) new job sucking all my development time & energy right now :)

 

Keep on the good work !

 

-Rek

 

If you experienced a problem patching your DSDT/SSDT to enable Mac OS X native power management, or you don't know how to do this - the new bootloader is for you! Should work on most modern systems/processors.

 

Bootloader based on latest Chameleon RC5 rev184. Mem detection is enabled and slightly modified: fixed system profiler returns error while reading memory info in some cases. P-States & C-States are exported to the system via additional SSDTs, so if you have native SSDTs with _CST methods you should use "DropSSDT" = "Yes" option in boot.plist. If you have modded DSDT with _CST methods you should remove them or it'll be kernel panic on system start. The bootloader also supports multiple SSDT loading (names should be SSDT.aml, SSDT-1.aml ... SSDT-29.aml). Bootloader also supports latest graphic cards (code was obtained from here)

 

To enable native power management you should use proper mac model + HPET enabled. To enable C-States you must have LPC working on your system. It could be enabled via DSDT mod or injector.

 

Sources available here. The name of the project is Chameleon-Mozodojo.

 

P-States generation algo based on original superhai's algo from VoodooPower project.

Link to comment
Share on other sites

sorry for my silly question....how can i compile it? i'm a newbie and i want to try since i want to get ride of cpuinjector kext to get my cpu recognized....is there any tutorial or some one good pal can tell me how to do it? my cpu it's a core 2 duo e7600 same on imac 10,1 bot no one loader recognize it...it's always unknown on about this mac and no info on system profiler....but with my old cpu e4700 was detected proper....can some one give me a hand?

Thanks a lot!

Link to comment
Share on other sites

Install XCode from your OS X install DVD. Open Chameleon.xcodeproj in the 'Chameleon/Chameleon-Mozodojo' folder. Go to Build in the main menu, and build it. Right-click the sym/i386 folder on the left pane and choose 'Reveal With Finder'. Copy the 'boot' file to the root of your main drive.

 

Reboot.

Link to comment
Share on other sites

 Share

×
×
  • Create New...