Subject: Re: Self modifing code ..
To: None <port-arm32@NetBSD.ORG>
From: Mark Smith <mark@findon.demon.co.uk>
List: port-arm32
Date: 10/16/1996 21:21:16
In message <9610160133.ZM14467@physig4.ph.kcl.ac.uk>
          "Mark Brinicombe" <amb@physig4.ph.kcl.ac.uk> wrote:

> NetBSD-current now has a libarm32 which has
> a arm32_sync_icache() function that can be used if you feel the need for self
> modifing code. This function should be used to ensure the instruction cache on
> the SA110 is in sync with memory.

Presumably, it also makes sure that the data cache is clean, either all
cache lines or those corresponding to a specific virtual address range. If
not, self modify code will still be in trouble if the function is called
before parts of the modified code have been written back to memory. It
really ought to drain the write buffer as well to be really safe.

-- 
Mark Smith - Surrey, UK         ...http://www.findon.demon.co.uk/...
This message was posted via my private internet account. It doesn't represent
the position of any individuals or organisations with whom I may be linked.
... Hardware: The part you kick.