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

Hey Mitch_de,

did you ever got to try the NVCAP key on the booter?

 

Edit: link to Asere's booter topic; check "Update Version 1.1.9" on first post.

 

Hi, thanks for the info about that nvcap overwrite key. I didnt tried that already. But perhaps that code isnt (isnt planned) in our chameleon builds.

 

Here the info of the link in one "view":

Bildschirmfoto_2010_09_19_um_09.51.51.jpg

 

I simple patched my boot file by hexedit with the values from NVCAPMaker.

Whats interesting is:

Most changes (to the orig. static/fixed values of chameleon ) can be seen in IORegistry but not all.

Ioregistry explorer shows taht, whats OS X at the end (after driver / system is up) has in use.

I made an screenshoot of orig. cameleon NVCAP and after that with mine (hexedited).

Orig. chameleon: 04 00 00 00 00 00 0d 00 00 00 00 00 00 00 00 0a 00 00 00 00

Bildschirmfoto_2010_09_18_um_09.40.30.jpg

You see all injected as fixed coded in chameleon beside one byte which is shown 1c (hard coded 00 in orig. chameleon)

 

patched NVCAP = 04 00 00 00 00 00 03 00 0c 00 00 00 00 00 00 07 00 00 00 00

Bildschirmfoto_2010_09_18_um_09.43.41.jpg

The 0c (of orig.) shown in IOregistry in both cases as 1c (00 coded in orig. / 0c coded in patched) was changed by OS X : 00 > 1c or 0c (patched) > 1c

0d + 0a bytes (in orig.) was changed as in hexedit to 03 and 07 and stays changed in iOregistry view.

 

conclusion: Both (also orig. hard coded chameleon NVCAP) worked for me (near, only sleep often gets blue screen after wake).

I believe that the NVCAP IOregistry key is not real static ( i mean its read/write): OS X needs some correct basis information of NVCAP to work at early boottime but may change some details after boot is compledted by its drivers to that value. Maybe like Monitor prefpane which detects monitor, other NV driver parts.

Link to comment
Share on other sites

I believe that the NVCAP IOregistry key is not real static ( i mean its read/write): OS X needs some correct basis information of NVCAP to work at early boottime but may change some details after boot is compledted by its drivers to that value. Maybe like Monitor prefpane which detects monitor, other NV driver parts.

 

Chameleon's NVCAP isn't static and changing at a boot time by the boot loader.

Link to comment
Share on other sites

Chameleon's NVCAP isn't static and changing at a boot time by the boot loader.

Yep. chameleon injects an fixed NVCAP at boottime - but at least one byte got changed somehow at running time of OS X - look at my screenshoots of IORegistry Explorer.

Not all values (of the 20 hex bytes) shown in IORreg are 100% of chameleon bootloaded injects it. Some bytes got changed after the booting by OS X (some drivers i believe).

Link to comment
Share on other sites

Hi, thanks for the info about that nvcap overwrite key. I didnt tried that already. But perhaps that code isnt (isnt planned) in our chameleon builds.

Mitch, this NVCAP key is on the trunk long time ago, look here.

I just don't have a nVidia to test it so, i can't give more info.

Link to comment
Share on other sites

Yep. chameleon injects an fixed NVCAP at boottime - but at least one byte got changed somehow at running time of OS X - look at my screenshoots of IORegistry Explorer.

Not all values (of the 20 hex bytes) shown in IORreg are 100% of chameleon bootloaded injects it. Some bytes got changed after the booting by OS X (some drivers i believe).

 

2 bytes changing by chameleon, if you don't trust me (from nvidia.c):

 

	default_NVCAP[6] = channel1;
default_NVCAP[8] = channel2;

Link to comment
Share on other sites

Thanks !

I looked only fast over the chameleon source and found only the fixed config

static uint8_t default_NVCAP[]= {

0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00,

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,

0x00, 0x00, 0x00, 0x00

};

So later (i not seen at fist look) does chameleon work with that initial code and overwrites 6 + 8 (index from 0) first with zeros then computes the values.

Thanks for clearing that "magic" of changing an (my meaning before your hint to that code of array 6,8 changes) :(

HINT: Because the NVCAP compute routine for 6+8 bytes sets them to zero , then computes it may be more logical to set also byte 6+ 8 (0x0d + 0x00) to 0x00 in the static init code ?

Link to comment
Share on other sites

Hi guys and thank you for this excellent work.

 

I'm using Chameleon 2.0 RC5 r518 in my hack, with P-states and C-states enbled in com.apple.Boot, and evrything seems to be all right except for the temperature of my E8400 : it stacks at 53-54 degrees Celsius ?

 

In Extra/Extension I have only fakesmc.kext, JMicronATA.kext and LegacyHDA.kext and I use DSDT.aml fixes for my GA-EP35-DS3 (no P-States or C-States fix)

 

Thank you

Link to comment
Share on other sites

Hi guys and thank you for this excellent work.

 

I'm using Chameleon 2.0 RC5 r518 in my hack, with P-states and C-states enbled in com.apple.Boot, and evrything seems to be all right except for the temperature of my E8400 : it stacks at 53-54 degrees Celsius ?

 

In Extra/Extension I have only fakesmc.kext, JMicronATA.kext and LegacyHDA.kext and I use DSDT.aml fixes for my GA-EP35-DS3 (no P-States or C-States fix)

 

Thank you

This is also case for me. CPU (P8400) works hotter and also there is almost a constant fan noise.

 

Now, I've overridden my SSDT tables and get them loaded from Extra folder. Alongside a Legacy ACPI_SMC_PlatformPlugin, I have P-tates and C-States (don't know how many of them though). At least, it works cooler and fan is more stable.

 

By the way, is there a relatively stable version of this branch of Chameleon.

Which build do you suggest?

Link to comment
Share on other sites

Thank you man, I'm feeling less alone.

How did you do it because I do not know much about SSdT tables

greatings

 

Here is the main guide that I used. There are things that I couldn't figure out yet.

Also, I believe that you could post this topic as it is also a feature of this branch of Chameleon so it shouldn't be off topic.

Link to comment
Share on other sites

Would it be possible to include something like this:

if (cpuid_features() & CPUID_FEATURE_APIC)
verbose("Local APIC discovered and enabled\n");

This to help inform us poor (HP) notebook users what is going on? Thanks.

 

Next step would be to include some lines (inspired by lapic.c) to start the local apic, since this is what is bothering me (HP BIOS doesn't do its job).

 

Edit: I presume that this might be added to struct CPU in platform.h and I found out that CPUID_FEATURE_APIC is basically:

#define	CPUID_FEATURE_APIC	(1ULL << 9)

But I'm still stuck on the call to: cpuid_features()

 

Edit 2: Ok. I think I need do_cpuid(0, cpid); and then do the logical AND on either cpid[2] or cpid[3] but I don't know which one to use. Confused on this hi-low byte-word thing. CPUID_FEATURE_APIC is bit two on cpid[3]? Anyone?

 

Edit 3: Right. I found a boot-log, in IORegistryExplorer, and bit 9 is set (CPU: Features: 0x000002ff) and thus this all is moot. Too bad that non of the lurkers here clued me in.

Link to comment
Share on other sites

Memory detection is enabled by default in the modules revisions as well.

The memory detection code by Mozodojo and others is different from Asere's in that it only detects the default speed, not what it's been changed to by adjusting the memory multiplier aor base clock in BIOS.

Asere didn't post his source code, so we don't know for certain how he detected actual speed.

 

Didn't post the code?

 

I thought that was here:

http://github.com/aserebln/Chameleon

 

Maybe I'm wrong, but if I am not wrong, maybe you can fix all the problems with the mem detection... because doesn't work yet.

 

And should be great to add the ATI HD 5870 support as well to run this cards OTB.

 

Cheers.

Link to comment
Share on other sites

Dang. This beast keeps rebooting here.

 

What are the minimal com.apple.Boot.plist requirements for this? What options do I need? What folders / files do I have to have?

 

Please note that I don't want a theme, logo or anything. In fact I don't have much space left for it on my boot partition. I have only one HDD in my notebook. Please advise.

 

Edit: This is what I have right now (in: /Volumes/KICKSTART/Library/Preferences/SystemConfiguration/com.apple.Boot.plist) for Revolution 6.24, which boots fine here:

 

	<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>arch=i386 -s -v cpus=1 busratio=17 boot-id=uuid boot-uuid=...</string>
<key>Quiet Boot</key>
<string>No</string>
<key>SMBIOSDefaults</key>
<string>yes</string>
<key>SystemID</key>
<string>...</string>
<key>Instant Menu</key>
<string>No</string>
<key>Graphics Mode</key>
<string>1024x768x32</string>
<key>GraphicsEnabler</key>
<string>No</string>
<key>Legacy Logo</key>
<string>yes</string>
<key>Boot Banner</key>
<string>no</string>

p.s. I've already add some extras, which are not used in Revolution but whatever. Still no go.

 

My /DSDT.aml is fine and I have /Extra/Extensions/Extensions.mkext so that can't be it. What's next?

 

TIA,

 

Sam.

Link to comment
Share on other sites

Doesn't Extensions.mkext belong in the /Extra folder rather than the /Extra/Extensions one?

 

 

"My /DSDT.aml is fine and I have /Extra/Extensions/Extensions.mkext so that can't be it. What's next?"

Silly typo. My bad.

 

Thanks.

 

Edit: This is what I use to create it:

sudo kextcache -v 1 -t -l -mkext2 /Volumes/KICKSTART/Extra/Extensions.mkext /Volumes/KICKSTART/Extra/Extensions/

Edit 2: No more reboots. Sweet.

Link to comment
Share on other sites

Didn't post the code?

 

I thought that was here:

http://github.com/aserebln/Chameleon

 

Maybe I'm wrong, but if I am not wrong, maybe you can fix all the problems with the mem detection... because doesn't work yet.

 

And should be great to add the ATI HD 5870 support as well to run this cards OTB.

 

Cheers.

Doesn't work how; no speed, default speed, incorrect speed, etc.?

Have you filed a bug report at http://forge.voodooprojects.org/p/chameleon/?

 

According to rekursor the AsereBLN memory detection code hasn't been posted;

http://www.efixusers.com/showpost.php?p=70...p;postcount=211

 

Assuming it has been posted since, now you can fix C2RC5 yourself.

Link to comment
Share on other sites

Mem detection works on my HP G72, but Chameleon did select iMac11,1 as model identifier, which is wrong because there is no iMac with this CPU type.:

Memory Slots:

 ECC:	Disabled

BANK 0/DIMM0:

 Size:	2 GB
 Type:	DDR3
 Speed:	1333 MHz
 Status:	OK
 Manufacturer:	Ramaxel Technology
 Part Number:	RMT1970ED48E8F1333A
 Serial Number:	XXXXXXXX

BANK 2/DIMM1:

 Size:	2 GB
 Type:	DDR3
 Speed:	1333 MHz
 Status:	OK
 Manufacturer:	Ramaxel Technology
 Part Number:	RMT1970ED48E8F1333A
 Serial Number:	XXXXXXXX

But 'About This Mac' shows "Unknown" instead of "Intel i3-350m" (or whatever it should be). Can this be fixed, cleanly, somehow? I'm aware of the dirty hack, but that's not what I am looking for. I want the booter to recognize my CPU.

 

p.s. I have 10.6.4 with all the latest updates installed.

 

Edit: The CPU is detected as 0x0901. Well. That's what I see in IORegistryExplorer as cpu-type.

Link to comment
Share on other sites

In r518, there is small problem with the custom theme. I am using a custom theme designed for full hd resolution. With this version of Chameleon, the timeout screen and the actual Chameleon screen appears to be overlapped. In the timeout screen, I see my Chameleon screen as well.

 

I tried this branch of Chameleon before and this is the first time I witnessed such a problem.

Link to comment
Share on other sites

Doesn't work how; no speed, default speed, incorrect speed, etc.?

Have you filed a bug report at http://forge.voodooprojects.org/p/chameleon/?

 

According to rekursor the AsereBLN memory detection code hasn't been posted;

http://www.efixusers.com/showpost.php?p=70...p;postcount=211

 

Assuming it has been posted since, now you can fix C2RC5 yourself.

 

Doesn't work memory speed detection, shows 1066 instead 1333 (or 1328 as shows the post screen, and AsereBLN 1.1.9 as well).

I don't know how to do the bug report, as I am not chameleon coder.

As I said, I didn't know if AsereBLN posted or not the mem detection, but the page that I refer is different than chameleon web page. So maybe is there, maybe not...

Sorry if I am bothering someone, maybe my english is not very good and there is a misunderstanding.

 

Cheers.

Link to comment
Share on other sites

Doesn't work memory speed detection, shows 1066 instead 1333 (or 1328 as shows the post screen, and AsereBLN 1.1.9 as well).

I don't know how to do the bug report, as I am not chameleon coder.

As I said, I didn't know if AsereBLN posted or not the mem detection, but the page that I refer is different than chameleon web page. So maybe is there, maybe not...

Sorry if I am bothering someone, maybe my english is not very good and there is a misunderstanding.

 

Cheers.

 

No he hasn't posted his mem detection code.

Link to comment
Share on other sites

Doesn't work memory speed detection, shows 1066 instead 1333 (or 1328 as shows the post screen, and AsereBLN 1.1.9 as well).

I don't know how to do the bug report, as I am not chameleon coder.

As I said, I didn't know if AsereBLN posted or not the mem detection, but the page that I refer is different than chameleon web page. So maybe is there, maybe not...

Sorry if I am bothering someone, maybe my english is not very good and there is a misunderstanding.

 

Cheers.

So you can't fix it yourself, and neither can I for you, but you may want to add the missing bits. Fill in the blanks by starting with the module manufacturer and type. How else can the developers help you? I wouldn't know how. Also. Is the rest of the RAM info displayed correctly?

 

p.s. Have a look at this include file. Do you see the manufacturer of your modules in this list? If yes, that would be a good start.

 

Edit: My HP Notebook display won't work without using MacBookPro6,1 and thus I had to grab the data from a real one. Here's the CPU info of it: Intel® Core i5 CPU M 540 @ 2.53GHz

 

And here's the data I use now:

The 'cpu_type' should be 0x602 (for this specific CPU).

// defaults for a MacBook Pro
static const SMStrEntryPair const sm_macbookpro_defaults[] = {
   {"SMbiosvendor",    "Apple Inc."            },
   {"SMbiosversion",    "MBP61.88Z.0057.B05.1003191134"    },
   {"SMbiosdate",        "03/19/10"            },
   {"SMmanufacter",    "Apple Inc."            },
   {"SMproductname",    "MacBookPro6,1"            },
   {"SMsystemversion",    "1.0"                },
   {"SMserial",        "SOMESRLNMBR"            },
   {"SMfamily",        "MacBookPro"            },
   {"SMboardmanufacter",    "Apple Inc."            },
   {"SMboardproduct",    "Mac-F22589C8"            },
   { "",""    }
};

Just in case anyone else wants it.

Link to comment
Share on other sites

How did you get your cpu-type 0x602 to be recognized?

 

My laptop core i7 keeps getting recognized as a desktop core i7, so I keep getting iMac11,1 core i3/i5/i7 instead of a MacbookPro.

 

Looks like the code for MacBookPro core i5/i7 processors still has not been included in smbios_patcher.c of Chameleon v2 RC5 as of revision 517.

Link to comment
Share on other sites

My laptop core i7 keeps getting recognized as a desktop core i7

Try using the system-type=2 override (EDIT: see post by Azimuth below!)

"system-type is now supported. Default is 1 (Desktop). Use system-type=2 in com.apple.Boot.plist if you have laptop."

From here:

http://www.efixusers.com/showthread.php?t=644

Which comes from here:

http://blog.tdev.me/2009/11/chameleon-2-rc...intel-atom.html

Which in turn comes from SMBIOSResolver and other now obsolete stuff..

Link to comment
Share on other sites

 Share

×
×
  • Create New...