[PATCH] lib: sbi: sse: add local unknown nmi event

dong wei weidong.wd at bytedance.com
Wed Oct 15 07:18:33 PDT 2025


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