From 3a223ff63c0699e3ab977b41fa8e94ab07aa11a5 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Wed, 6 Mar 2024 15:48:52 +0100
Subject: [PATCH] cmd: sbi: formatting PolarFire Hart Software Services version

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>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
 cmd/riscv/sbi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index 87f7966f06..bd9d9c4765 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -81,6 +81,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.39.5