riscv-software-src / riscv-software-src/opensbi

Issue when hartid are not contiguous on OpenSBI V1.6

Open
#399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

With the same Linux binary (version 6.12.4), I tried non contiguous hartid like
Domain0 HARTs : 1*,3*,4*,6*

I have 8 harts in total. In DTS, hart 0,2,5,7 are set to status = "disabled" and hart 1,3,4,6 are set to status = "okay";

With OpenSBI V1.4 binary, it works fine. Linux boot and I reach my console.

# cat /proc/cpuinfo 
processor       : 0
hart            : 1
...
processor       : 1
hart            : 3
...
processor       : 2
hart            : 4
..
processor       : 3
hart            : 6
...

With OpenSBI V1.6 binary and the same Linux binary, it doesn't work. I can't reach my console and I have :

[    0.407557] smp: Bringing up secondary CPUs ...
[    1.745985] CPU2: failed to come online
[    3.027751] CPU3: failed to come online
[    3.045007] smp: Brought up 1 node, 2 CPUs
[    3.125504] Memory: 1951960K/2053120K available (6568K kernel code, 875K rwdata, 1908K rodata, 381K init, 325K bss, 98824K 
reserved, 0K cma-reserved)
[    3.209208] devtmpfs: initialized
[    3.414185] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    3.422756] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    3.452102] DMI not present or invalid.
[    3.469151] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[   67.975123] BUG: workqueue lockup - pool cpus=1 node=0 flags=0x2 nice=0 stuck for 57s!
[   67.998381] Showing busy workqueues and worker pools:
[   68.009157] workqueue events: flags=0x0
[   68.019307]   pwq 6: cpus=1 node=0 flags=0x2 nice=0 active=1 refcnt=3
[   68.023121]     pending: check_unaligned_access_emulated BAR(1)
[   68.061845] workqueue mm_percpu_wq: flags=0x8
[   68.072940]   pwq 6: cpus=1 node=0 flags=0x2 nice=0 active=1 refcnt=2
[   68.073633]     pending: vmstat_update
[   68.074975] pool 6: cpus=1 node=0 flags=0x2 nice=0 hung=57s workers=1 manager: 23
[   68.076563] Showing backtraces of running workers in stalled CPU-bound worker pools:
[  101.036697] BUG: workqueue lockup - pool cpus=1 node=0 flags=0x2 nice=0 stuck for 87s!
[  101.045597] Showing busy workqueues and worker pools:
[  101.051464] workqueue events: flags=0x0
[  101.055275]   pwq 6: cpus=1 node=0 flags=0x2 nice=0 active=1 refcnt=3
[  101.055707]     pending: check_unaligned_access_emulated BAR(1)
[  101.056055] workqueue mm_percpu_wq: flags=0x8
... display always the same error and never boot ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing OpenSBI v1.4 and v1.6 behavior for the reported non-contiguous hart IDs, using the DTS configuration and Linux SMP boot log in the issue. Done means all four enabled harts (1, 3, 4, and 6) come online and Linux reaches the console with OpenSBI v1.6.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.