Latest LQ Deal: Latest LQ Deals
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 10-20-2004, 09:45 AM   #1
LQ Newbie
Registered: Oct 2004
Distribution: Fedora
Posts: 1

Rep: Reputation: 0
Question mmap64 wrong physical mapping

I am writting an application that needs control over large (1gig+) portions of contiguous memory. I am currently doing this by using mem=1024m during boot. My system is a dual opteron with 5 gig of memory. In my program I have

if ((fd=open("/dev/mem", O_RDWR))<0)

PtrMemoryBase = (void *) mmap64(
base );

size = 0x400000000

I also have -D_FILE_OFFSET_BITS=64.

If base is between 1 and 3 gig the process works fine. When base is 4 gig + the mmap64 works but the memory does not seem to be mapped to the base location. I write a pattern to PtrMemoryBase then have my hardware start doing DMA transfers to the base address but I do not get the data I wrote to PtrMemoryBase.

Thanks for any help

Last edited by mark02k; 10-20-2004 at 09:47 AM.


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
Wrong Keyboard mapping. mullog *BSD 0 09-22-2004 03:23 PM
how to fix imap wrong domain mapping problem? htm Linux - Networking 29 04-25-2004 11:24 AM
LVM Problem - vgimport - wrong number of physical volumes to import volume group Anything1 Linux - Software 0 09-06-2003 07:18 PM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 11:50 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:12 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
Open Source Consulting | Domain Registration