x86_msr x86_reg_access
API Reference Manual  /  4 Model-to-Model Interfaces  / 

x86_pkg_cstate

Description
The methods in this interface can be used to read or change the current power state the CPU is in. A state value of 0 corresponds to C0, a value of 1 corresponds to C1, etc. HLT will be reported as state 1, substate 0. MWAIT will reported based upon the eax hint, decoded as state = (eax[7:4] + 1) mod 16, substate = eax[3:0].

pkg_cstate_update will perform side-effects such as putting the processor to sleep or waking it up, and call the cstate notification listeners.

SIM_INTERFACE(x86_pkg_cstate) {
        x86_cstate_t (*get_pkg_cstate)(conf_object_t *cpu_obj);
        void (*set_pkg_cstate)(conf_object_t *cpu_obj,
                           uint32 state, uint32 sub_state);
        void (*pkg_cstate_update)(conf_object_t *cpu_obj,
                           bool notify);
};

#define X86_PKG_CSTATE_INTERFACE "x86_pkg_cstate"

Execution Context
Cell Context for all methods.

x86_msr x86_reg_access