--- "S. Krishnan" sri_krishnan@yahoo.com wrote:
A reference to the PROC (5) man page describes /dev/mem as providing direct access to the physical memory, before it is virtualized into different user processes. However, it clarifies that /dev/mem is *not* the same as the mem in proc. I quote below: mem
[snip] thx again Krishnan.....for the insight into the matter. The stuff's done thx to u, philip and Prakash from LIH. This time around is another issue, but nothin for concern. The machine i hav compiled the code on is a 128Meg RAM machine. Now the code RUNs works perfecto on this 1 but when the same code is RUN on 64Megs of RAM the code won't be able to find the data in the same location as it did in the prev case. I am at a loss to understand....the data that i inserted into the BIOS which i am accessin at RUN time is at the same location irrespective of the amounts of RAM in the machine. The difference remains that while the code executes only at run time am i actually askin it to make the fetch from absolute memory address 0xfcdcd. I haven't tried this 1 out, but i GUESS, when i recompile the code with the 64Megs, things will work again. Why is this limitation occuring....i understand that the reference to the abso memory location in the EEPROM is dynamic but the data fetch location still doesn't change....This is really strange......but also very interesting...'-)
Trevor Warren
This is not the same as the mem (1:1) device, despite the fact that it has the same device numbers. The /dev/mem device is the physical memory before any address translation is done, but the mem file here is the memory of the process that accesses it. This
do a ((0xf000<<4) | 0xcdcd) - this will verify that the result is 0xfcdcd.
HTH,
Krishnan
===== ( >- LINUX, It's all about CHOICE -< ) /~\ __ http://www.trevorwarren.com __ /~\ | ) / mailto: trevorwarren@yahoo.com \ (/ | |_|_ \ Urgent ->9820349221@maxtouch.co.in / / _|_| ___________________________________/
__________________________________________________ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1