From: Jon S. <jon...@ya...> - 2003-01-04 17:35:00
|
--- j p <jp...@ho...> wrote: > mmap cannot be used from ioremap. In UML the kernel > itself contains some processes. So when one process > maps physical memory, another process will be SIGSEGVed > when trying to access this memory. > The solution is to mmap the memory on system initiation > so the mappings will be inherited by all UML processes > created in the UML trampoline. When do the other process in the kernel get started? Why do they need to get to the IO memory (interrupts?)? Right now I am calling ioremap(mmap) when the driver calls pci_enable_device. My drivers are linked into the kernel so they get called during boot. Inside the pci_enable_device call I am able to tell what regions I need to map. I still can't get my driver to load right, so I can't test it from userspace to see if the mmap isn't visible. Is there a solution for doing this with a driver that is later modprobe'd or hotplugged when you don't know the physical memory range until the device is activated? The other solution is to build an init file of all of the IO memory regions you could possibly want mapped and map them right when UML starts. But this could chew up a lot of address space. BTW, My email is at yahoo, not hotmail. ===== Jon Smirl jon...@ya... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |