On 17 April 2012 10:53, Alexey Starikovskiy <aysta...@gmail.com> wrote:
> I was wondering how to implement disabling of SWP/SWPB execution if
> they are not enabled in SCTLR.SW bit.
> One way to do this is to intercept writes to SCTLR, do tb_flush and
> make SWP [un]defined for any following translations depending on the
> c1_sys state during the translation.

This is the right way to do this. The standard use case is that this
SCTLR bit will never be touched by anybody and will retain its reset
value. The less common case is that the OS will set it once on startup.
Changing the value more often than that is basically vanishingly
unlikely, and so trying to dynamically emit code that looks at the
SCTLR is needless complication and slows down the case where you
actually are using SWP.

-- PMM

Reply via email to