Subject: Re: stack start address (was: CVS commit: syssrc)
To: Soren S. Jorvang <soren@wheel.dk>
From: Jeff Smith <jeffs@geocast.com>
List: port-mips
Date: 04/07/2000 15:23:56
"Soren S. Jorvang" wrote:
> 
> On Sat, Apr 08, 2000 at 07:57:29AM +1000, Simon Burge wrote:
> > > Move the start of the user stack down a little to account for the
> > > virtual address checking done by the R8000 and some QED CPUs.
> >
> > Just curious - is there anything wrong with 0x7ffffff8 for example
> > instead of going down a full page?
> 
> Note sure - I liked the round number :-)
> 
> Perhaps Jeff can comment more.

The issue is that the MIPS ovbcopy() uses negative offsets.  On
user mode core dumps, all the user pages are copied into the core
file.  With the QED processor, the copyout() would fail after ovbopy()
faulted,  generating an incomplete core dump.

So just moving down 8 bytes doesn't help as the whole page would still
be
copied.  It is also possible to change ovbcopy(), but this is a bigger
change and it's hard to characterize a bcopy change performance wise
on any give MIPS processor that NetBSD supports.

Other MIPS processors have this similar problems as well.  The R8000
cannot access K2SEG as a negative offset from the zero register.  It
may also have this exact problem too, but I don't remember.

jeffs