[PATCH 1/2] cpu: msr: Add Ivybridge and Haswell MSRs (LP: #1254066)
Colin Ian King
colin.king at canonical.com
Mon Dec 9 09:16:23 UTC 2013
On 09/12/13 02:19, IvanHu wrote:
> On 11/22/2013 10:57 PM, Colin King wrote:
>> From: Colin Ian King <colin.king at canonical.com>
>>
>> Re-organise per microarchitecture/CPU lookup and add Ivybridge
>> and Haswell MSRs
>>
>> Signed-off-by: Colin Ian King <colin.king at canonical.com>
>> ---
>> src/cpu/msr/msr.c | 273
>> ++++++++++++++++++++++++++++++++++++++++++++++++------
>> 1 file changed, 247 insertions(+), 26 deletions(-)
>>
>> diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c
>> index c4d3e2f..3358f12 100644
>> --- a/src/cpu/msr/msr.c
>> +++ b/src/cpu/msr/msr.c
>> @@ -241,6 +241,7 @@ static int msr_smrr(fwts_framework *fw)
>> return FWTS_OK;
>> }
>>
>> +
>> typedef struct {
>> const char *const name;
>> const uint32_t msr;
>> @@ -249,7 +250,6 @@ typedef struct {
>> const msr_callback_check callback;
>> } msr_info;
>>
>> -
>> /* From AMD Architecture Programmer's Manual, Volume 2: System
>> Programming, Appending A */
>> static const msr_info AMD_MSRs[] = {
>> { "MTRRCAP", 0x000000fe, 0, 0xfffULL, NULL },
>> @@ -446,7 +446,6 @@ static const msr_info IA32_atom_MSRs[] = {
>> { "MSR_BBL_CR_CTL3", 0x0000011e, 0, 0x800101ULL, NULL },
>> { "PERFEVTSEL0", 0x00000186, 0, ~0, NULL },
>> { "PERFEVTSEL1", 0x00000187, 0, ~0, NULL },
>> - { "CLOCK_MODULATION", 0x0000019a, 0, ~0, NULL },
>> { "MSR_THERM2_CTL", 0x0000019d, 0, 0x10000ULL, NULL },
>> { "MC0_CTL", 0x00000400, 0, ~0, NULL },
>> { "MC0_STATUS", 0x00000401, 0, ~0, NULL },
>> @@ -465,12 +464,15 @@ static const msr_info IA32_atom_MSRs[] = {
>> { NULL, 0x00000000, 0, 0 , NULL },
>> };
>>
>> +static const msr_info IA32_silvermont_MSRs[] = {
>> + { NULL, 0x00000000, 0, 0 , NULL },
>> +};
>> +
>> static const msr_info IA32_nehalem_MSRs[] = {
>> { "BIOS_UPDT_TRIG", 0x00000079, 0, ~0, NULL },
>> { "MSR_PLATFORM_INFO", 0x000000ce, 0,
>> 0xff003001ff00ULL, NULL },
>> { "MSR_PKG_CST_CONFIG_CONTROL", 0x000000e2, 0,
>> 0x7008407ULL, NULL },
>> { "MSR_PMG_IO_CAPTURE_BASE", 0x000000e4, 0, 0x7ffffULL,
>> NULL },
>> - { "CLOCK_MODULATION", 0x0000019a, 0, 0x1fULL, NULL },
>
> Any special reason to remove the CLOCK_MODULATION?
>
It was a duplicated, it already is part of the standard IA32_MSRs, so I
removed it because it doesn't make sense to test the same MSR twice.
Colin
More information about the fwts-devel
mailing list