Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add save/restore support to ARC core #2710

Closed
zephyrbot opened this issue Nov 7, 2016 · 4 comments
Closed

Add save/restore support to ARC core #2710

zephyrbot opened this issue Nov 7, 2016 · 4 comments
Labels
area: Power Management Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 7, 2016

Reported by Julien Delayen:

When restoring from sleep, the x86 core will start the ARC core which will need
to restore its context (registers, program counter).

The ARC shim layer will support sleep and deep sleep and the power
sample will be supporting the ARC.

This does not involve any type of communication between the core and
assumes the x86 is ready to en ter sleep at any time.
The communication will be treated as a separate story.

(Imported from Jira ZEP-1222)

@zephyrbot
Copy link
Collaborator Author

by Qiu Peiyang:

Board= quark_se_c1000_devboard
https://gerrit.zephyrproject.org/r/#/c/6913/(power: Add ARC core suspend and resume support
)
https://gerrit.zephyrproject.org/r/6911(arcv2_irq: Add power management suspend/resume
)
https://gerrit.zephyrproject.org/r/#/c/6912/(arcv2_timer0: Add suspend and resume support
)
https://gerrit.zephyrproject.org/r/#/c/7090/(arc: Define _arc_v2_irq_unit device
)

I cherry-pick the four patches related to PM on ARC core, and then run tests/power/power_states.
The first round of power state switch is ok, but the second round stops after printing "Entering SYS_POWER_STATE_CPU_LPS state", and then the console blocks.

Quark SE: Power Management sample application
Entering SYS_POWER_STATE_CPU_LPS state
Exiting SYS_POWER_STATE_CPU_LPS state
Back to the application
Entering SYS_POWER_STATE_CPU_LPS_1 state
Exiting SYS_POWER_STATE_CPU_LPS_1 state
Back to the application
Entering SYS_POWER_STATE_CPU_LPS_2 state
Exiting SYS_POWER_STATE_CPU_LPS_2 state
Not enough time for PM operations (ticks: 98).
Back to the application
Entering SYS_POWER_STATE_DEEP_SLEEP state
Woke up with RTC (pin:1)
Exiting SYS_POWER_STATE_DEEP_SLEEP state
Back to the application
Entering SYS_POWER_STATE_DEEP_SLEEP_1 state
Woke up with RTC (pin:1)
Exiting SYS_POWER_STATE_DEEP_SLEEP_1 state
Back to the application
Entering SYS_POWER_STATE_CPU_LPS state
(no more log)

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Dec 7, 2016

by Julien Delayen:

Hi Peiyang,

I did the check on my side and did not see that behavior. (make BOARD=quark_se_c1000_devboard)

I am running this test on a Quark SE board, not on a arduino 101.

Those patches are enabling the ARC feature. In order to test this, you need to:
make BOARD=quark_se_c1000_ss_devboard

Flash the x86 side with the hello world sample with CONFIG_ARC_INIT=y.
There, the application will be stuck on the second LPS as you described.

This will be fixed once GH-2604 is implemented as some support needs to be added to
the x86 when the ARC goes to sleep.

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Jan 10, 2017

by Sharron LIU:

With a "start_arc" binary shared by developer, I was able to verify the ARC context save/restore across deep sleep @quark_se platforms with QMSI v1.3+ ROM.
TESTPOINTs:

go to sleep via _sys_soc_set_power_state() and wake up from AONPT

suspend/resume system clock device across deep sleep

CPU and register context save/restore across deep sleep

The test case is still kept locally, as the integration test is still pending on GH-2604 to get ARC deep sleep and wake up in sync with X86 core.

Closing this. Thanks.

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Fixing incorrect priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Power Management Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

1 participant