This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to bring secondary CPU1 on ARM v7

Hi,

I am trying to bring up CPU1 on ARM v7 architecture  (assume CPU0 already bring up & set c-environment)

using below code, but it hitting with error: "stack smashing detected"

ldr  sp, =cpu1_stack

b start_task2

* cpu1_stack define here :

int new_stack[1024]__attribute__ ((aligned(16)))   

I used PSCI framework to switch to cpu1

Please share some pointers/inputs whats going wrong here.

Parents
  • Though this is not really my field, I think you'd have to check which CPU is currently executing the code.

    Eg. If I had 4 CPUs, I'd create 4 stacks and set SP = stack[currentCPU];

    I think the page, which peterharris is referring to, will help you find the currently running CPU.

    Please know that I'm not an expert on the Cortex-A; so there's a good chance I'm wrong.

    However, if Peter happens to see this, I'm quite sure he would be able to give a more helpful answer.

Reply
  • Though this is not really my field, I think you'd have to check which CPU is currently executing the code.

    Eg. If I had 4 CPUs, I'd create 4 stacks and set SP = stack[currentCPU];

    I think the page, which peterharris is referring to, will help you find the currently running CPU.

    Please know that I'm not an expert on the Cortex-A; so there's a good chance I'm wrong.

    However, if Peter happens to see this, I'm quite sure he would be able to give a more helpful answer.

Children