LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 08-02-2004, 08:48 AM   #1
fannyl
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, 02:51 PM   #2
infamous41md
Member
 
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, 02:43 AM   #3
fannyl
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
 
  


Reply


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 10:08 PM
Increasing virtual address space mhl Linux - Newbie 1 09-07-2005 11:29 AM
Virtual network address silver2003 Linux - Networking 2 05-31-2004 02:39 PM
telnet:connect to address 127.0.0.1: connection refused sdeven Linux - Networking 6 12-23-2002 01:38 AM
secure connection to <IP address> refused dirtcheap Linux - Networking 4 04-23-2002 02:20 PM


All times are GMT -5. The time now is 10:11 PM.

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