Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-02-2004, 07:48 AM   #1
LQ Newbie
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
mmap refused with 0x80000000 virtual address

in a multiprocessor system we are introducing linux on 1 processor, a communication memory area is physically located at 0x8000000 (size 32MO), we need to access this memory under a linux process using the same adress that the others processors (virtual 0x80000000). It works if we use 0x7000000. With 0x8000000
mmap is refused, we try to change the parameter TASK_SIZE
setting it to 0x9000000, but after this linux initialization fails, the last display :
Mounted devfs on /dev
Freeing unused kernel memory: 64k init
Old 08-02-2004, 01:51 PM   #2
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
are you opening up /dev/mem, or /dev/kmem, and mapping that? that is how u gain access to physical memory. if you read mmap() man page u'll see that passing a first arg other than NULL is not recommended also. what you do is specify 0x80000000 as teh offset and leave first parm NULL and let kernel pick where it maps the memory in process address space. if that is already what you are doing and i have misunderstood you, then take a look at the source for /dev/mem, located in /drivers/char/mem.c , it is pretty simple.
Old 08-03-2004, 01:43 AM   #3
LQ Newbie
Registered: Aug 2004
Posts: 2

Original Poster
Rep: Reputation: 0
we know it is not recommanded to pass a first argument to mmap but that's what we need, because same application softwares run under linux and under private system.
We try it two ways,
1)Using ioremap_nocache to get a kernel address for 0x80000000 and then mmap on /dev/kmem for the obtained kernel address passing first argument 0x80000000
2)Using mmap on /dev/mem with first and last argument = 0x80000000


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
Increasing virtual address space mhl Linux - Newbie 1 09-07-2005 10:29 AM
Virtual network address silver2003 Linux - Networking 2 05-31-2004 01:39 PM
telnet:connect to address connection refused sdeven Linux - Networking 6 12-23-2002 12:38 AM
secure connection to <IP address> refused dirtcheap Linux - Networking 4 04-23-2002 01:20 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration