Subject: Re: stack start address (was: CVS commit: syssrc)
To: <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-mips
Date: 04/17/2000 02:09:42
On: 04/07/2000 16:06:53, Chris G. Demetriou  writes:


>Jeff Smith <jeffs@geocast.com> writes:
>> 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.

>is this to say "ovbcopy() potentially touches pages in addition to
>those specified by its arguments"?

Nope.  It's saying that on some MIPS cpus, the CPU pipeline may ask
the TLB to do a lookup on (register plus offset) for the address past
where the loop stops. The CPU never gets to issue the load, but the
TLB can still see it.  (Or something like that.

That may not be what the hardware does, but it's close to what the
software sees.

There's a similar problems with the byte-at-a-time loop in kernel
bcopy on the r4000 somewhere in the CVS logs.  We originally got a fix
courtesy of OpenBSD, before I had any mips3 systems.  I think that one
was a hardware buglet with negative offsets that causes the effective
address to be on a different page from the base register: the TLB
looks up the wrong page, or something stupid. You get the drift.