Re: R4000 end-of-page bug

"Stephen M. Rumble" <[email protected]> Thu, 5 Mar 2009 13:42:56 -0800
Newsgroups gmane.os.netbsd.ports.sgimips
Message-ID <[email protected]>
On Mar 5, 2009, at 1:25 PM, Frank Wille wrote:

> Unfortunately I'm also unable to do it.
> Hmm... how was that solved under Linux?

I don't think it was. It seems like most of these early broken cpus  
were limited to SGI systems, and Linux doesn't support them. I'd  
actually be kind of surprised if your Indy had one. I've seen it only  
on an Indigo.

> I have a R4000 rev. 2.2. Does that mean 2.2 is not affected by EOP  
> bugs?

Apparently it is. I wasn't sure if it was < 2.2 or <= 2.2, but it  
seems that the latter is the case. C.f. "MIPS R4000PC/SC Errata,  
Processor Revision 2.2 and 3.0" numbers 4 and 14.

> Ok. But just out of curiosity I will check if the -mfix-r4000 option  
> changes
> anything.

Looking at gcc quickly, it appears that mfix-r4000 handles erroneous  
integer division results if they occur at the end of a page. Perhaps  
that's what you're hitting. We probably should build with that option  
anyway.

The EOP bug is more nefarious and may be a security vulnerability.  
Apparently when it is triggered, the jump target address is used as  
the exception vector.

Steve