i.MX6UL/optee: How is linux getting out of 'idle'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6UL/optee: How is linux getting out of 'idle'

Jump to solution
1,488 Views
vsiles
Senior Contributor I

(The linux I'm using is from Linaro Security Working Group · GitHub  but the same code can be found in Linux's master or NXP repo)

Hi,

I'm running Linux in the normal world along side a secure OS (optee or another secure blob) without the SMP activated, so only 1 core is running. At some point, linux is deciding to put the core into idle, and is running the function imx6sx_enter_wait (see linux/cpuidle-imx6sx.c at optee · linaro-swg/linux · GitHub ). For what I understood and gathered, this function will completely powerdown the core, which will be restarted by some other device, and set to run the v7_cpu_resume function.

My question is to find how does the core (single core, remember) is reset and restored out of IDLE mode ? I tried to use the SNVS RTC interrupt to do so, but it doesn't seem to work.

Could anyone explain to me how is the core restored after an IDLE, in uniprocessor setup ? A link to the relevant code would be great !

Best,

V.

Labels (2)
0 Kudos
Reply
1 Solution
1,251 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vincent

for code examples one can look on linux low power driver described

in attached Linux Manual Chapter 21 Low-level Power Management (PM) Driver

and power_mode_switch.c example from MX6UL SDK2.2.

Board Support Packages (9)
SDK2.2_iMX6UL_WIN
i.MX6UltraLite Evaluation Kit|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
1,252 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vincent

for code examples one can look on linux low power driver described

in attached Linux Manual Chapter 21 Low-level Power Management (PM) Driver

and power_mode_switch.c example from MX6UL SDK2.2.

Board Support Packages (9)
SDK2.2_iMX6UL_WIN
i.MX6UltraLite Evaluation Kit|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,251 Views
vsiles
Senior Contributor I

Thank you. I was missing the unmasking of interrupt in the GPC...

Now I can resume my CPU "almost" correctly (sometimes, the CPU resets completely instead of being resumed to the address I wrote in the SRC), but it's up to me to fix that :smileyhappy:

0 Kudos
Reply