Save and restore arm context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello

We are working on a i.MX31 board and are trying to enter deep sleep
and resume to where we were. We are currently testing with the ADS
board and before entering the wait for interrupt state we put the the
MC13783 in User off with VBKUP1 on at 1.8V to maintain the RAM. Now we
validated that the contents of the RAM are correctly maintained but
restoring the ARM context doesn't.

If we try to do a very basic context save/restore (R0-R15 + CPSR,
SPSR) it works but only in the bootloader. When we try to restore CP15
registers then it fails (depending on which register we restore) . We
haven't been able to find a lot of information on this except on the
ARM website  (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0360e/BHBBCGDI.html)
which lists the following requirements to enter dormant mode:

*All ARM registers, including CPSR and SPSR registers are saved.
*All CP15 registers are saved.
*All debug-related state must be saved.
*MP11 CPU must correctly set the CPU Status Register in the SCU so
that it enters Dormant Mode.
*A Data Synchronization Barrier instruction is executed to ensure that
all state saving has been completed.
*The MP11 CPU then communicates with the power controller that it is
ready to enter dormant mode by performing a WFI instruction so that
power control output reflects the value of SCU CPU Status Register
(see SCU CPU Status Register).
*On entry into Dormant mode, the Reset signal to the targeted MP11 CPU
must be asserted by the external power control mechanism.

Has anyone managed to correctly save and restore the ARM context
needed for deep sleep/dormant? and if so is there any source code that
could help us?
Thanks

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter