Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - mmap64 to map physical address above 4GB on x86: (4 Items)
   
mmap64 to map physical address above 4GB on x86  
I'm trying to access physical memory above 4GB using mmap64. (6.5.0SP1)

mmap64 (0, 0x1000, PROT_READ | PROT_WRITE, MAP_PHYS | MAP_SHARED, NOFD,  0x100000000ULL);

I tried:
- add -x to startup-bios
- run my program using "on -P"
- use mmap_device_memory instead of mmap64
but always failed and errno was 22 (EINVAL).

pidin info shows:
CPU:X86 Release:6.5.0  FreeMem:3008Mb/3570Mb BootTime:Apr 18 03:42:12 JST 2015
Processes: 32, Threads: 97
Processor1: 131758 Core i7/5/3 Stepping 7 3293MHz FPU 

Any idea why mmap64 failed?
Re: mmap64 to map physical address above 4GB on x86  
Sorry, I had missed updating /.boot file.
Now "pidin info" shows 8162Mb and I can mmap64 over4G area.
Thank you.
Re: mmap64 to map physical address above 4GB on x86  
Hi there,

I am curious how you managed to get your boot file worked on the above system? I presume your system has 8GB RAM. I have
 tried so many times, with no success even once.  Did you use the x86 BSP with pre-built IFS-x86-generic.bin? 

I look forward to hear from you soon.

Siow-lim
Re: mmap64 to map physical address above 4GB on x86  
> I am curious how you managed to get your boot file worked on the above system?
>  I presume your system has 8GB RAM. I have tried so many times, with no 
> success even once.  Did you use the x86 BSP with pre-built IFS-x86-generic.bin
> ? 

No, I used IFS rebuild by myself.

step 1. enable extended address
    do edit <somewhere>/boot/build/qnxbase[dma].build
    [add "-x" to startup-bios line]

step 2. build IFS
    # cd <somewhere>/boot/build
    # mkifs qnxbase[dma].build ../fs/qnxbase[dma].ifs