[PATCH] lib: sbi: sse: add local unknown nmi event
Atish Patra
atish.patra at linux.dev
Thu Oct 30 01:51:25 PDT 2025
On 10/30/25 1:20 AM, dong wei wrote:
> May I ask if there are any updates to the comments on this patch? The
> unknown nmi event has practical application scenarios for RISC-V
> servers.
>
The corresponding Linux kernel patches doesn't match this. We need to
hash out the event IDs and then decide the process to merge this to SBI
spec.
It should be okay to merge this in OpenSBI as an experimental feature
after that.
Do you have a PoC on how this is hooked up to a platform NMI event ?
> On Wed, Oct 15, 2025 at 10:18 PM dong wei <weidong.wd at bytedance.com> wrote:
>>
>> Add more reviewers.
>>
>> On Tue, Oct 14, 2025 at 1:54 PM weidongwd <weidong.wd at bytedance.com> wrote:
>>>
>>> Add the id of local unknown nmi event and add this event to the
>>> list of supported events.
>>>
>>> Signed-off-by: weidongwd <weidong.wd at 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
>>>
>
More information about the opensbi
mailing list