src: Move common IA-32 MSRs to <cpu/x86/msr.h>
Use "cpu/x86/msr.h" for common IA-32 MSRs and correct IA-32 MSRs names. Change-Id: Ida7f2d608c55796abf9452f190a58802e498302d Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28752 Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Martin Roth
parent
603963e1ba
commit
419bfbc1f1
@@ -20,26 +20,13 @@
|
||||
/* Nehalem bus clock is fixed at 133MHz */
|
||||
#define NEHALEM_BCLK 133
|
||||
|
||||
#define IA32_FEATURE_CONTROL 0x3a
|
||||
#define CPUID_VMX (1 << 5)
|
||||
#define CPUID_SMX (1 << 6)
|
||||
#define MSR_FEATURE_CONFIG 0x13c
|
||||
#define MSR_FLEX_RATIO 0x194
|
||||
#define FLEX_RATIO_LOCK (1 << 20)
|
||||
#define FLEX_RATIO_EN (1 << 16)
|
||||
#define IA32_PLATFORM_DCA_CAP 0x1f8
|
||||
#define IA32_MISC_ENABLE 0x1a0
|
||||
#define MSR_TEMPERATURE_TARGET 0x1a2
|
||||
#define IA32_FERR_CAPABILITY 0x1f1
|
||||
#define FERR_ENABLE (1 << 0)
|
||||
#define IA32_PERF_CTL 0x199
|
||||
#define IA32_THERM_INTERRUPT 0x19b
|
||||
#define IA32_ENERGY_PERFORMANCE_BIAS 0x1b0
|
||||
#define ENERGY_POLICY_PERFORMANCE 0
|
||||
#define ENERGY_POLICY_NORMAL 6
|
||||
#define ENERGY_POLICY_POWERSAVE 15
|
||||
#define IA32_PACKAGE_THERM_INTERRUPT 0x1b2
|
||||
#define IA32_MC0_STATUS 0x401
|
||||
|
||||
#define MSR_PIC_MSG_CONTROL 0x2e
|
||||
#define MSR_PLATFORM_INFO 0xce
|
||||
|
@@ -231,10 +231,10 @@ static void set_energy_perf_bias(u8 policy)
|
||||
msr_t msr;
|
||||
|
||||
/* Energy Policy is bits 3:0 */
|
||||
msr = rdmsr(IA32_ENERGY_PERFORMANCE_BIAS);
|
||||
msr = rdmsr(IA32_ENERGY_PERF_BIAS);
|
||||
msr.lo &= ~0xf;
|
||||
msr.lo |= policy & 0xf;
|
||||
wrmsr(IA32_ENERGY_PERFORMANCE_BIAS, msr);
|
||||
wrmsr(IA32_ENERGY_PERF_BIAS, msr);
|
||||
|
||||
printk(BIOS_DEBUG, "model_x06ax: energy policy set to %u\n",
|
||||
policy);
|
||||
|
Reference in New Issue
Block a user