Download linux-phc here. [READONLY]
Post Reply
Posts: 346
Joined: Wed 9. Jul 2008, 19:57


Post by the-fallen » Fri 6. Nov 2009, 18:07

Dumpmsr is a little python script that dumps out a given MSR on a given CPU.
This may be handy to check some bit settings and for debugging.

To us dumpmsr you need to have "msr" compiled into the Linux kernel or loaded as module (sudo modprobe msr).

To run this program run "sudo ./dumpmsr <cpunr> <register>"

CPU number is the number of the CPU to check (starting with "0" for the first CPU).
Register is the hexadecimal expression of the register address.

A valid set of parameters may be (for example)

sudo ./dumpmsr 0 0x199

The output will look like that:

Code: Select all

sudo ./dumpmsr.py 0 0x199
  [                EDX                ] [                 EAX               ]
  [63               47              32] [31               15               0]
  [00000000|00000000|00000000|00000000] [00000000|00000000|00000134|00000015]
   00000000 00000000 00000000 00000000   00000000 00000000 10000110 00001111 
The 2nd line is for helping to count the bit-number (starting with bit 0 and ending with bit 63 on a 8 Byte register)
The 3rd line is a zero-filled decimal expression of the Byte.
The 4th line is the binary expression of the register.

Download Version 0.1:
dumpmsr 0.1
(1.07 KiB) Downloaded 551 times

Post Reply