Message ID | 20201125051647.295472-2-anup.patel@wdc.com |
---|---|
State | Accepted |
Headers | show |
Series | Implement System Reset (SRST) SBI extension | expand |
On Wed, 2020-11-25 at 10:46 +0530, Anup Patel wrote: > We extend the SBI ecall interface header for the SBI SRST extension > recently accepted in SBI specification v0.3-draft. > > Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > include/sbi/sbi_ecall_interface.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/sbi/sbi_ecall_interface.h > b/include/sbi/sbi_ecall_interface.h > index af30500..002c6f9 100644 > --- a/include/sbi/sbi_ecall_interface.h > +++ b/include/sbi/sbi_ecall_interface.h > @@ -27,6 +27,7 @@ > #define SBI_EXT_IPI 0x735049 > #define SBI_EXT_RFENCE 0x52464E43 > #define SBI_EXT_HSM 0x48534D > +#define SBI_EXT_SRST 0x53525354 > > /* SBI function IDs for BASE extension*/ > #define SBI_EXT_BASE_GET_SPEC_VERSION 0x0 > @@ -62,6 +63,17 @@ > #define SBI_HSM_HART_STATUS_START_PENDING 0x2 > #define SBI_HSM_HART_STATUS_STOP_PENDING 0x3 > > +/* SBI function IDs for SRST extension */ > +#define SBI_EXT_SRST_RESET 0x0 > + > +#define SBI_SRST_RESET_TYPE_SHUTDOWN 0x0 > +#define SBI_SRST_RESET_TYPE_COLD_REBOOT 0x1 > +#define SBI_SRST_RESET_TYPE_WARM_REBOOT 0x2 > +#define > SBI_SRST_RESET_TYPE_LAST SBI_SRST_RESET_TYPE_WARM_REBOOT > + > +#define SBI_SRST_RESET_REASON_NONE 0x0 > +#define SBI_SRST_RESET_REASON_SYSFAIL 0x1 > + > #define SBI_SPEC_VERSION_MAJOR_OFFSET 24 > #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f > #define SBI_SPEC_VERSION_MINOR_MASK 0xffffff
On Tue, Nov 24, 2020 at 9:17 PM Anup Patel <anup.patel@wdc.com> wrote: > > We extend the SBI ecall interface header for the SBI SRST extension > recently accepted in SBI specification v0.3-draft. > > Signed-off-by: Anup Patel <anup.patel@wdc.com> > --- > include/sbi/sbi_ecall_interface.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h > index af30500..002c6f9 100644 > --- a/include/sbi/sbi_ecall_interface.h > +++ b/include/sbi/sbi_ecall_interface.h > @@ -27,6 +27,7 @@ > #define SBI_EXT_IPI 0x735049 > #define SBI_EXT_RFENCE 0x52464E43 > #define SBI_EXT_HSM 0x48534D > +#define SBI_EXT_SRST 0x53525354 > > /* SBI function IDs for BASE extension*/ > #define SBI_EXT_BASE_GET_SPEC_VERSION 0x0 > @@ -62,6 +63,17 @@ > #define SBI_HSM_HART_STATUS_START_PENDING 0x2 > #define SBI_HSM_HART_STATUS_STOP_PENDING 0x3 > > +/* SBI function IDs for SRST extension */ > +#define SBI_EXT_SRST_RESET 0x0 > + > +#define SBI_SRST_RESET_TYPE_SHUTDOWN 0x0 > +#define SBI_SRST_RESET_TYPE_COLD_REBOOT 0x1 > +#define SBI_SRST_RESET_TYPE_WARM_REBOOT 0x2 > +#define SBI_SRST_RESET_TYPE_LAST SBI_SRST_RESET_TYPE_WARM_REBOOT > + > +#define SBI_SRST_RESET_REASON_NONE 0x0 > +#define SBI_SRST_RESET_REASON_SYSFAIL 0x1 > + > #define SBI_SPEC_VERSION_MAJOR_OFFSET 24 > #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f > #define SBI_SPEC_VERSION_MINOR_MASK 0xffffff > -- > 2.25.1 > > > -- > opensbi mailing list > opensbi@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/opensbi Reviewed-by: Atish Patra <atish.patra@wdc.com>
> -----Original Message----- > From: Atish Patra <atishp@atishpatra.org> > Sent: 01 December 2020 13:13 > To: Anup Patel <Anup.Patel@wdc.com> > Cc: Atish Patra <Atish.Patra@wdc.com>; Alistair Francis > <Alistair.Francis@wdc.com>; Anup Patel <anup@brainfault.org>; OpenSBI > <opensbi@lists.infradead.org> > Subject: Re: [PATCH v3 1/5] include: sbi: Add SBI SRST extension related > defines > > On Tue, Nov 24, 2020 at 9:17 PM Anup Patel <anup.patel@wdc.com> wrote: > > > > We extend the SBI ecall interface header for the SBI SRST extension > > recently accepted in SBI specification v0.3-draft. > > > > Signed-off-by: Anup Patel <anup.patel@wdc.com> > > --- > > include/sbi/sbi_ecall_interface.h | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/include/sbi/sbi_ecall_interface.h > > b/include/sbi/sbi_ecall_interface.h > > index af30500..002c6f9 100644 > > --- a/include/sbi/sbi_ecall_interface.h > > +++ b/include/sbi/sbi_ecall_interface.h > > @@ -27,6 +27,7 @@ > > #define SBI_EXT_IPI 0x735049 > > #define SBI_EXT_RFENCE 0x52464E43 > > #define SBI_EXT_HSM 0x48534D > > +#define SBI_EXT_SRST 0x53525354 > > > > /* SBI function IDs for BASE extension*/ > > #define SBI_EXT_BASE_GET_SPEC_VERSION 0x0 > > @@ -62,6 +63,17 @@ > > #define SBI_HSM_HART_STATUS_START_PENDING 0x2 > > #define SBI_HSM_HART_STATUS_STOP_PENDING 0x3 > > > > +/* SBI function IDs for SRST extension */ > > +#define SBI_EXT_SRST_RESET 0x0 > > + > > +#define SBI_SRST_RESET_TYPE_SHUTDOWN 0x0 > > +#define SBI_SRST_RESET_TYPE_COLD_REBOOT 0x1 > > +#define SBI_SRST_RESET_TYPE_WARM_REBOOT 0x2 > > +#define SBI_SRST_RESET_TYPE_LAST > SBI_SRST_RESET_TYPE_WARM_REBOOT > > + > > +#define SBI_SRST_RESET_REASON_NONE 0x0 > > +#define SBI_SRST_RESET_REASON_SYSFAIL 0x1 > > + > > #define SBI_SPEC_VERSION_MAJOR_OFFSET 24 > > #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f > > #define SBI_SPEC_VERSION_MINOR_MASK 0xffffff > > -- > > 2.25.1 > > > > > > -- > > opensbi mailing list > > opensbi@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/opensbi > > > Reviewed-by: Atish Patra <atish.patra@wdc.com> Applied this patch to the riscv/opensbi repo Regards, Anup
diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h index af30500..002c6f9 100644 --- a/include/sbi/sbi_ecall_interface.h +++ b/include/sbi/sbi_ecall_interface.h @@ -27,6 +27,7 @@ #define SBI_EXT_IPI 0x735049 #define SBI_EXT_RFENCE 0x52464E43 #define SBI_EXT_HSM 0x48534D +#define SBI_EXT_SRST 0x53525354 /* SBI function IDs for BASE extension*/ #define SBI_EXT_BASE_GET_SPEC_VERSION 0x0 @@ -62,6 +63,17 @@ #define SBI_HSM_HART_STATUS_START_PENDING 0x2 #define SBI_HSM_HART_STATUS_STOP_PENDING 0x3 +/* SBI function IDs for SRST extension */ +#define SBI_EXT_SRST_RESET 0x0 + +#define SBI_SRST_RESET_TYPE_SHUTDOWN 0x0 +#define SBI_SRST_RESET_TYPE_COLD_REBOOT 0x1 +#define SBI_SRST_RESET_TYPE_WARM_REBOOT 0x2 +#define SBI_SRST_RESET_TYPE_LAST SBI_SRST_RESET_TYPE_WARM_REBOOT + +#define SBI_SRST_RESET_REASON_NONE 0x0 +#define SBI_SRST_RESET_REASON_SYSFAIL 0x1 + #define SBI_SPEC_VERSION_MAJOR_OFFSET 24 #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f #define SBI_SPEC_VERSION_MINOR_MASK 0xffffff
We extend the SBI ecall interface header for the SBI SRST extension recently accepted in SBI specification v0.3-draft. Signed-off-by: Anup Patel <anup.patel@wdc.com> --- include/sbi/sbi_ecall_interface.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)