zatkh / sirius-tee

0 stars 0 forks source link

CPU 1-3 offline #3

Open MagnusS opened 4 years ago

MagnusS commented 4 years ago

It looks like only cpu0 is online after the custom kernel is booted:

rpi3b+, arm_64bit=1, raspbian 2020-02-13

[    0.005481] smp: Bringing up secondary CPUs ...
[    1.040638] CPU1: failed to come online
[    2.081371] CPU2: failed to come online
[    3.122112] CPU3: failed to come online

rpi3b, arm_64bit=1, raspbian 2020-02-13

[    0.005474] smp: Bringing up secondary CPUs ...
[    1.040640] CPU1: failed to come online
[    2.081369] CPU2: failed to come online
[    3.122110] CPU3: failed to come online

rpi3b, arm_64bit not set (older image), raspbian 2019-07-10

[    0.005461] smp: Bringing up secondary CPUs ...
[    1.040637] CPU1: failed to come online
[    2.081370] CPU2: failed to come online
[    3.122109] CPU3: failed to come online
MagnusS commented 4 years ago

I think the kernel may need to be compiled with PSCI support, see https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/plat/rpi3.rst#secondary-cores

There's a patch here that looks promising (MIT license on the repo) https://github.com/AntonioND/rpi3-arm-tf-bootstrap/blob/master/0001-rpi3-Enable-PSCI-support.patch

MagnusS commented 4 years ago

I applied the patch, but it didn't work directly as we're not using bcmrpi_defconfig -- I added the necessary options to bcm2709_defconfig instead and all cores are now online:

[    0.005562] smp: Bringing up secondary CPUs ...
[    0.019262] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.033060] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.046792] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.046916] smp: Brought up 1 node, 4 CPUs