OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib: sbi: sse: add local unknown nmi event
@ 2025-10-14  5:53 weidongwd
  2025-10-15 14:18 ` dong wei
  0 siblings, 1 reply; 5+ messages in thread
From: weidongwd @ 2025-10-14  5:53 UTC (permalink / raw)
  To: opensbi; +Cc: cuiyunhui, heshuan, weidongwd

Add the id of local unknown nmi event and add this event to the
list of supported events.

Signed-off-by: weidongwd <weidong.wd@bytedance.com>
---
 include/sbi/sbi_ecall_interface.h | 3 ++-
 lib/sbi/sbi_sse.c                 | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
index af7a05a..8bb0d39 100644
--- a/include/sbi/sbi_ecall_interface.h
+++ b/include/sbi/sbi_ecall_interface.h
@@ -436,7 +436,8 @@ enum sbi_sse_state {
 
 /* Range 0xffff0000 - 0xffffffff */
 #define SBI_SSE_EVENT_LOCAL_SOFTWARE		0xffff0000
-#define SBI_SSE_EVENT_LOCAL_RESERVED_3_START	0xffff0001
+#define SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI		0xffff0001
+#define SBI_SSE_EVENT_LOCAL_RESERVED_3_START	0xffff0002
 #define SBI_SSE_EVENT_LOCAL_RESERVED_3_END	0xffff3fff
 #define SBI_SSE_EVENT_LOCAL_PLAT_3_START	0xffff4000
 #define SBI_SSE_EVENT_LOCAL_PLAT_3_END		0xffff7fff
diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c
index 986b770..e771efe 100644
--- a/lib/sbi/sbi_sse.c
+++ b/lib/sbi/sbi_sse.c
@@ -182,9 +182,14 @@ struct sse_event_info global_software_event = {
 	SBI_SLIST_NODE_INIT(NULL),
 };
 
+struct sse_event_info local_unknown_nmi_event = {
+	.event_id = SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI,
+	SBI_SLIST_NODE_INIT(&global_software_event),
+};
+
 struct sse_event_info local_software_event = {
 	.event_id = SBI_SSE_EVENT_LOCAL_SOFTWARE,
-	SBI_SLIST_NODE_INIT(&global_software_event),
+	SBI_SLIST_NODE_INIT(&local_unknown_nmi_event),
 };
 
 static SBI_SLIST_HEAD(supported_events, sse_event_info) =
@@ -202,6 +207,7 @@ static const uint32_t standard_events[] = {
 	SBI_SSE_EVENT_LOCAL_LOW_PRIO_RAS,
 	SBI_SSE_EVENT_GLOBAL_LOW_PRIO_RAS,
 	SBI_SSE_EVENT_LOCAL_SOFTWARE,
+	SBI_SSE_EVENT_LOCAL_UNKNOWN_NMI,
 	SBI_SSE_EVENT_GLOBAL_SOFTWARE,
 };
 
-- 
2.20.1


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

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14  5:53 [PATCH] lib: sbi: sse: add local unknown nmi event weidongwd
2025-10-15 14:18 ` dong wei
2025-10-30  8:20   ` dong wei
2025-10-30  8:51     ` Atish Patra
2025-11-03  8:15       ` [External] " dong wei

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