On 11/18/26 3:36 AM, Kito Cheng 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_ERRATUM_ALIAS gives an erratum a second name.
- 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.
SiFive tracks this erratum as both MAL-9174 and MAL-9191, so
-mfix-sifive-mal-9191 is an alias.

Changes since v1:

- Rebase.
- Add -mfix-sifive-mal-9191 as an alias of -mfix-sifive-mal-9174, and
   RISCV_ERRATUM_ALIAS so that --with-errata also takes the alias.
- -mcpu=native now turns on the workarounds of the detected core,
   since the driver also passes -mcpu=<core> after r17-6379
   ("RISC-V: Pass the detected core with -mcpu=native").

I plan to backport this series to GCC 16.  GCC 16 also needs the commit
that adds sifive-p870-d (r17-3579).

Tested with QEMU and our p870 bigsky board.

Kito Cheng (2):
   RISC-V: Add per-CPU errata framework
   RISC-V: Work around SiFive erratum MAL-9174/MAL-9191
I'm assuming you'll self-approve this series when you're ready.

jeff

Reply via email to