All of lore.kernel.org
 help / color / mirror / Atom feed
* suspend resume query
@ 2016-02-16 17:06 Ryan
  2016-02-17  9:10 ` Oliver Neukum
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan @ 2016-02-16 17:06 UTC (permalink / raw)
  To: linux-pm

Hello,

what is the role of bootloaders and bootrom code when system during
linux suspend-resume?


Thanks,
ryan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-16 17:06 suspend resume query Ryan
@ 2016-02-17  9:10 ` Oliver Neukum
  2016-02-17  9:37   ` Ryan
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2016-02-17  9:10 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

On Tue, 2016-02-16 at 22:36 +0530, Ryan wrote:
> Hello,
> 
> what is the role of bootloaders and bootrom code when system during
> linux suspend-resume?

Your question is imprecise. I am now assuming you are talking
about ACPI and S3.

bootloader - none at all. It isn't used.

bootrom - Well, that depends on the vendor.
The system is suspended in the sense that the CPU is powered
down by the firmware. The kernel calls an ACPI method. The
firmware also gets control of the system as a resume from S3
means a full reset for the CPU and the bootstrap code in the
firmware runs.

I am afraid you need to give more details for a better answer.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-17  9:10 ` Oliver Neukum
@ 2016-02-17  9:37   ` Ryan
  2016-02-17  9:40     ` Oliver Neukum
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan @ 2016-02-17  9:37 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-pm

Hi Oliver,

On Wed, Feb 17, 2016 at 2:40 PM, Oliver Neukum <oneukum@suse.com> wrote:
> On Tue, 2016-02-16 at 22:36 +0530, Ryan wrote:
>> Hello,
>>
>> what is the role of bootloaders and bootrom code when system during
>> linux suspend-resume?
>
> Your question is imprecise. I am now assuming you are talking
> about ACPI and S3.
>
> bootloader - none at all. It isn't used.
>
> bootrom - Well, that depends on the vendor.
> The system is suspended in the sense that the CPU is powered
> down by the firmware. The kernel calls an ACPI method. The
> firmware also gets control of the system as a resume from S3
> means a full reset for the CPU and the bootstrap code in the
> firmware runs.
>

I am referring to suspend-resume in ARM platform. The boot sequence is

bootrom
bootloaders
kernel

When system is suspended, I am told that when suspend-resume occurs
it depends on the bootrom/bootloaders during resume. I did not understand why
that should be case. Hence i am asking are there any dependencies between
the bootloaders and the suspend-resume on a arm platform.

Thanks




> I am afraid you need to give more details for a better answer.
>
>         Regards
>                 Oliver
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-17  9:37   ` Ryan
@ 2016-02-17  9:40     ` Oliver Neukum
  2016-02-17  9:49       ` Ryan
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2016-02-17  9:40 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

On Wed, 2016-02-17 at 15:07 +0530, Ryan wrote:

> I am referring to suspend-resume in ARM platform. The boot sequence is
> 
> bootrom
> bootloaders
> kernel

That is the standard done on most architectures including x86 and
x86_64.

> When system is suspended, I am told that when suspend-resume occurs
> it depends on the bootrom/bootloaders during resume. I did not understand why
> that should be case. Hence i am asking are there any dependencies between
> the bootloaders and the suspend-resume on a arm platform.

Suspend to RAM or suspend to disk?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-17  9:40     ` Oliver Neukum
@ 2016-02-17  9:49       ` Ryan
  2016-02-17 10:06         ` Oliver Neukum
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan @ 2016-02-17  9:49 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-pm

Suspend to ram. I am sorry - I did not provide complete information.

Thanks,

On Wed, Feb 17, 2016 at 3:10 PM, Oliver Neukum <oneukum@suse.com> wrote:
> On Wed, 2016-02-17 at 15:07 +0530, Ryan wrote:
>
>> I am referring to suspend-resume in ARM platform. The boot sequence is
>>
>> bootrom
>> bootloaders
>> kernel
>
> That is the standard done on most architectures including x86 and
> x86_64.
>
>> When system is suspended, I am told that when suspend-resume occurs
>> it depends on the bootrom/bootloaders during resume. I did not understand why
>> that should be case. Hence i am asking are there any dependencies between
>> the bootloaders and the suspend-resume on a arm platform.
>
> Suspend to RAM or suspend to disk?
>
>         Regards
>                 Oliver
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-17  9:49       ` Ryan
@ 2016-02-17 10:06         ` Oliver Neukum
  2016-02-18  6:54           ` Zhaoyang Huang
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2016-02-17 10:06 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

On Wed, 2016-02-17 at 15:19 +0530, Ryan wrote:
> Suspend to ram. I am sorry - I did not provide complete information.

STR on ARM is peculiar. I have no idea.

	Sorry
		Oliver



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-17 10:06         ` Oliver Neukum
@ 2016-02-18  6:54           ` Zhaoyang Huang
  2016-02-19 19:57             ` Ryan
  0 siblings, 1 reply; 9+ messages in thread
From: Zhaoyang Huang @ 2016-02-18  6:54 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Ryan, linux-pm

Hi Ryan,
As we already known, STR will let all cores power down after store the
context(GPR, idmap_gpd, sp etc) of primary core in DDR. It is
different between ARMv7 and ARMv8
For ARMv7,
The boot vector can just be located in 0x00000000 or 0xffff0000, which
is chosen by sampling VINITHI domain within PMU register during
bootup. For some SOCs, one of them is used for cold boot while another
is used for recover from STR or CPU IDLE, which is referred as warm
reset. For this scenario, an AON RAM is usually placed in one of the
region mentioned above. Meanwhile, the vendor will place some code
there for bring the core back to the context where it is powered down.

