[Trac #438] rdmsr does not seem to work for large MSR addresses

Zarro Boogs per Child bugtracker at laptop.org
Wed Jan 10 12:31:41 EST 2007


#438: rdmsr does not seem to work for large MSR addresses
-----------------------+----------------------------------------------------
 Reporter:  tsylla     |        Owner:  rsmith 
     Type:  defect     |       Status:  new    
 Priority:  high       |    Milestone:  BTest-3
Component:  linuxbios  |   Resolution:         
 Keywords:             |  
-----------------------+----------------------------------------------------
Comment (by JordanCrouse):

 There is some sort of funky signed/unsigned casting going on somewhere
 between glibc and the kernel, with the result being that the MSB is
 getting lost by the time it gets to the chardev, meaning that any MSR
 above 0x80000000 doesn't work.

 You can avoid the problem by using lseek64:

 ret = lseek64(fd, (off64_t) addr, SEEK_SET);

 This is what we use in X (and it obviously works, since all the display
 MSRs are above 0x80000000).

-- 
Ticket URL: <http://dev.laptop.org/ticket/438#comment:3>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list