[PATCH 0/4] RISC-V SBI watchdog support
Prajwal N
prajwal.n at oss.qualcomm.com
Fri Oct 2 01:30:36 PDT 2026
This series introduces support for the RISC-V SBI watchdog extension,
which provides the watchdog functionality for the Supervisor software.
The SBI watchdog extension exposes watchdog functionality including
start, stop, pat, read and write attributes to the S-mode software via
SBI calls. The extension manages the watchdog timer in M-mode using the
system timer.
The S-mode software can also optionally subscribe for
watchdog pretimeout notification which is delivered as a Message
Signaled Interrupt (MSI) before the current watch period expires.
On watchdog expiry, a platform system reset is triggered.
The series consists of the following changes:
- Patch 1 adds helper function to convert timer tick delta to a
specified time unit and a wrapper to convert the time tick to
microsecond.
- Patch 2 adds the SBI watchdog extension ID and function IDs
for supported operations, including start, stop, pat, and
atrribute read and write.
- Patch 3 implements the SBI watchdog functionality including
start, stop, pat, read and write attributes, pretimeout and
timeout handlers.
- Patch 4 implements ecall handler functionality to delegate
the ecall to SBI watchdog framework
Prajwal N (4):
lib: sbi: Add timer tick to time conversion helper
include: sbi: Add SBI watchdog extension definitions
lib: sbi: Add SBI watchdog framework
lib: sbi: Add ecall handler for SBI watchdog
include/sbi/sbi_ecall_interface.h | 33 +++
include/sbi/sbi_timer.h | 12 +
include/sbi/sbi_wdt.h | 72 +++++
lib/sbi/Kconfig | 4 +
lib/sbi/objects.mk | 4 +
lib/sbi/sbi_ecall_wdt.c | 79 ++++++
lib/sbi/sbi_init.c | 8 +
lib/sbi/sbi_timer.c | 5 +
lib/sbi/sbi_wdt.c | 455 ++++++++++++++++++++++++++++++
9 files changed, 672 insertions(+)
create mode 100644 include/sbi/sbi_wdt.h
create mode 100644 lib/sbi/sbi_ecall_wdt.c
create mode 100644 lib/sbi/sbi_wdt.c
--
2.43.0
More information about the opensbi
mailing list