Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2020 20:10:30 +0000 (UTC)
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368767 - in head/sys/riscv: include riscv
Message-ID:  <202012182010.0BIKAUSS093512@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mhorne
Date: Fri Dec 18 20:10:30 2020
New Revision: 368767
URL: https://svnweb.freebsd.org/changeset/base/368767

Log:
  riscv: report additional known SBI implementations
  
  These implementation IDs are defined in the SBI spec, so we should print
  their name if detected.
  
  Submitted by:	Danjel Qyteza <danq1222@gmail.com>
  Reviewed by:	jhb, kp
  Differential Revision:	https://reviews.freebsd.org/D27660

Modified:
  head/sys/riscv/include/sbi.h
  head/sys/riscv/riscv/sbi.c

Modified: head/sys/riscv/include/sbi.h
==============================================================================
--- head/sys/riscv/include/sbi.h	Fri Dec 18 16:55:54 2020	(r368766)
+++ head/sys/riscv/include/sbi.h	Fri Dec 18 20:10:30 2020	(r368767)
@@ -47,6 +47,10 @@
 /* SBI Implementation IDs */
 #define	SBI_IMPL_ID_BBL			0
 #define	SBI_IMPL_ID_OPENSBI		1
+#define	SBI_IMPL_ID_XVISOR		2
+#define	SBI_IMPL_ID_KVM			3
+#define	SBI_IMPL_ID_RUSTSBI		4
+#define	SBI_IMPL_ID_DIOSIX		5
 
 /* SBI Error Codes */
 #define	SBI_SUCCESS			0

Modified: head/sys/riscv/riscv/sbi.c
==============================================================================
--- head/sys/riscv/riscv/sbi.c	Fri Dec 18 16:55:54 2020	(r368766)
+++ head/sys/riscv/riscv/sbi.c	Fri Dec 18 20:10:30 2020	(r368767)
@@ -110,6 +110,18 @@ sbi_print_version(void)
 	case (SBI_IMPL_ID_BBL):
 		printf("SBI: Berkely Boot Loader %lu\n", sbi_impl_version);
 		break;
+	case (SBI_IMPL_ID_XVISOR):
+		printf("SBI: eXtensible Versatile hypervISOR %lu\n", sbi_impl_version);
+		break;
+	case (SBI_IMPL_ID_KVM):
+		printf("SBI: Kernel-based Virtual Machine %lu\n", sbi_impl_version);
+		break;
+	case (SBI_IMPL_ID_RUSTSBI):
+		printf("SBI: RustSBI %lu\n", sbi_impl_version);
+		break;
+	case (SBI_IMPL_ID_DIOSIX):
+		printf("SBI: Diosix %lu\n", sbi_impl_version);
+		break;
 	case (SBI_IMPL_ID_OPENSBI):
 		major = sbi_impl_version >> OPENSBI_VERSION_MAJOR_OFFSET;
 		minor = sbi_impl_version & OPENSBI_VERSION_MINOR_MASK;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012182010.0BIKAUSS093512>