[Bug 1995080] [NEW] openSBI should emulate fence.tso for the D1 soc

Alexandre Ghiti 1995080 at bugs.launchpad.net
Fri Oct 28 08:35:28 UTC 2022


Public bug reported:

[ Impact ]

As reported in https://bugs.launchpad.net/ubuntu/+source/llvm-
defaults/+bug/1994071, clang triggers an illegal instruction trap and is
killed after it tries to execute a fence.tso instruction. This is a
known bug in the core of this soc, and a fix exists upstream which
consists in emulating this instruction in opensbi.

[ Test Plan ]

Patch opensbi with both commits c919f684d95f ("lib: sbi_illegal_insn:
Add emulation for fence.tso") and 51074432b233 ("lib: sbi_illegal_insn:
Fix FENCE.TSO emulation infinite trap loop"), rebuild a u-boot-nezha
package with this opensbi and install it on the nezha board. Finally
reboot, and just execute the following command:

$ clang --version

Which should output the current clang version and not get killed.

[ Where problems could occur ]

This could break opensbi on all the RISC-V boards, even though the
patches have been in upstream for a few months.

** Affects: llvm-defaults (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: opensbi (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: llvm-defaults (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to opensbi in Ubuntu.
https://bugs.launchpad.net/bugs/1995080

Title:
  openSBI should emulate fence.tso for the D1 soc

Status in llvm-defaults package in Ubuntu:
  New
Status in opensbi package in Ubuntu:
  New

Bug description:
  [ Impact ]

  As reported in https://bugs.launchpad.net/ubuntu/+source/llvm-
  defaults/+bug/1994071, clang triggers an illegal instruction trap and
  is killed after it tries to execute a fence.tso instruction. This is a
  known bug in the core of this soc, and a fix exists upstream which
  consists in emulating this instruction in opensbi.

  [ Test Plan ]

  Patch opensbi with both commits c919f684d95f ("lib: sbi_illegal_insn:
  Add emulation for fence.tso") and 51074432b233 ("lib:
  sbi_illegal_insn: Fix FENCE.TSO emulation infinite trap loop"),
  rebuild a u-boot-nezha package with this opensbi and install it on the
  nezha board. Finally reboot, and just execute the following command:

  $ clang --version

  Which should output the current clang version and not get killed.

  [ Where problems could occur ]

  This could break opensbi on all the RISC-V boards, even though the
  patches have been in upstream for a few months.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1995080/+subscriptions




More information about the foundations-bugs mailing list