The driver allocates some memory (SharedMemory) for communication with PCI
card , using function pci_alloc_consistent(). PCI card can write to this
memory using DMA . On kernel level driver correctly reads values, written
by the board , and the board correctly reads values, written by driver.

The goal is to make this memoty visible from user level application. The
following approach is used on õ86 and works :
1. Application calls mmap( 0, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0
) ;

3. Application gets pointer and accesses all mapped pages (reads a byte
from each page) - this causes call of nopage function in driver .
The nopage function calculates VirtualAddress from SharedMemory address
(received after pci_alloc_consistent()),

then does KernelPage= virt_to_page(VirtualAddress) ,
get_page(KernelPage)
and returns KernelPage.

4. Now Application reads from SharedMemory , using a pointer , given by
mmap() .
This works fine on x86 platform , but on MIPS application cannot see
expected contents of the memory - it reads garbage .