I am using an Allwinner H3 SoC (on a zeropi board) and I want to start up a secondary core without using an OS. I am trying to use the SMC call CPU_ON, using the following code:
smc_call(0x84000003, 0x02, (void*)blink, 0);
globl smc_call .arch_extension sec smc_call: SMC #0 bx lr
1. uint32 Function ID (0x84000003)2. uint32 target CPU (0x02)3. uint32 entry_point_address (in my case, a function called 'blink')4. uint32 context_d (0, but this is only a guess from what I've seen in the Linux kernel)
The outcome is very interesting: Core0 starts executing 'blink', instead of returning and leaving Core3 to execute it.
What am I overlooking?
(Edit: fixed contradicting cpu numbering)