please help: loosing mmap()ed memory

Mattias Nissler Mattias.Nissler at gmx.de
Thu Apr 14 04:24:11 MDT 2005


Hallo,

Last week I tried to get the pci proxy thing working. Many people would love
that to get their Airport Extreme devices running through MOL using the OS X
driver. I made quite some progress, but no I have a problem.

The i/o memory of the PCI device can be accessed in Linux by mmap()ing the
appropriate physical memory region using /dev/mem. That returns a linux
virtual memory pointer that can be used to read/write to the PCI device's
memory. So far so good, I checked that this works directly after doing the
mmap() with the map_phys_mem() utility function in MOL.

After that I set up the device, register it with MOLs pci bridge etc. OS X
starts up and loads the AppleAirport2 driver, which now tries to read the
memory. To have more control over the whole thing I used add_io_range() to
have the reads/writes done in userspace. And here is the problem: When MOL
calls my read/write handlers, I can't access my mmap()ed memory any more.
Trying so just results in a segfault. Even the mmap() fails now.

I suspect that the problem is related to the things the MOL kernel module
does. Maybe it just fails to keep the mmap()ed region in the virtual address
space of the MOL userspace process? However I currently have no idea what is
going on in the kernel module, so I would be glad if someone could help me
out.

Regards,

Mattias

P.S.: I also attach a patch that contains my pciproxy work so far.

-- 
+++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++

GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pciproxy.diff
Type: text/x-patch
Size: 41610 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/mol-general/attachments/20050414/0fce5937/pciproxy-0001.bin


More information about the mol-general mailing list