diff mbox series

[1/1] cmd/riscv/sbi: support System Reset Extension

Message ID 20210117212713.8573-1-xypron.glpk@gmx.de
State Accepted, archived
Commit 921d5477b971693892025a3b76feb3628a078b50
Delegated to: Andes
Headers show
Series [1/1] cmd/riscv/sbi: support System Reset Extension | expand

Commit Message

Heinrich Schuchardt Jan. 17, 2021, 9:27 p.m. UTC
Let the sbi command detect the 'System Reset Extension'
(EID #0x53525354 "SRST").

Cf. https://github.com/riscv/riscv-sbi-doc

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 cmd/riscv/sbi.c | 1 +
 1 file changed, 1 insertion(+)

--
2.28.0

Comments

Pragnesh Patel Jan. 21, 2021, 3:52 a.m. UTC | #1
>-----Original Message-----
>From: Heinrich Schuchardt <xypron.glpk@gmx.de>
>Sent: 18 January 2021 02:57
>To: Rick Chen <rick@andestech.com>
>Cc: Atish Patra <atish.patra@wdc.com>; Bin Meng <bin.meng@windriver.com>;
>Pragnesh Patel <pragnesh.patel@openfive.com>; u-boot@lists.denx.de; Heinrich
>Schuchardt <xypron.glpk@gmx.de>
>Subject: [PATCH 1/1] cmd/riscv/sbi: support System Reset Extension
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Let the sbi command detect the 'System Reset Extension'
>(EID #0x53525354 "SRST").
>
>Cf. https://github.com/riscv/riscv-sbi-doc
>
>Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>---
> cmd/riscv/sbi.c | 1 +
> 1 file changed, 1 insertion(+)

Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
Leo Liang Feb. 4, 2021, 2:31 a.m. UTC | #2
On Sun, Jan 17, 2021 at 09:27:13PM +0000, Heinrich Schuchardt wrote:
> Let the sbi command detect the 'System Reset Extension'
> (EID #0x53525354 "SRST").
> 
> Cf. https://github.com/riscv/riscv-sbi-doc
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  cmd/riscv/sbi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
> index e66fc8e41d..9897483eb6 100644
> --- a/cmd/riscv/sbi.c
> +++ b/cmd/riscv/sbi.c
> @@ -29,6 +29,7 @@ static struct sbi_ext extensions[] = {
>  	{ 0x00735049, "IPI Extension" },
>  	{ 0x52464E43, "RFENCE Extension" },
>  	{ 0x0048534D, "Hart State Management Extension" },
> +	{ 0x53525354, "System Reset Extension" },
>  };
> 
>  static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
> --
> 2.28.0
>

Reviewed-by: Leo Liang <ycliang@andestech.com>
Bin Meng Feb. 4, 2021, 3:06 a.m. UTC | #3
On Mon, Jan 18, 2021 at 5:27 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Let the sbi command detect the 'System Reset Extension'
> (EID #0x53525354 "SRST").
>
> Cf. https://github.com/riscv/riscv-sbi-doc
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  cmd/riscv/sbi.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Bin Meng <bin.meng@windriver.com>

We should also update the reset command to call into SBI when this
extension is available.

Regards,
Bin
diff mbox series

Patch

diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index e66fc8e41d..9897483eb6 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -29,6 +29,7 @@  static struct sbi_ext extensions[] = {
 	{ 0x00735049, "IPI Extension" },
 	{ 0x52464E43, "RFENCE Extension" },
 	{ 0x0048534D, "Hart State Management Extension" },
+	{ 0x53525354, "System Reset Extension" },
 };

 static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,