TH1520: broken CPU count detection
Greetings,
For the Yocto meta-riscv layer, we're trying to replace the downstream opensbi (called opensbi-revyos) by mainline opensbi:
https://github.com/riscv/meta-riscv/pull/685/
The board boots fine, but unfortunately, only 1 CPU core is detected. This surfaces in the Linux kernel log:
[ 0.089851] smp: Bringing up secondary CPUs ... [ 10.165542] CPU1 failed to report alive state [ 20.241632] CPU2 failed to report alive state [ 30.316980] CPU3 failed to report alive state
Any tips for solving this issue?
Thanks in advance
Cheers
Michael
Signature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi
Quoted 6 lines · Michael Opdenacker
Greetings,
For the Yocto meta-riscv layer, we're trying to replace the downstream opensbi (called opensbi-revyos) by mainline opensbi:
https://github.com/riscv/meta-riscv/pull/685/
Quoted 7 lines
The board boots fine, but unfortunately, only 1 CPU core is detected. This surfaces in the Linux kernel log:
[ 0.089851] smp: Bringing up secondary CPUs ... [ 10.165542] CPU1 failed to report alive state [ 20.241632] CPU2 failed to report alive state [ 30.316980] CPU3 failed to report alive state
What Linux kernel are you using?
Quoted 10 lines
Any tips for solving this issue?
Thanks in advance
Cheers
MichaelSignature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi
Signature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi
Hi Yao
Quoted 7 lines · Yao Zi
Quoted 6 lines · Michael Opdenacker
Greetings,
For the Yocto meta-riscv layer, we're trying to replace the downstream opensbi (called opensbi-revyos) by mainline opensbi:
https://github.com/riscv/meta-riscv/pull/685/
Quoted 8 lines
Quoted 7 lines
The board boots fine, but unfortunately, only 1 CPU core is detected. This surfaces in the Linux kernel log:
[ 0.089851] smp: Bringing up secondary CPUs ... [ 10.165542] CPU1 failed to report alive state [ 20.241632] CPU2 failed to report alive state [ 30.316980] CPU3 failed to report alive state
What Linux kernel are you using?
I'm using mainline Linux 7.2.x.
Is this something Linux can manage?
Thanks
Michael
Signature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi
Quoted 13 lines · Michael Opdenacker
Hi Yao
Quoted 10 lines · Yao Zi
Quoted 9 lines · Michael Opdenacker
Greetings,
For the Yocto meta-riscv layer, we're trying to replace the downstream opensbi (called opensbi-revyos) by mainline opensbi:
https://github.com/riscv/meta-riscv/pull/685/The board boots fine, but unfortunately, only 1 CPU core is detected. This surfaces in the Linux kernel log:
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
[ 0.089851] smp: Bringing up secondary CPUs ... [ 10.165542] CPU1 failed to report alive state [ 20.241632] CPU2 failed to report alive state [ 30.316980] CPU3 failed to report alive state
What Linux kernel are you using?
I'm using mainline Linux 7.2.x.
Is this something Linux can manage?
Okay, I guess I should have more sleep when writing this reply. I was meant to ask the U-Boot you're using.
The problem is that, mainline OpenSBI doesn't have the ability to bring CPU cores out of reset, while T-Head's original vendor U-Boot doesn't, either, and relies on OpenSBI to do the stuff (iirc through a devicetree node called "reset-sample" or similar).
So if you're working with T-Head's original U-Boot but with mainline OpenSBI, then there's no one bringing secondary cores up.
RevyOS' fork of T-Head's U-Boot[1] implements bringing up logic, too, so it works with mainline OpenSBI. So does mainline U-Boot.
Quoted 2 lines
Thanks
Michael
[1]: https://github.com/revyos/th1520-vendor-uboot/blob/th1520/arch/riscv/lib/bootm.c
Signature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Michael Opdenacker
As you predicted, the issue detecting the number of CPU cores is gone. I'm preparing a meta-riscv layer update for Yocto to automate all this.
FYI, these are now supported by Yocto's meta-riscv for the BeagleV Ahead board:
https://github.com/riscv/meta-riscv/blob/master/docs/BeagleV-Ahead.md
We also have a pull-request under review for LicheePI 4A, with mainline DDR training, OpenSBI, U-Boot and Linux:
https://github.com/riscv/meta-riscv/pull/698
Thanks again!
Michael.
Signature · 9 lines
Root Commit Embedded Linux Training and Consulting. Yocto Ambassador. https://rootcommit.com -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi