Reading raw register

Suco sucotronic at
Tue Sep 27 07:50:06 EDT 2011

  I'm trying to read and write some cpu registers directly from a user
program (not programming a kernel module), and after following some info
found, I'm able to read some portions, but not others. In the attached code
you can see it trying to access to the "Hibernate Scratch Pattern Register"
and when I execute the program the only reply I got is:
Bus error

 I'm forgetting to add some kind of offset in the address?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.c
Type: text/x-csrc
Size: 620 bytes
Desc: not available
URL: <>

More information about the discussion mailing list