Subject: Re: Some not working packages use Lesstif or XAw3d
To: None <port-arm32@netbsd.org>
From: Adam Gundy <adam@impala.demon.co.uk>
List: port-arm32
Date: 10/27/1998 23:17:15
In message <199810221522.QAA12206@sun52.NIS.cambridge> you wrote:

> > > ( I'm not too sure on this part, but this is the bit that doesn't work...)
> > > When an LDM is the last instruction on the end of a page it causes the fault
> > > to return to the wrong place, IE back to the LDM instruction on the end of
> > > the page
> > > 
> > > This is how I interpretted what I've seen.
> > 
> > Hm. But if it is that would'nt it be possible to do a workaround in the
> > VM system? It should be possible. You could have a look where the fault
> > wants to return to. If it is a LDM instruction just before a page boundary
> > you increase the return address by 4 so that it points just behind the LDM
> > as it should. Could there be problems with such a workaround?
> > 
 
<snip>

 
> I'm told that no successful fix for the problem has been found, since 
> occasionally certain registers can become corrupted (I don't know how or 
> in what way), and the only solution is either to fix your processor (get a 
> new one) or write your VM system in a way that the fault will never occur 
> -- the note I posted a reference to earlier has some suggestions and I'm 
> not sure why these can't be implemented in NetBSD -- unfortunately I'm not 
> a vm expert so I can't comment on the practicality of these.

I had a go at this a while back. Unfortunately, even if you lock in the
page after the offending instruction, it doesn't always fix the bug -
I had a (repeatable in gdb) case in a build of egcs which would *always*
fail, even if the next page was in memory.

The offending instruction was an LDR btw., not an LDM.

Hmm. Just a thought - we could 'tweak' dangerous instructions at fault in
time so that they cause an undefined instruction fault, then emulate
in the kernel. 
We'd need to be able to identifiably tweak LDMs and LDRs so that the
original instruction could be recognised for emulation.

Seeya,
 Adam.
-- 
As the year 2000 approaches, the carefully planned Millenium 'bug'
begins to manifest itself in the computing job market...
Real programmers don't comment their code. If it was hard to write, it
should be harder to modify. These are all my own opinions.