* Re: backup/restore concept?
[not found] <CANMsd01y=eeQ356m=82PrdfZ0q50MpE53DoeQS6sDT=HaaZFzw@mail.gmail.com>
@ 2013-07-24 5:49 ` Viresh Kumar
2013-07-24 17:21 ` Nishanth Menon
0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2013-07-24 5:49 UTC (permalink / raw)
To: Ryan; +Cc: Lists linaro-dev, linux-pm
Adding more relevant list in cc.
On 23 July 2013 16:05, Ryan <ryanphilips19@googlemail.com> wrote:
> Hi,
>
> I have some doubts on backup and restore operation. From what i understand:
>
> We copy all registers values & addresses of all controllers in the SOC
> to the internal RAM or SRAM.
> before we put CPU to sleep?
>
> I want to know if we also copy the code segment into SRAM and what
> happens after wakeup.
> If so, where exactly we need to copy and how cpu jumps here after
> wakeup. or is there any other mechanism
> that is used. What executes first since DDR is in self-refresh.
>
> I use OMAP4 and this is my understanding. I could not understand much
> other than in OFF mode
> all the controller registers get copied to SRAM. Does anything else
> also gets copied too?
> or am i missing any basics here.
>
>
>
> Can anyone clarify my understanding.
>
> /Ryan
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: backup/restore concept?
2013-07-24 5:49 ` backup/restore concept? Viresh Kumar
@ 2013-07-24 17:21 ` Nishanth Menon
2013-07-24 17:57 ` Santosh Shilimkar
0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2013-07-24 17:21 UTC (permalink / raw)
To: Viresh Kumar; +Cc: Ryan, Lists linaro-dev, linux-pm
On 07/24/2013 12:49 AM, Viresh Kumar wrote:
> Adding more relevant list in cc.
>
> On 23 July 2013 16:05, Ryan <ryanphilips19@googlemail.com> wrote:
>> Hi,
>>
>> I have some doubts on backup and restore operation. From what i understand:
>>
>> We copy all registers values & addresses of all controllers in the SOC
>> to the internal RAM or SRAM.
>> before we put CPU to sleep?
>>
>> I want to know if we also copy the code segment into SRAM and what
>> happens after wakeup.
>> If so, where exactly we need to copy and how cpu jumps here after
>> wakeup. or is there any other mechanism
>> that is used. What executes first since DDR is in self-refresh.
>>
>> I use OMAP4 and this is my understanding. I could not understand much
>> other than in OFF mode
>> all the controller registers get copied to SRAM. Does anything else
>> also gets copied too?
>> or am i missing any basics here.
This understanding is not accurate. OMAP behavior for "OFF mode" is as
follows (as part of suspend/resume):
- drivers do their own "context save" - saving of registers based on
their need.
- SAR registers are saved (note - this is *not* every possible register
on OMAP - but a core subset).
- cpu goes to WFI triggering h/w statemachine flow. (wfi instruction is
in DDR)
- as part of "OFF mode" DDR is put into self refresh automatically
by memory controller.
on wakeup
- core registers are restored by hardware
- DDR is brought out of selfrefresh,
- execution resume in resume function pointer
- drivers restore their own modules as needed.
So, there is no real black magic here :)
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: backup/restore concept?
2013-07-24 17:21 ` Nishanth Menon
@ 2013-07-24 17:57 ` Santosh Shilimkar
0 siblings, 0 replies; 3+ messages in thread
From: Santosh Shilimkar @ 2013-07-24 17:57 UTC (permalink / raw)
To: Nishanth Menon; +Cc: Viresh Kumar, Lists linaro-dev, Ryan, linux-pm
On Wednesday 24 July 2013 01:21 PM, Nishanth Menon wrote:
> On 07/24/2013 12:49 AM, Viresh Kumar wrote:
>> Adding more relevant list in cc.
>>
>> On 23 July 2013 16:05, Ryan <ryanphilips19@googlemail.com> wrote:
>>> Hi,
>>>
>>> I have some doubts on backup and restore operation. From what i understand:
>>>
>>> We copy all registers values & addresses of all controllers in the SOC
>>> to the internal RAM or SRAM.
>>> before we put CPU to sleep?
>>>
>>> I want to know if we also copy the code segment into SRAM and what
>>> happens after wakeup.
>>> If so, where exactly we need to copy and how cpu jumps here after
>>> wakeup. or is there any other mechanism
>>> that is used. What executes first since DDR is in self-refresh.
>>>
>>> I use OMAP4 and this is my understanding. I could not understand much
>>> other than in OFF mode
>>> all the controller registers get copied to SRAM. Does anything else
>>> also gets copied too?
>>> or am i missing any basics here.
> This understanding is not accurate. OMAP behavior for "OFF mode" is as follows (as part of suspend/resume):
> - drivers do their own "context save" - saving of registers based on their need.
> - SAR registers are saved (note - this is *not* every possible register on OMAP - but a core subset).
> - cpu goes to WFI triggering h/w statemachine flow. (wfi instruction is in DDR)
> - as part of "OFF mode" DDR is put into self refresh automatically by memory controller.
>
> on wakeup
> - core registers are restored by hardware
> - DDR is brought out of selfrefresh,
> - execution resume in resume function pointer
> - drivers restore their own modules as needed.
>
> So, there is no real black magic here :)
>
:)
Also if you are interested in how the SRAM copy stuff work, look
at OMAP3 entry into OFF state and memory self refresh is triggered
from code running from SRAM. On the wakeup though, we directly jump
to DDR address.
regards,
Santosh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-24 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CANMsd01y=eeQ356m=82PrdfZ0q50MpE53DoeQS6sDT=HaaZFzw@mail.gmail.com>
2013-07-24 5:49 ` backup/restore concept? Viresh Kumar
2013-07-24 17:21 ` Nishanth Menon
2013-07-24 17:57 ` Santosh Shilimkar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.