Re: 64-bit paddr_t and mmap()?

Matt Thomas <[email protected]> Wed, 29 Mar 2006 13:30:06 -0800
Newsgroups gmane.os.netbsd.ports.arc,gmane.os.netbsd.ports.mips.devel
Message-ID <[email protected]>
Garrett D'Amore wrote:
> I'm trying to mmap a framebuffer device under evbmips, using a 64-bit
> paddr_t.   (Alchemy PCI space is located in the upper portion of the
> 36-bit MIPS physical address space.)
> 
> Anyway, the mmap works fine.  I'm able to draw a picture on screen.
> 
> But when the application exits (and hence does an implicit munmap()), I
> get a panic in pmap_remove_pv, called from pmap_remove, where it looks
> like a NULL "pg" pointer is being passed.

That sounds like a bug in the pmap.  Not all mapped pages will have a
corresponding uvm_page (because of being able to map pages outside of
uvm managed memory).  In that case, you just reap the PV entry.

See line 1749 in powerpc/oea/pmap.c for instance.
-- 
Matt Thomas                     email: [email protected]
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.