Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    translating physical/virtual addresses

    Hi all,

    I am new to Linux kernel/user space programming having been an assembly programmer in my previous life. I am now using 2.6.x kernel on an embedded CPU that has a few dedicated hardware blocks (including more CPU running just C-code, i.e., no operating system).

    There is a single DRAM connected to this chip with one Linux CPU + multiple h/w blocks. No swapping.


    1. The Linux CPU needs to talk to hardware blocks that obviously physical DRAM addresses while Linux processes/threads use virtual addresses.

    2. How do I translate these addresses back-n-forth? For example, a Linux process may want to allocate memory and then hand it off to a hardware block to write into it. Then after a while the process will read it.

    3. Sometimes, the hardware block may write a physical address into the shared memory. The Linux CPU will read the shared memory and then convert the physical address to virtual memory and go read that location.

    How does one achieve all of this? If this is being extremely stupid, then please let me know. Hopefully, you can give me some pointers. A website, book, code, man page, high-level thoughts, anything would be appreciated.

    Thanks a lot,

    PS: Apologies if this is the wrong forum. Do let me know what might be a better sub-forum to ask for advice.
    Last edited by agaurav; 03-03-2010 at 04:41 PM. Reason: wrong topic apologies

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Canada, Prince Edward Island
    You may want to google walking page tables...or check out the Intel/AMD manuals on "Page Translation and Protection"...Hope this helps out..
    Make mine Arch Linux

  3. #3

    man mmap

    please go through it,
    $man mmap
    $man ioremap

  4. $spacer_open
  5. #4
    Maybe this can help you !

    h t t p://

    You are only allowed to post URLs to other sites after you have made 15 posts or more.

    That's ridiculous !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts