diff mbox series

[1/1] cmd: sbi: formatting PolarFire Hart Software Services version

Message ID 20240306144852.176337-1-heinrich.schuchardt@canonical.com
State Accepted
Delegated to: Andes
Headers show
Series [1/1] cmd: sbi: formatting PolarFire Hart Software Services version | expand

Commit Message

Heinrich Schuchardt March 6, 2024, 2:48 p.m. UTC
The 'PolarFire Hart Software Services' SBI implementation returns the
version of the incorporated OpenSBI. Format the number accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 cmd/riscv/sbi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Conor Dooley March 6, 2024, 3 p.m. UTC | #1
On Wed, Mar 06, 2024 at 03:48:52PM +0100, Heinrich Schuchardt wrote:
> The 'PolarFire Hart Software Services' SBI implementation returns the
> version of the incorporated OpenSBI. Format the number accordingly.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

FWIW, the reason we added a custom implementation ID is that because the
HSS doesn't run out of DDR we don't suffer from a bug that affects most
OpenSBI versions where it fails to mark the region it PMP protects as
reserved. That bug is present in the version of OpenSBI we use and
there's no plans to move to a more recent version because of space
constraints mostly. Since the bug prevents using some forms of suspend,
we moved to a custom implementation ID so that there could be
differentiation.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
>  cmd/riscv/sbi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
> index dec7dd651d6..628ef3a591c 100644
> --- a/cmd/riscv/sbi.c
> +++ b/cmd/riscv/sbi.c
> @@ -80,6 +80,7 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
>  					break;
>  				switch (impl_id) {
>  				case 1: /* OpenSBI */
> +				case 8: /* PolarFire Hart Software Services */
>  					printf("%ld.%ld",
>  					       vers >> 16, vers & 0xffff);
>  					break;
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index dec7dd651d6..628ef3a591c 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -80,6 +80,7 @@  static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
 					break;
 				switch (impl_id) {
 				case 1: /* OpenSBI */
+				case 8: /* PolarFire Hart Software Services */
 					printf("%ld.%ld",
 					       vers >> 16, vers & 0xffff);
 					break;