* [PATCH 1/1] cmd/sbi: display new extensions
@ 2023-04-12 8:38 Heinrich Schuchardt
2023-04-28 6:12 ` Leo Liang
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2023-04-12 8:38 UTC (permalink / raw)
To: Rick Chen, Leo; +Cc: u-boot, Heinrich Schuchardt
OpenSBI already implements some extensions that are not ratified yet:
* Debug Console Extension (DBCN)
* System Suspend Extension (SUSP)
* Collaborative Processor Performance Control Extension (CPPC)
Allow the sbi command to display these.
Provide the FID definitions of the Debug Console Extension. We can use that
extension for an early debug console driver.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
arch/riscv/include/asm/sbi.h | 9 +++++++++
cmd/riscv/sbi.c | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
index 81fcfe0b36..769369997d 100644
--- a/arch/riscv/include/asm/sbi.h
+++ b/arch/riscv/include/asm/sbi.h
@@ -28,6 +28,9 @@ enum sbi_ext_id {
SBI_EXT_HSM = 0x48534D,
SBI_EXT_SRST = 0x53525354,
SBI_EXT_PMU = 0x504D55,
+ SBI_EXT_DBCN = 0x4442434E,
+ SBI_EXT_SUSP = 0x53555350,
+ SBI_EXT_CPPC = 0x43505043,
};
enum sbi_ext_base_fid {
@@ -89,6 +92,12 @@ enum sbi_srst_reset_reason {
SBI_SRST_RESET_REASON_SYS_FAILURE,
};
+enum sbi_ext_dbcn_fid {
+ SBI_EXT_DBCN_CONSOLE_WRITE = 0,
+ SBI_EXT_DBCN_CONSOLE_READ,
+ SBI_EXT_DBCN_CONSOLE_WRITE_BYTE,
+};
+
#ifdef CONFIG_SBI_V01
#define SBI_EXT_SET_TIMER SBI_EXT_0_1_SET_TIMER
#define SBI_FID_SET_TIMER 0
diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index 6f2cad4e7e..c4707fe520 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -46,6 +46,9 @@ static struct sbi_ext extensions[] = {
{ SBI_EXT_HSM, "Hart State Management Extension" },
{ SBI_EXT_SRST, "System Reset Extension" },
{ SBI_EXT_PMU, "Performance Monitoring Unit Extension" },
+ { SBI_EXT_DBCN, "Debug Console Extension" },
+ { SBI_EXT_SUSP, "System Suspend Extension" },
+ { SBI_EXT_CPPC, "Collaborative Processor Performance Control Extension" },
};
static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] cmd/sbi: display new extensions
2023-04-12 8:38 Heinrich Schuchardt
@ 2023-04-28 6:12 ` Leo Liang
0 siblings, 0 replies; 4+ messages in thread
From: Leo Liang @ 2023-04-28 6:12 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Rick Chen, u-boot
On Wed, Apr 12, 2023 at 10:38:16AM +0200, Heinrich Schuchardt wrote:
> OpenSBI already implements some extensions that are not ratified yet:
>
> * Debug Console Extension (DBCN)
> * System Suspend Extension (SUSP)
> * Collaborative Processor Performance Control Extension (CPPC)
>
> Allow the sbi command to display these.
>
> Provide the FID definitions of the Debug Console Extension. We can use that
> extension for an early debug console driver.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> arch/riscv/include/asm/sbi.h | 9 +++++++++
> cmd/riscv/sbi.c | 3 +++
> 2 files changed, 12 insertions(+)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] cmd/sbi: display new extensions
@ 2023-08-02 20:39 Heinrich Schuchardt
2023-08-07 8:46 ` Leo Liang
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2023-08-02 20:39 UTC (permalink / raw)
To: Rick Chen, Leo; +Cc: u-boot, Heinrich Schuchardt
The SBI specification v2.0-rc2 defines new extensions:
* Nested Acceleration Extension (NACL)
* Steal Time Accounting (STA)
Allow the sbi command to display these.
Add missing implementation IDs.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
arch/riscv/include/asm/sbi.h | 2 ++
cmd/riscv/sbi.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
index 769369997d..009a26885c 100644
--- a/arch/riscv/include/asm/sbi.h
+++ b/arch/riscv/include/asm/sbi.h
@@ -31,6 +31,8 @@ enum sbi_ext_id {
SBI_EXT_DBCN = 0x4442434E,
SBI_EXT_SUSP = 0x53555350,
SBI_EXT_CPPC = 0x43505043,
+ SBI_EXT_NACL = 0x4E41434C,
+ SBI_EXT_STA = 0x535441,
};
enum sbi_ext_base_fid {
diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index e840a2a034..56c58614bd 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -27,6 +27,8 @@ static struct sbi_imp implementations[] = {
{ 4, "RustSBI" },
{ 5, "Diosix" },
{ 6, "Coffer" },
+ { 7, "Xen Project" },
+ { 8, "PolarFire Hart Software Services" },
};
static struct sbi_ext extensions[] = {
@@ -49,6 +51,8 @@ static struct sbi_ext extensions[] = {
{ SBI_EXT_DBCN, "Debug Console Extension" },
{ SBI_EXT_SUSP, "System Suspend Extension" },
{ SBI_EXT_CPPC, "Collaborative Processor Performance Control Extension" },
+ { SBI_EXT_NACL, "Nested Acceleration Extension" },
+ { SBI_EXT_STA, "Steal-time Accounting Extension" },
};
static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] cmd/sbi: display new extensions
2023-08-02 20:39 [PATCH 1/1] cmd/sbi: display new extensions Heinrich Schuchardt
@ 2023-08-07 8:46 ` Leo Liang
0 siblings, 0 replies; 4+ messages in thread
From: Leo Liang @ 2023-08-07 8:46 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Rick Chen, u-boot
On Wed, Aug 02, 2023 at 10:39:46PM +0200, Heinrich Schuchardt wrote:
> The SBI specification v2.0-rc2 defines new extensions:
>
> * Nested Acceleration Extension (NACL)
> * Steal Time Accounting (STA)
>
> Allow the sbi command to display these.
>
> Add missing implementation IDs.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> arch/riscv/include/asm/sbi.h | 2 ++
> cmd/riscv/sbi.c | 4 ++++
> 2 files changed, 6 insertions(+)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-07 8:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 20:39 [PATCH 1/1] cmd/sbi: display new extensions Heinrich Schuchardt
2023-08-07 8:46 ` Leo Liang
-- strict thread matches above, loose matches on Subject: below --
2023-04-12 8:38 Heinrich Schuchardt
2023-04-28 6:12 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox