jwmesa412 / i7z

Automatically exported from code.google.com/p/i7z
GNU General Public License v2.0
0 stars 0 forks source link

multiplier get - Current multiplier is wrong... #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

just run "multiplier get"

What version of the product are you using (the download version or the svn
version and which one)? On what operating system?
BTW is it a 32-bit or a 64-bit OS/Kernel?

64-bit

Please provide any additional information below (helpful will be platform
information like number and types of cpus, motherboard and a copy of
/proc/cpuinfo)

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6800.27
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 1
cpu cores   : 4
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 2
cpu cores   : 4
apicid      : 4
initial apicid  : 4
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 3
cpu cores   : 4
apicid      : 6
initial apicid  : 6
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 4
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 0
cpu cores   : 4
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.76
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 5
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 1
cpu cores   : 4
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 6
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 2
cpu cores   : 4
apicid      : 5
initial apicid  : 5
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.78
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 7
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping    : 7
cpu MHz     : 3401.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 3
cpu cores   : 4
apicid      : 7
initial apicid  : 7
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm 
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts 
tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6799.77
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

If the program crashes with a rdmsr or wrmsr error. can you also paste the
output of ls -lt /dev/cpu/*/msr

Also, can you also run the following commands? They read various registers
and if those registers cannot be read the tool fails. You will have to sudo
each commmand and probably also do sudo modprobe msr

rdmsr 0x19c
rdmsr 0x1a2
rdmsr 0x38d
rdmsr 778
rdmsr 779
rdmsr 1020
rdmsr 1021

thomas@osiris ~ $ sudo rdmsr 0x19c
881b0000
thomas@osiris ~ $ sudo rdmsr 0x1a2
621200
thomas@osiris ~ $ sudo rdmsr 0x38d
333
thomas@osiris ~ $ sudo rdmsr 778
5c1c38ce19d
thomas@osiris ~ $ sudo rdmsr 779
428749bf512
thomas@osiris ~ $ sudo rdmsr 1020
6a76568c8
thomas@osiris ~ $ sudo rdmsr 1021
102dd99db98

-------------------

Error is in current multiplier; (should be 48)

>> multiplier get
Running following command in sudo:  rdmsr  0x198 --decimal 
  Current Multiplier is 12288
Running following command in sudo:  rdmsr  0xce --decimal --bitfield 47:40 
  Minimum Multiplier possible is 16
Running following command in sudo:  rdmsr  0xce --decimal --bitfield 15:8 
  Maximum Multiplier in Non-turbo mode is 34
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 7:0 
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 15:8 
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 23:16 
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 31:24 
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 39:32 
Running following command in sudo:  rdmsr  0x1ad --decimal --bitfield 47:40 
  Maximum turbo limit with 1/2/3/4 cores active is 59/59/59/59

Original issue reported on code.google.com by cumulusnimbus@gmail.com on 11 Jan 2012 at 5:46

GoogleCodeExporter commented 8 years ago
Hi

could you run the following command in command prompt?

rdmsr  0x198 --decimal 

the output of that is the current multiplier. i am not sure why a system msr 
gives a wrong multiplier.

its also usually the lowest 16 bits of the returned value which in your case is 
3000 which is still incorrect. 

Original comment by abhirana on 11 Jan 2012 at 9:10

GoogleCodeExporter commented 8 years ago
rdmsr 0x198 --decimal returns 35210141896704

Original comment by cumulusnimbus@gmail.com on 12 Jan 2012 at 12:47

GoogleCodeExporter commented 8 years ago
CPU is running under different load now so the actual multiplier atm is lower 
than the x48 yesterday.

Original comment by cumulusnimbus@gmail.com on 12 Jan 2012 at 12:48

GoogleCodeExporter commented 8 years ago
Hi

i think there is some issue going on with your chip as its not reading the read 
only register correctly; the low 16 bits of that register should show the 
current multiplier and in your case its showing as 4096 (after converting from 
dec to hex to dec)

Original comment by abhirana on 13 Jan 2012 at 8:14

GoogleCodeExporter commented 8 years ago
Well, my CPU works just fine.. :)

You must have missed something in the Intel document specifying this MSR 
register.

Can it be that 4096 means (CPU denied OS reading?)

Can you please tell me what document you have found for this Turbo MSR ?

Original comment by cumulusnimbus@gmail.com on 13 Jan 2012 at 9:08

GoogleCodeExporter commented 8 years ago
http://www.intel.com/content/dam/doc/manual/64-ia-32-architectures-software-deve
loper-system-programming-manual-325384.pdf

search for IA32_PERF_STATUS and 198
pg 629 and pg 1641

198H bit 15:0 Current performance State Value
63:16 Reserved.

Original comment by abhirana on 13 Jan 2012 at 9:59

GoogleCodeExporter commented 8 years ago
I will write a small asm stub when i get home and boot it with grub and see 
what it says about the MSR. I suspect there is something fishy with the 
operation of the CPU in Linux here.

Original comment by cumulusnimbus@gmail.com on 13 Jan 2012 at 10:17

GoogleCodeExporter commented 8 years ago
Hi,

Created a stub booting from bare grub. This code does nothing to initialize any 
part of the cpu after grub gives it control. Just issues the rdmsr and prints 
the output to screen..

Msr 0x198 is 000027b6'00002200
Msr 0x199 is 00000000'00002200
Msr 0xce is  00001000'70012200

this seems right, 34 normal, 16 minimum and 2200 in current and control msr..?

I can see in last bytes of ce looks like same as the 0x198 in the i7z code 
above.. Can there be a code issue?

Original comment by cumulusnimbus@gmail.com on 15 Jan 2012 at 2:51

GoogleCodeExporter commented 8 years ago
cool experiment.

last 16 bits of the register 0x198 and 0x199 are incorrect and 2200 corresponds 
to 8704 which is out of range. whereas 0xce has bits 15:8 for the max turbo 
mode. 0xce seems to be correct 34 for the max multiplier and 16 from the min 
multiplier.

0x198 is readonly and shows the current multiplier, 0x199 is r/w and one can 
put any value in it and its upto the proc to accept it or not and then reflect 
it within 0x198. i dont know what might happen initially when the machine is 
booted, but i am guessing the initial value may be within range and thus 0x198 
and 0x199 should reflect values within range.

do you have the same ranges from the tool (not from the ruby script)? it 
directly reads from the msr file rather than via rdmsr. the other idea is to 
use windows and see if you get the same results.

Original comment by abhirana on 16 Jan 2012 at 6:50

GoogleCodeExporter commented 8 years ago
Hi

i was wrong. the documentation is wrong and they shifted the bits without 
noting it down.

on a 2600k and 2720QM, it seems that on sandy bridges bits 15:8 show the 
correct bios multiplier. so the 2200 (15:8 are 22 and in hex = 34x multiplier) 
and in the first post the (15:8 bits are 30 and in hex = 48x multiplier)

thanks

Original comment by abhirana on 9 Mar 2012 at 1:17

GoogleCodeExporter commented 8 years ago

Original comment by abhirana on 31 Mar 2012 at 8:35