cpu/amd: Use common AMD's MSR
Phase 1. Due to the size of the effort, this CL is broken into several phases. Change-Id: I0236e0960cd1e79558ea50c814e1de2830aa0550 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/29065 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
This commit is contained in:
committed by
Patrick Georgi
parent
e64a585374
commit
400ce55566
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <cpu/x86/tsc.h>
|
||||
#include <delay.h>
|
||||
#include <stdint.h>
|
||||
@ -36,11 +37,11 @@ void udelay(uint32_t us)
|
||||
tsc_start = rdtscll();
|
||||
|
||||
/* Get the P-state. This determines which MSR to read */
|
||||
msr = rdmsr(0xc0010063);
|
||||
msr = rdmsr(PS_STS_REG);
|
||||
pstate_idx = msr.lo & 0x07;
|
||||
|
||||
/* Get FID and VID for current P-State */
|
||||
msr = rdmsr(0xc0010064 + pstate_idx);
|
||||
msr = rdmsr(PSTATE_0_MSR + pstate_idx);
|
||||
|
||||
/* Extract the FID and VID values */
|
||||
fid = msr.lo & 0x3f;
|
||||
|
Reference in New Issue
Block a user