[U-Boot] [sunxi/sun7i] ARMv7 SVC mode: PSCI not loaded and only 1st CPU core gets activated

Hi,
when building u-boot for ARMv7 with these settings for SVC mode (ie. "Secure Mode"), instead of HYPervisor mode:
ARM architecture ---> ... [*] Enable support for booting in non-secure mode [*] Boot in secure mode by default [ ] Enable support for hardware virtualization [*] Enable PSCI support (2) Maximum supported CPUs for PSCI [ ] Use LPAE page table format ...
then only the first CPU core gets activated.
How to bring the other core(s) online?
I tried this from https://www.kernel.org/doc/html/v5.0/core-api/cpu_hotplug.html :
# echo 1 > /sys/devices/system/cpu/cpu1/online bash: /sys/devices/system/cpu/cpu1/online: Permission denied
(actually there is no "online" entry under cpu1, but also not under cpu0. Attached is the tree under /sys/devices/system/cpu/ )
# # Automatically generated file; DO NOT EDIT. # U-Boot 2019.04-rc4 Configuration ... CONFIG_SYS_ARCH="arm" CONFIG_SYS_CPU="armv7" CONFIG_SYS_SOC="sunxi" CONFIG_SYS_BOARD="sunxi" CONFIG_SYS_CONFIG_NAME="sun7i" ... CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1" ...
# uname -a Linux r1-3 5.0.5 #1 SMP Sat Mar 30 05:34:40 CET 2019 armv7l GNU/Linux
kernel conf has CONFIG_HOTPLUG_CPU=y
# dmesg | grep -i "smp|psci|started in" [ 0.000000] Linux version 5.0.5 (u-ps@c22-local) (gcc version 9.0.1 20190326 (experimental) [trunk revision 269955] (GCC)) #1 SMP Sat Mar 30 05:34:40 CET 2019 [ 0.004154] smp: Bringing up secondary CPUs ... [ 0.004753] smp: Brought up 1 node, 1 CPU [ 0.004766] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 0.004772] CPU: All CPU(s) started in SVC mode.
(ie. this means that PSCI is not loaded b/c otherwise there would be some "psci" lines in the log)
# lscpu Architecture: armv7l Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0 Off-line CPU(s) list: 1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 1 Model name: ARMv7 Processor rev 4 (v7l) CPU max MHz: 960.0000 CPU min MHz: 144.0000
See also: --------- http://linux-sunxi.org/PSCI https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/psci.txt
According to this page https://falstaff.agner.ch/2016/07/03/u-bootlinux-and-hyp-mode-on-armv7/ it seems in older u-boot versions it did activate all CPUs in SVC mode: " Brought up 2 CPUs SMP: Total of 2 processors activated (96.00 BogoMIPS). CPU: All CPU(s) started in SVC mode. "
participants (1)
-
U.Mutlu