Subject: Re: 64-bit paddr_t and mmap()?
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Matt Thomas <matt@3am-software.com>
List: port-arc
Date: 03/29/2006 13:30:06
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: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.