[PATCH 0/7] Add RISC-V Smrnmi extension support
Anup Patel
anup at brainfault.org
Thu Apr 9 01:26:49 PDT 2026
On Thu, Apr 2, 2026 at 9:53 PM Evgeny Voevodin <evvoevod at tenstorrent.com> wrote:
>
> In order to make it move faster, would it be more convenient if I send a patch set which doesn't depend on Tenstorrent platform and only has generic part of the Smrnmi support? Tenstorrent platform part can be submitted later as a separate patch set.
Yes, lets have generic Smrnmi support patches only in
this series. The tenstorrent platform patches can be part
the series which adds tenstorrent platform support.
Regards,
Anup
>
>
> On Tue, Mar 10, 2026 at 11:33 AM Evgeny Voevodin <evvoevod at tenstorrent.com> wrote:
>>
>> From: Evgeny Voevodin <evvoevod at tenstorrent.com>
>>
>> This patch series implements support for the RISC-V Smrnmi (Resumable
>> Non-Maskable Interrupts) extension in OpenSBI.
>>
>> This series is based on top of the Tenstorrent Atlantis platform patch series:
>> https://lore.kernel.org/opensbi/20260310005000.3837512-1-npiggin@gmail.com/T/#t
>>
>> The Smrnmi extension provides:
>> - Resumable NMI (RNMI) support with dedicated MNEPC/MNSTATUS/MNCAUSE CSRs
>> - Resumable NMI Exception (RNME) handling for traps occurring with NMIE=0
>> - Implementation-defined NMI vector locations via NMIVEC/NMEVEC
>>
>> Key implementation details:
>> - Adds infrastructure for RNMI/RNME handlers in firmware assembly (fw_base.S)
>> - Provides platform callback interface for custom NMI handler installation
>> - Detects and enables Smrnmi early, before trap-based feature detection
>> - Ensures trap-based CSR probing works correctly with NMIs enabled
>> - Adds stub handler for Tenstorrent Atlantis platform
>>
>> Testing: Verified on virtual Whisper platform.
>>
>> Evgeny Voevodin (7):
>> include: sbi_scratch: Add tmp1 scratch space for RNMI context saving
>> lib: sbi: Add Smrnmi extension macros for registers and bits
>> firmware: Add RNMI/RNME handler infrastructure
>> lib: sbi: Introduce smrnmi_handlers_init() callback for platform code
>> lib: sbi: hart: Detect and enable Smrnmi before trap-based feature
>> detection
>> platform: tenstorrent: ascalon: Introduce Smrnmi handlers init
>> callback
>> platform: tenstorrent: Add Smrnmi support for Atlantis
>>
>> firmware/fw_base.S | 159 +++++++++++++++++-
>> include/sbi/riscv_encoding.h | 10 ++
>> include/sbi/sbi_hart.h | 2 +
>> include/sbi/sbi_platform.h | 18 ++
>> include/sbi/sbi_scratch.h | 11 +-
>> include/sbi/sbi_trap.h | 4 +
>> lib/sbi/sbi_hart.c | 35 +++-
>> lib/sbi/sbi_trap.c | 70 ++++++++
>> .../generic/include/tenstorrent/ascalon.h | 10 ++
>> platform/generic/tenstorrent/ascalon.c | 11 ++
>> platform/generic/tenstorrent/atlantis.c | 16 ++
>> 11 files changed, 336 insertions(+), 10 deletions(-)
>>
>> --
>> 2.43.0
>>
More information about the opensbi
mailing list