Core 2 Duo: Move to/from C4 state

Core 2 Duo: Move to/from C4 state


Not sure this is the right forum so please bare with me.

I want to put Core2Duo into C4 state under vxWorks 6.8

So I ran the following code:

mov EAX, 0x30 (Bits 0-3 define C4 sub state. What sub state shoud I use ?)
mov ECX, 0x0 (Should I use 0x1 ?)

But it seems nothing happens.
This is probably because the system clock is running every 1ms and the CPU is put back to C0.
I did not get any exception upon running the code.

When I ran cpuid with EAX=5 I got:

ECX=3 :
Bit 00: Enumeration of Monitor-Mwait extensions (beyond EAX and EBX registers) supported
Bit 01: Supports treating interrupts as break-event for MWAIT, even when interrupts disabled

Bits 03 - 00: Number of C0 sub C-states supported using MWAIT
Bits 07 - 04: Number of C1 sub C-states supported using MWAIT
Bits 11 - 08: Number of C2 sub C-states supported using MWAIT
Bits 15 - 12: Number of C3 sub C-states supported using MWAIT
Bits 19 - 16: Number of C4 sub C-states supported using MWAIT

1. How can I configure the CPU to go back to C0 upon an APIC timer interrupt and not any other interrupt ?

2. Where can I find documentation on C4 sub states ?

3. How can I move the CPU into DC4 (Deep C4) ?

4. How can I know if my CPU supports DC4 ?

5. Can I use an ICE to see what is the current state and sub state of the CPU ? How ?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Well, the first thing you may want to consider is to stop writing in ASM and start in C/C++. It's much, much easier. You can still use assembly in your'll just be much more productive if you reserve it for certain algorithms. If that is already the case, perhaps a little more code would help others help you more than I could. Just my two cents. Best wishes.


Leave a Comment

Please sign in to add a comment. Not a member? Join today