Unexplained behavior of arm_cp15_mmu_disable()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 18 07:57:59 UTC 2013


On 2013-11-17 01:15, Stephen Tether wrote:
> Why does arm_cp15_mmu_disable() clean and invalidate cache lines around
> the position of the stack pointer?

Suppose you have optimization disabled and the MMU and data cache is on.  Now 
you call this function.  The return address will be stored on the stack (in the 
cache).  Now MMU/cache is disabled.  Now the return address is retrieved from 
the stack (from memory) on return.  Now everything is pretty unpredictable.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list