Hi -
If you're doing this from user space, then the virtual address *IS* the address. Trying to compute a checksum of an arbitrary memory range with respect to using "physical memory" ranges is nonsense:
a) It's a lot of extra work (you can already easily get a user space pointer)
b) It isn't even necessarily valid (the "real" addresses can change - many times - under your feet while you're computing the checksum. Your final "sum" would be pure fantasy!)
There are (as always) exceptions ... and you might indeed have a legitimate requirement in here.
But based on the information you've given ... don't do it! Just compute the user-space checksum from your user-space virtual address range ... and you should be Happy.
IMHO .. PSM
PS:
Otherwise, if I've misunderstood the question, you might be interested in looking at:
a) mmap
... and/or ...
b) the C/C++ "volatile" keyword
... and/or ...
c) Writing your own kernel module to access physical hardware (memory and registers)
Here's a link that might be of interest:
http://www.simtec.co.uk/appnotes/AN0014/