Subject: Re: StrongARM K bug
To: None <richard.earnshaw@arm.com>
From: Nicholas Clark <nick@flirble.org>
List: port-arm32
Date: 04/10/1999 21:07:27
In the last mail Richard Earnshaw said:

> 
> nick@flirble.org said:

> > 	add	lr, pc, #4
> > 	.align 3
> > 	ldr	pc, [...]
> > 	.align 3

> A neat idea.  This will work fine when running in 32-bit mode, but, 
> unfortunately, won't work in 26-bit mode because the add will clobber the 
> PSR information in the link register.

I realised this at some point after I sent the e-mail (the next day?) but then
forgot it again. Oops. No prizes for that one then

 > > Hopefully from the DEC document I can figure out how to make the MMU
> > work, I'll do my best to do that, as
> > a) this is getting really messy.
> 
> Yep.  Too many corner cases.
> 
> > b) I'd like to be able to reliably run anyone else's (legal) binaries
> >    without needing to recompile to get the bodges in.
> 
> Yep.  Though for this, there is always the option of binary patching...
> 
> We await your conclusions with baited breath...

I hope no-one did, as I've just been away for a few days. And would have caused
a few fatalities.

I think my actions have caused Russell King to attempt to modify the ARM Linux
kernel's use of the MMU to curcumvent the K problem. I don't know what he's
done, I haven't yet compiled or tried it, and I'm not confident that I have
the technical knowledge to explain how he's done it (assuming it does work)

I'll try his change, and if it works let this list know, as hopefully then
someone knowledgeable will be able to reverse engineer the tweak and apply it
to RiscBSD

Nick