Hi,
LS1043A supports two mode: 64-bit mode and 32-bit compatibility mode.
I have verified PSCI functions on 64-bit mode, everything goes fine.
Below is two examples (using pseudo code)
move x0, 0x84000000
smc 0
Then I got result x0 = 0x00000002, means the PSCI version is 0.2
move x0, 0xc4000003
move x1, cpuId
move x2, imageEntry
smc 0
Then I got result x0 = 0x0, and secondary core is up
But When I run the CPU on 32 bit compatibility mode (el1 is running on 32-bit), I found the two examples can not work at all. Code is like this:
move r0, 0x84000000
smc 0
Then I got result r0 = 0x84000000
move r0, 0x84000003
move r1, cpuId
move r2, imageEntry
smc 0
Then I got result r0 = 0x84000003, and secondary core is not up at all
The test env is:
Here my question is:
1. does my above test approves that PPA support smc command from a 32-bit core?
2. if no, can you please share me the correct way to use PSCI?
3. if yes, is there a workaround to boot up a secondary core without using smc command?
Thanks.
>1. does my above test approves that PPA support smc command from a 32-bit core?
>2. if no, can you please share me the correct way to use PSCI?
>
[Platon] It is not possible to tell what is wrong with your code without stepping through it in a debugger. Make sure you are using the most recent PPA binary and see how 32-bit Linux invokes PSCI calls in the following kernel source files:
arch/arm/kernel/psci-call.S
arch/arm/kernel/psci.c
arch/arm/kernel/psci_smp.c
>3.Is there a workaround to boot up a secondary core without using smc command?
[Platon] See how PPA does it in soc.c. Refer to LS1043ARM, Sections 12.3.15 and 11.3.54 for more
information. If you are doing it directly from your code, PPA should not be loaded/initialized.
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------