Thread (6 messages) 6 messages, 3 authors, 2011-06-14
STALE5485d

[RFC PATCH v3] ARM hibernation/suspend-to-disk support

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2011-05-27 19:27:18

On Fri, 27 May 2011, Frank Hofmann wrote:
 /*
  * r0 = control register value
  * r1 = v:p offset (preserved by cpu_do_resume)
+ *      if this is zero, do not reenable MMU (it's on)
This is wrong.  It is well possible for this to be zero when the MMU is 
active.

The best way to determine if MMU is on or off is:

	mrc	p15, 0, rx, c1, c0	@ load ctrl reg
	tst	rx, #1			@ test M bit
I wonder; is there a proper/suggested way to switch MMU off (and not end in
binary nirvana), to have the reentry / reenable work ?
This is slightly complicated.  You first need to turn of and disable the 
caches, and ideally set up a 1:1 mapping for the transition.  There are 
cpu_proc_fin() and cpu_reset(branch_location).

You may also investigate how kexec is handled which purpose is to let 
the kernel boot another kernel.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help