[PATCH v2 0/7] Add trap-based ISA extension emulation
Anup Patel
anup at brainfault.org
Mon Dec 15 09:12:30 PST 2025
On Sat, Nov 15, 2025 at 2:09 AM Benedikt Freisen <b.freisen at gmx.net> wrote:
>
> This patch series seeks to add trap-based emulation functionality for various ISA extensions relevant to RVA22, RVB23 and RVA23.
> The emulation functionality contained herein has been demonstrated to e.g. allow the VisionFive 2's JH7110 to run software using the RVA22U64 and RVB23U64 profiles, allow the Orange Pi RV2's Ky X1 (a SpacemiT K1 derivative) to run Ubuntu 25.10 (RVA23U64) in a docker container, and allow the Tenstorrent Blackhole's SiFive X280 (Gen. 1) to boot into Ubuntu 25.10.
>
> This follow-up version incorporates the following changes:
>
> Patch 1 is the unmodified, reviewed patch v1 3.
> Patches 4 and 5 (previously patch v1 2) now include instruction mask generalizations and conditional compilation suggested by Radim Krčmář.
> Patches 6 and 7 (split from patch v1 5) add fine-grained Kconfig options per ISA extension for conditional compilation, as suggested by Inochi Amaoto.
> The CMO functionality in patch 6 now uses the new cache management library rather than separate ad-hoc code.
> The Supm implementation in patch 6 received bug fixes, but continues to feel somewhat untidy. Feel free to suggest better places for its functionality.
> Patch 7 (the Zvbb part of patch v1 5) adds the OPENSBI_CC_SUPPORT_VECTOR check requested by Xiang W, necessitating the Makefile bug fix in patch 2 in my cross-compilation environment.
>
> Greetings,
> Benedikt Freisen
>
> Benedikt Freisen (7):
> include: sbi: Make "s8" actually signed.
> Makefile: sensible default value for OPENSBI_CC_XLEN.
> include: sbi: Fix tab alignment.
> include: sbi: Ignore rs1 and rd fields in FENCE.TSO.
> lib: sbi: Workaround for FENCE(.I) errata on C906, C910.
> lib: sbi: ISA extension emulation.
> lib: sbi: ISA extension emulation (Zvbb).
I have merged PATCH1 to PATCH4 and PATCH5 has
a minor comment.
Regarding PATCH6 and PATCH7, my worry is that
this ISA extensions emulation will pretty soon become
redundant as more and more RVA23 HW shows up.
Also, existing non-RVA23 HW can always use
Ubuntu-25.04 (or older) and other distros as well.
My inclination is to not rush into merging PATCH6
and PATCH7. If required we can have experimental
branch in riscv/opensbi repo with these two patches.
Regards,
Anup
More information about the opensbi
mailing list