Palmer Dabbelt <[email protected]> 於 2026年11月5日週四 下午11:48寫道:
>
> On Wed, 04 Nov 2026 20:20:30 PST (-0800), [email protected] wrote:
> > This series adds a way to fix errata for specific cores, and adds the
> > first erratum.
> >
> > Patch 1 adds the framework, with no errata yet:
> >
> > - riscv-errata.def lists the errata.  Each one has a -mfix-NAME option.
> > - RISCV_CORE_ERRATUM in riscv-cores.def lists the errata of a core.
> > - --with-errata=LIST turns on workarounds by default.
> >
> > Patch 2 adds -mfix-sifive-mal-9174, which is on by default for
> > sifive-p870-d.  It keeps the destination of a vector indexed load from
> > overlapping its index.  The code does not change when it is off.
> >
> > I plan to backport this series to GCC 16.
> >
> > Tested with QEMU and our p870 bigsky board.
>
> So you're planning on shipping the chips with the errata on boards that
> make it outside SiFive?

(shrug) what I can tell is: we/SiFive decide to publish errata
fix to GCC and LLVM[1].

[1] https://github.com/llvm/llvm-project/pull/224739

>  If that's the case we probably want workarounds
> for this all over the place: at least something to plumb it through the
> Linux errata frameworks so userspace can see they're running on one of
> these systems, which we should probably hook into something like
> -march=native so that keeps working.

It should be enough for current -mcpu detection,
it can detected by mvendorid/marchid/mimplid

> We could probably also detect this
> case during trap handling in Linux and show some sort of warning, which
> would help users find bugs more quickly.

I will leave this to our linux kernel folk to deal, and yeah, they
(SiFive linux kernel folks) fully aware this errata.

> I don't think we need to block this on the rest of that support, though.
> Having the codegen in is the hard part, the rest is just cosmetic.

Reply via email to