cpu/intel/{haswell,model_206{5,a}x}: Use MSR_CORE_THREAD_COUNT for msr at 0x35

Regarding 64 and IA-32 Architectures Software Developer’s Manual, the register
name of the msr at 0x35 is MSR_CORE_THREAD_COUNT.

Change-Id: I5134619dc3a42187ddd5f46c85873c4278229e27
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33015
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Elyes HAOUAS 2019-05-26 13:25:30 +02:00 committed by Patrick Georgi
parent 3286848a7a
commit a6a396ddb6
6 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@
/* Haswell bus clock is fixed at 100MHz */ /* Haswell bus clock is fixed at 100MHz */
#define HASWELL_BCLK 100 #define HASWELL_BCLK 100
#define CORE_THREAD_COUNT_MSR 0x35 #define MSR_CORE_THREAD_COUNT 0x35
#define MSR_FEATURE_CONFIG 0x13c #define MSR_FEATURE_CONFIG 0x13c
#define MSR_FLEX_RATIO 0x194 #define MSR_FLEX_RATIO 0x194
#define FLEX_RATIO_LOCK (1 << 20) #define FLEX_RATIO_LOCK (1 << 20)

View File

@ -732,7 +732,7 @@ static int get_cpu_count(void)
int num_threads; int num_threads;
int num_cores; int num_cores;
msr = rdmsr(CORE_THREAD_COUNT_MSR); msr = rdmsr(MSR_CORE_THREAD_COUNT);
num_threads = (msr.lo >> 0) & 0xffff; num_threads = (msr.lo >> 0) & 0xffff;
num_cores = (msr.lo >> 16) & 0xffff; num_cores = (msr.lo >> 16) & 0xffff;
printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n", printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n",

View File

@ -20,7 +20,7 @@
/* Nehalem bus clock is fixed at 133MHz */ /* Nehalem bus clock is fixed at 133MHz */
#define NEHALEM_BCLK 133 #define NEHALEM_BCLK 133
#define CORE_THREAD_COUNT_MSR 0x35 #define MSR_CORE_THREAD_COUNT 0x35
#define MSR_FEATURE_CONFIG 0x13c #define MSR_FEATURE_CONFIG 0x13c
#define MSR_FLEX_RATIO 0x194 #define MSR_FLEX_RATIO 0x194
#define FLEX_RATIO_LOCK (1 << 20) #define FLEX_RATIO_LOCK (1 << 20)

View File

@ -287,7 +287,7 @@ static int get_cpu_count(void)
int num_threads; int num_threads;
int num_cores; int num_cores;
msr = rdmsr(CORE_THREAD_COUNT_MSR); msr = rdmsr(MSR_CORE_THREAD_COUNT);
num_threads = (msr.lo >> 0) & 0xffff; num_threads = (msr.lo >> 0) & 0xffff;
num_cores = (msr.lo >> 16) & 0xffff; num_cores = (msr.lo >> 16) & 0xffff;
printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n", printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n",

View File

@ -22,7 +22,7 @@
/* SandyBridge/IvyBridge bus clock is fixed at 100MHz */ /* SandyBridge/IvyBridge bus clock is fixed at 100MHz */
#define SANDYBRIDGE_BCLK 100 #define SANDYBRIDGE_BCLK 100
#define CORE_THREAD_COUNT_MSR 0x35 #define MSR_CORE_THREAD_COUNT 0x35
#define MSR_FEATURE_CONFIG 0x13c #define MSR_FEATURE_CONFIG 0x13c
#define MSR_FLEX_RATIO 0x194 #define MSR_FLEX_RATIO 0x194
#define FLEX_RATIO_LOCK (1 << 20) #define FLEX_RATIO_LOCK (1 << 20)

View File

@ -513,7 +513,7 @@ static int get_cpu_count(void)
int num_threads; int num_threads;
int num_cores; int num_cores;
msr = rdmsr(CORE_THREAD_COUNT_MSR); msr = rdmsr(MSR_CORE_THREAD_COUNT);
num_threads = (msr.lo >> 0) & 0xffff; num_threads = (msr.lo >> 0) & 0xffff;
num_cores = (msr.lo >> 16) & 0xffff; num_cores = (msr.lo >> 16) & 0xffff;
printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n", printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n",