For ARMv8,
All things are covered by PSCI, you can refer the process from ARM's archive.

On 17 February 2016 at 18:06, Oliver Neukum <oneukum@suse.com> wrote:
> On Wed, 2016-02-17 at 15:19 +0530, Ryan wrote:
>> Suspend to ram. I am sorry - I did not provide complete information.
>
> STR on ARM is peculiar. I have no idea.
>
>         Sorry
>                 Oliver
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-18  6:54           ` Zhaoyang Huang
@ 2016-02-19 19:57             ` Ryan
  2016-02-22  2:04               ` Zhaoyang Huang
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan @ 2016-02-19 19:57 UTC (permalink / raw)
  To: Zhaoyang Huang; +Cc: Oliver Neukum, linux-pm

Hi zhaoyang,

On Thu, Feb 18, 2016 at 12:24 PM, Zhaoyang Huang
<zhaoyang.huang@linaro.org> wrote:
> Hi Ryan,
> As we already known, STR will let all cores power down after store the
> context(GPR, idmap_gpd, sp etc) of primary core in DDR. It is
> different between ARMv7 and ARMv8
> For ARMv7,
> The boot vector can just be located in 0x00000000 or 0xffff0000, which
> is chosen by sampling VINITHI domain within PMU register during
> bootup. For some SOCs, one of them is used for cold boot while another
> is used for recover from STR or CPU IDLE, which is referred as warm
> reset. For this scenario, an AON RAM is usually placed in one of the
> region mentioned above. Meanwhile, the vendor will place some code
> there for bring the core back to the context where it is powered down.
>

I understand that, when the wakeup interrupt arrives - it is not
actually an interrupt but
a reset which executes the code from 0x00000000 and then what happens?

Does it execute the Boot rom and bootloaders all over again - this
does not happen right?

My Question is what happens when the wakeup interrupt arrives and how
is it related to
bootloaders/booting process.

>From what i understand - Warm restart is when the reboot command is
issues. How different
is it from cpuidle wakeup or suspend 2 ram wakeup.


Thanks for your help.



> For ARMv8,
> All things are covered by PSCI, you can refer the process from ARM's archive.
>
> On 17 February 2016 at 18:06, Oliver Neukum <oneukum@suse.com> wrote:
>> On Wed, 2016-02-17 at 15:19 +0530, Ryan wrote:
>>> Suspend to ram. I am sorry - I did not provide complete information.
>>
>> STR on ARM is peculiar. I have no idea.
>>
>>         Sorry
>>                 Oliver
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend resume query
  2016-02-19 19:57             ` Ryan
@ 2016-02-22  2:04               ` Zhaoyang Huang
  0 siblings, 0 replies; 9+ messages in thread
From: Zhaoyang Huang @ 2016-02-22  2:04 UTC (permalink / raw)
  To: Ryan; +Cc: Oliver Neukum, linux-pm

On 20 February 2016 at 03:57, Ryan <ryanphilips19@googlemail.com> wrote:
> Hi zhaoyang,
>
> On Thu, Feb 18, 2016 at 12:24 PM, Zhaoyang Huang
> <zhaoyang.huang@linaro.org> wrote:
>> Hi Ryan,
>> As we already known, STR will let all cores power down after store the
>> context(GPR, idmap_gpd, sp etc) of primary core in DDR. It is
>> different between ARMv7 and ARMv8
>> For ARMv7,
>> The boot vector can just be located in 0x00000000 or 0xffff0000, which
>> is chosen by sampling VINITHI domain within PMU register during
>> bootup. For some SOCs, one of them is used for cold boot while another
>> is used for recover from STR or CPU IDLE, which is referred as warm
>> reset. For this scenario, an AON RAM is usually placed in one of the
>> region mentioned above. Meanwhile, the vendor will place some code
>> there for bring the core back to the context where it is powered down.
>>
>
> I understand that, when the wakeup interrupt arrives - it is not
> actually an interrupt but
> a reset which executes the code from 0x00000000 and then what happens?
>
> Does it execute the Boot rom and bootloaders all over again - this
> does not happen right?
>
no

> My Question is what happens when the wakeup interrupt arrives and how
> is it related to
> bootloaders/booting process.
>
For some SOC, there is a RAM on AON(always on) is mapped to 0x00000000
where the resuming codes are placed. The resuming code is responsible for bring
the core back to kernel(to invoke the cpu_resume which will restore the context)

> From what i understand - Warm restart is when the reboot command is
> issues. How different
> is it from cpuidle wakeup or suspend 2 ram wakeup.
I think the rom code will be just used for hotplug when the SOC has been up.

>
>
> Thanks for your help.
>
>
>
>> For ARMv8,
>> All things are covered by PSCI, you can refer the process from ARM's archive.
>>
>> On 17 February 2016 at 18:06, Oliver Neukum <oneukum@suse.com> wrote:
>>> On Wed, 2016-02-17 at 15:19 +0530, Ryan wrote:
>>>> Suspend to ram. I am sorry - I did not provide complete information.
>>>
>>> STR on ARM is peculiar. I have no idea.
>>>
>>>         Sorry
>>>                 Oliver
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-22  2:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 17:06 suspend resume query Ryan
2016-02-17  9:10 ` Oliver Neukum
2016-02-17  9:37   ` Ryan
2016-02-17  9:40     ` Oliver Neukum
2016-02-17  9:49       ` Ryan
2016-02-17 10:06         ` Oliver Neukum
2016-02-18  6:54           ` Zhaoyang Huang
2016-02-19 19:57             ` Ryan
2016-02-22  2:04               ` Zhaoyang Huang

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.