From owner-svn-src-all@freebsd.org Fri Dec 18 20:10:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C973E4C57D1; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CyKjf5Ldvz3NPy; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5DCF10F74; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIKAUOT093513; Fri, 18 Dec 2020 20:10:30 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIKAUSS093512; Fri, 18 Dec 2020 20:10:30 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012182010.0BIKAUSS093512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 18 Dec 2020 20:10:30 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 368767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2020 20:10:30 -0000 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 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;