linux-mips-fnet
[Top] [All Lists]

mmap() frame buffer causes bus error on MIPS ...

To: linux-fbdev@vuser.vu.union.edu, linux@oss.sgi.com, linux-mips@fnet.fr
Subject: mmap() frame buffer causes bus error on MIPS ...
From: Jun Sun <jsun@mvista.com>
Date: Tue, 05 Sep 2000 20:42:12 -0700
Sender: jsun@hermes.mvista.com
With the help from Attila, I got the latest tdfx framebuffer driver
working on my NEC DDB5476 board.   I have console working based on this
driver.

However, when I try to mmap frame buffer into user land, the mapping is
succesful, but trying to read the buffer causes a bus error.

I tried to trace the kernel using gdb.  fb_mmap() seems to do the right
thing :

1) it calls fb->fb_get_fix() to get the buffer address, size, etc.  The
values all look fine.  The address is physical address, pointing a
mapped PCI memory block.  I verified that I can access that address in
gdb.

2) for MIPS, fb_mmap() turns off CACHE bit for the page.

I would imagine when the app tries to read the buffer, a TLB miss is
generated.  TLB refill routine probably sets up the right TLB entry, and
the app will try to read again, and get the content.  I really can't
think of where the Bus error might occur.

Does anybody have a clue here?  Thanks a lot.

Jun

<Prev in Thread] Current Thread [Next in Thread>