Subject: Re: UVM bug
To: None <tech-kern@netbsd.org>
From: Neil A. Carson <neil@causality.com>
List: tech-kern
Date: 05/26/1999 15:14:20
I added an && (pos + size) onto the end of the test to fix this one I
think.

If this is correct, can someone commit it please?

"Neil A. Carson" wrote:
> 
> So,
> 
> In order to reprogram a flash, I need to mmap the last page of physical
> memory using /dev/mem:-)
> 
> If you look at the check in sys_mmap() in uvm_mmap.c, you'll note that
> the test (if (pos+size == 0) || (!pos)) causes this to fail in the case
> of the last page physical RAM (my example is at 0xFFF80000 size 0x80000
> on i386).
> 
> Can someone suggest the best way to clean this up? It'd be a lot easier
> in assembler by just checking for a carry :-)
> 
>         Neil