[PATCH v3 0/6] Add RNMI handler infrastructure for Smrnmi extension

Evgeny Voevodin evvoevod at tenstorrent.com
Thu May 7 11:08:01 PDT 2026


This is v3 of the Smrnmi series. Based on upstream/master at commit
2257e9957103 ("lib: sbi_bitmap_test: add tests for bitmap_empty()").

v1 thread:
https://lore.kernel.org/opensbi/20260310183155.2186463-1-evvoevod@oss.tenstorrent.com/

v2 thread:
https://lore.kernel.org/opensbi/20260501211627.3293126-1-evvoevod@tenstorrent.com/

Changes vs v2:

- Split former patch 4 ("Create a spot ...") into two patches per
  Anup's review:
    * Patch 4 only moves sbi_platform_extensions_init() to the
      beginning of hart_detect_features().
    * Patch 5 moves Zkr stack-guard initialization out of fw_base.S
      into init_coldboot() in C, drops the asm
      __stack_chk_guard_init() helper.

Testing: Verified on Whisper SW system simulator and on HW emulator.

Evgeny Voevodin (6):
  include: sbi_scratch: Add tmp1 scratch space for RNMI context saving
  lib: sbi: Add Smrnmi extension macros for registers and bits
  firmware: Add RNMI handler infrastructure
  lib: sbi: hart: Move device tree features detection before trap-based
    checks
  lib: sbi: Move Zkr entropy initialization from fw_base.S to
    init_coldboot
  lib: sbi: hart: Detect and enable Smrnmi before trap-based feature
    detection

 firmware/fw_base.S           | 156 +++++++++++++++++++++++++++--------
 include/sbi/riscv_encoding.h |  10 +++
 include/sbi/sbi_hart.h       |   2 +
 include/sbi/sbi_platform.h   |   8 ++
 include/sbi/sbi_scratch.h    |  11 ++-
 include/sbi/sbi_trap.h       |   2 +
 lib/sbi/sbi_hart.c           |  37 +++++++--
 lib/sbi/sbi_init.c           |  31 +++++++
 lib/sbi/sbi_trap.c           |  39 +++++++++
 9 files changed, 254 insertions(+), 42 deletions(-)

-- 
2.43.0




More information about the opensbi mailing list