opensbi icon indicating copy to clipboard operation
opensbi copied to clipboard

Firmware SMP boot bug

Open ezelioli opened this issue 1 year ago • 5 comments

The cold-boot-hart lottery in fw_base.S has recently been modified by using the _boot_status variable instead of the _relocate_lottery variable. This introduces a data race since the _boot_status variable is also written by the cold-boot hart to indicate the current boot stage without waiting for the other cores to have completed the lottery. If a non-boot hart enters the lottery when the boot-hart has already completed relocation _boot_status is overwritten and the non-boot hart is stuck forever in _wait_for_boot_hart. The change has been introduced in this commit.

ezelioli avatar May 10 '24 21:05 ezelioli

Can you send a patch to fix this?

avpatel avatar May 12 '24 08:05 avpatel

We have mailing list based patch review so it would be great if you can send these patchs to OpenSBI mailing list.

You need to join OpenSBI mailing list using following link http://lists.infradead.org/mailman/listinfo/opensbi

Make sure you use "git send-email" to send the patches.

Regards, Anup

avpatel avatar May 12 '24 08:05 avpatel

Patch here: https://lists.infradead.org/pipermail/opensbi/2024-September/007375.html

Regards, Xiang W

wxjstz avatar Sep 20 '24 09:09 wxjstz

The patch fixes the firmware SMP boot bug. Was this patch applied to the fw_base.S file, and if so, in which version or commit?

rejsys avatar Dec 11 '24 13:12 rejsys

Fixes: 8151105af5e4 ("firmware: fw_base.S: Remove _relocate_lottery")

wxjstz avatar Dec 11 '24 13:12 wxjstz