Results 1 to 4 of 4
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 ...
- 03-03-2010 #1Just Joined!
- Join Date
- Jan 2010
- Posts
- 10
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.
Question(s):
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,
Guraaf
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 03:41 PM. Reason: wrong topic apologies
- 03-04-2010 #2
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
- 03-04-2010 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
man mmap
please go through it,
$man mmap
$man ioremap
- 03-05-2010 #4Just Joined!
- Join Date
- Oct 2008
- Posts
- 3
Maybe this can help you !
h t t p://linux-mm.org/PageTrace
You are only allowed to post URLs to other sites after you have made 15 posts or more.
That's ridiculous !


Reply With Quote
