OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add trap-based ISA extension emulation
@ 2025-10-26 20:21 Benedikt Freisen
  2025-10-26 20:21 ` [PATCH 1/5] include: sbi: Fix tab alignment Benedikt Freisen
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Benedikt Freisen @ 2025-10-26 20:21 UTC (permalink / raw)
  To: opensbi

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.

The first patch merely fixes the tab alignment in riscv_encoding.h.

The second patch adds workarounds for decoder bugs in the C906 and C910, where FENCE and FENCE.I instructions with nonzero reserved fields are mistakenly treated as illegal instructions.

The third patch corrects the typedef of "s8" from "char" to "signed char", because "char" is implicitly unsigned on RISC-V.

To me, personally, these three look like uncontroversial improvements.

The fourth patch, the big one, adds the actual ISA extension emulation code.
For initial consideration, I am hereby submitting it "as-is", mainly to see whether there is even interest in having this kind of functionality in mainline OpenSBI.
If that turns out to be the case, this patch will need further iterations that, aside from incorporating your feedback, e.g. add configuration options for conditional compilation.

The fifth patch is included for documentary purposes only, not for merging.
It contains the section of my fork's README file that explains which extensions can be emulated. The information therein could also go somewhere else.


-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-11-11  3:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-26 20:21 [PATCH] Add trap-based ISA extension emulation Benedikt Freisen
2025-10-26 20:21 ` [PATCH 1/5] include: sbi: Fix tab alignment Benedikt Freisen
2025-10-26 20:21 ` [PATCH 2/5] lib: sbi: Workaround for FENCE(.I) errata on C906, C910 Benedikt Freisen
2025-10-27 11:16   ` Radim Krčmář
2025-10-26 20:21 ` [PATCH 3/5] include: sbi: Make "s8" actually signed Benedikt Freisen
2025-10-27 11:18   ` Radim Krčmář
2025-10-26 20:21 ` [PATCH 4/5] lib: sbi: ISA extension emulation Benedikt Freisen
2025-10-27 22:41   ` Inochi Amaoto
2025-10-30  2:51   ` Xiang W
2025-10-26 20:21 ` [PATCH 5/5] doc: Add isa-ext-emu documentation block to README Benedikt Freisen
2025-10-27 10:02 ` [PATCH] Add trap-based ISA extension emulation Xiang W
2025-10-27 11:09   ` Benedikt Freisen
2025-10-27 22:56 ` Bo Gan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox