Skip to contentSkip to conversation

TH1520: broken CPU count detection

DISCUSSION Michael Opdenacker 2 participants 5 messages Sep 15 – Sep 28 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
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
Michael

Signature · 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
#2 lore raw

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
#3 lore raw
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
#5 lore raw
In reply to a message not in the archive
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