[PATCH 1/2] cmd: sbi: add Supervisor Software Events extension

OpenSBI has implemented the Supervisor Software Events Extension. Allow detecting it in the sbi command.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- arch/riscv/include/asm/sbi.h | 1 + cmd/riscv/sbi.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index d1113f3d703..ad32dedb589 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -34,6 +34,7 @@ enum sbi_ext_id { SBI_EXT_NACL = 0x4E41434C, SBI_EXT_STA = 0x535441, SBI_EXT_DBTR = 0x44425452, + SBI_EXT_SSE = 0x535345, };
enum sbi_ext_base_fid { diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index bd9d9c4765d..55507b0aa63 100644 --- a/cmd/riscv/sbi.c +++ b/cmd/riscv/sbi.c @@ -54,6 +54,7 @@ static struct sbi_ext extensions[] = { { SBI_EXT_NACL, "Nested Acceleration Extension" }, { SBI_EXT_STA, "Steal-time Accounting Extension" }, { SBI_EXT_DBTR, "Debug Trigger Extension" }, + { SBI_EXT_SSE, "Supervisor Software Events" }, };
static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,

Let the sbi command detect the coreboot and oreboot SBI Implementation IDs defined in SBI specification v2.0.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- cmd/riscv/sbi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index 55507b0aa63..2d8ee7e5bbb 100644 --- a/cmd/riscv/sbi.c +++ b/cmd/riscv/sbi.c @@ -29,6 +29,8 @@ static struct sbi_imp implementations[] = { { 6, "Coffer" }, { 7, "Xen Project" }, { 8, "PolarFire Hart Software Services" }, + { 9, "coreboot" }, + { 10, "oreboot" }, };
static struct sbi_ext extensions[] = {

On Wed, Apr 17, 2024 at 04:01:28PM +0200, Heinrich Schuchardt wrote:
Let the sbi command detect the coreboot and oreboot SBI Implementation IDs defined in SBI specification v2.0.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
cmd/riscv/sbi.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Leo Yu-Chi Liang ycliang@andestech.com

On Wed, Apr 17, 2024 at 04:01:27PM +0200, Heinrich Schuchardt wrote:
OpenSBI has implemented the Supervisor Software Events Extension. Allow detecting it in the sbi command.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
arch/riscv/include/asm/sbi.h | 1 + cmd/riscv/sbi.c | 1 + 2 files changed, 2 insertions(+)
Reviewed-by: Leo Yu-Chi Liang ycliang@andestech.com
participants (2)
-
Heinrich Schuchardt
-
Leo Liang