You may want to open /dev/cpu/%d/msr see arch/i386/kernel/msr.c for deatails. 
Here is an example of /dev/ports (the same thing).

#!/usr/bin/perl

open (PORT, "+< /dev/port");

sub in {
    ( $port ) = @_;
    sysseek (PORT, $port,"SEEK_SET");
    sysread (PORT, $data, 1);
    return unpack ( 'C', $data );
};

sub out {
    ( $data, $port ) = @_;
    $data = pack ( 'C', $data );
    sysseek (PORT, $port,"SEEK_SET");
    syswrite (PORT, $data, 1);
};

# The rest of this program makes music using the PC speaker :)
# if you want it drop me a line.

--- "Sarma V. Kolluru" <[EMAIL PROTECTED]> wrote:
> I am writing a new X display driver. To initialize the
> chip I require to use rdmsr and wrmsr defined in linux
> kernel. When I use any of these calls the Xserver
> crashes. The Linux Kernel is 2.4.0 and Xfree is 4.0.1.
> 
> What I am doing is right or is there any other way of
> doing this?
> 
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions! 
> http://auctions.yahoo.com
> _______________________________________________
> Xpert mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/xpert


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to