intel: Replace msr(0x198) with msr(IA32_PERF_STATUS)
Change-Id: I22241427d1405de2e2eb2b3cfb029f3ce2c8dace Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/22585 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
3df9dbe886
commit
242ea84b01
7 changed files with 9 additions and 9 deletions
|
@ -86,7 +86,7 @@ static void configure_misc(void)
|
|||
wrmsr(IA32_MISC_ENABLE, msr);
|
||||
|
||||
// set maximum CPU speed
|
||||
msr = rdmsr(IA32_PERF_STS);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
int busratio_max = (msr.hi >> (40-32)) & 0x1f;
|
||||
|
||||
msr = rdmsr(IA32_PLATFORM_ID);
|
||||
|
|
|
@ -94,7 +94,7 @@ static void configure_misc(void)
|
|||
wrmsr(IA32_MISC_ENABLE, msr);
|
||||
|
||||
// set maximum CPU speed
|
||||
msr = rdmsr(IA32_PERF_STS);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
int busratio_max = (msr.hi >> (40-32)) & 0x1f;
|
||||
|
||||
msr = rdmsr(IA32_PLATFORM_ID);
|
||||
|
|
|
@ -55,15 +55,15 @@ static void speedstep_get_limits(sst_params_t *const params)
|
|||
|
||||
/* Read normal maximum parameters. */
|
||||
/* Newer CPUs provide the normal maximum settings in
|
||||
IA32_PLATFORM_ID. The values in IA32_PERF_STS change
|
||||
IA32_PLATFORM_ID. The values in IA32_PERF_STATUS change
|
||||
when using turbo mode. */
|
||||
msr = rdmsr(IA32_PLATFORM_ID);
|
||||
params->max = SPEEDSTEP_STATE_FROM_MSR(msr.lo, state_mask);
|
||||
if (cpu_id == 0x006e) {
|
||||
/* Looks like Yonah CPUs don't have the frequency ratio in
|
||||
IA32_PLATFORM_ID. Use IA32_PERF_STS instead, the reading
|
||||
IA32_PLATFORM_ID. Use IA32_PERF_STATUS instead, the reading
|
||||
should be reliable as those CPUs don't have turbo mode. */
|
||||
msr = rdmsr(IA32_PERF_STS);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
params->max.ratio = (msr.hi & SPEEDSTEP_RATIO_VALUE_MASK)
|
||||
>> SPEEDSTEP_RATIO_SHIFT;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
/* Speedstep related MSRs */
|
||||
#define IA32_PLATFORM_ID 0x017
|
||||
#define IA32_PERF_STS 0x198
|
||||
#define IA32_PERF_STATUS 0x198
|
||||
#define IA32_PERF_CTL 0x199
|
||||
#define MSR_THERM2_CTL 0x19D
|
||||
#define IA32_MISC_ENABLES 0x1A0
|
||||
|
|
|
@ -171,7 +171,7 @@ void mainboard_romstage_entry(unsigned long bist)
|
|||
* bits 47:32, where BUS_RATIO_MAX and VID_MAX
|
||||
* are encoded
|
||||
*/
|
||||
msr = rdmsr(IA32_PERF_STS);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
perf = msr.hi & 0x0000ffff;
|
||||
|
||||
/* Write VID_MAX & BUS_RATIO_MAX to
|
||||
|
|
|
@ -100,7 +100,7 @@ void mainboard_romstage_entry(unsigned long bist)
|
|||
|
||||
/* Set CPU frequency/voltage to maximum */
|
||||
/* FIXME: move to Pentium M init code */
|
||||
msr = rdmsr(0x198);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
perf = msr.hi & 0xffff;
|
||||
msr = rdmsr(0x199);
|
||||
msr.lo &= 0xffff0000;
|
||||
|
|
|
@ -56,7 +56,7 @@ void udelay(u32 us)
|
|||
break;
|
||||
}
|
||||
|
||||
msr = rdmsr(0x198);
|
||||
msr = rdmsr(IA32_PERF_STATUS);
|
||||
divisor = (msr.hi >> 8) & 0x1f;
|
||||
|
||||
d = (fsb * divisor) / 4; /* CPU clock is always a quarter. */
|
||||
|
|
Loading…
Reference in a new issue