From nobody Tue Jun 25 11:32:17 2024
X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7jNd1zPlz5PNJ2;
Tue, 25 Jun 2024 11:32:17 +0000 (UTC)
(envelope-from git@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 "R3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4W7jNd1J9Yz4XcG;
Tue, 25 Jun 2024 11:32:17 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1719315137;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=g9bUiz/B66qHuWb+/kbbUh5VwvOcoCpcqyaUbTq88ew=;
b=W+z0f2zlv1tqn6cxqXK62l+m+pDsj4wVp/zITX8A57cpBHge6YXX1TYrxElVjJbfXirh6W
74bRAo/zfxom2FMPimf4JrxAjlkKtGF9s3OjPByXdubwQXYnoeRdlKHHAc903rHspeSl5q
ilc8qfFosPQ0iDCpCMN5h0pK9i1RSq9IILa6NMn6zadOvsT1ofaANxXQKbgU6MG7mx1C2m
38nbp/QiO+8uLXNBMr2yILkpdLO9HY7JDSoe7nOiBTwDtomF+xMAFQyg1lx/96UN5c/cht
QlSJv/jIWNLCmddNnlvX2EpDjWt3eVQH1KSn2G8JdamDQQmjZ+sLxGfyApCFEw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719315137; a=rsa-sha256; cv=none;
b=w4aDgp9h3qOxAIMlw/c2ViH5QH9qoWM8+eICdBMkwyAksGV9wgZVi9hX7q3fpSFtU0frLP
x36lSxPEbDsDIhsQGtalZQPZDZqoLPFK7CX+wNLDwfxuTTXauVzaz3MFqLFJdBRtxlJrp5
gXBFZdEGgDcWFhhyeOdinyRmA3hPyxR5t4F4ec37TIK72Sy97BpO9RJALxpAGBB9FykB3y
1JoB0On26lRVb8gNLa1KGvJgFtGRpV7uMav6vHV2IikQlWTiwWmCwnQ0vMQeMyAPAkbZGb
Tc7sLyh9JrB+q9t+mjMK6qcbw9obGORyz2D9IF58nofrn7XKasHrlqHzbzgsjg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1719315137;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=g9bUiz/B66qHuWb+/kbbUh5VwvOcoCpcqyaUbTq88ew=;
b=R+fN40rpN40i0CBKxEX1S9D50atjgJfd3P8v8xiPIRpLhM6z9oL2EILRbJwMTaRmcx+imT
VJsao8bQDH2l4pO/Y9Z+OhfVieRi4t8Q6/Jo+ykzw3smylOzSAPIr7eiukDN0Dymy1HKye
u9vgQKp2AHhjKx7K5aOJW4/PCe+30BSC8SXsKFLN4COOI9YrhxAcNmHJzqNn+QzbOjQUCe
qBChbKpxKQ8BATNFK4JwjdKzEQsKFhx6a3jdIz6Rly69M4bHMhmdojd00q6Q4kKflP1B3P
rOA9gA6AhBUhCy3PLdAj23/nfd6HIT/lxGUetU+c+Ucd3q5r9cqW8HApO5aqCw==
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(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 did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7jNd0vPxz111w;
Tue, 25 Jun 2024 11:32:17 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45PBWHxh013145;
Tue, 25 Jun 2024 11:32:17 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PBWHea013143;
Tue, 25 Jun 2024 11:32:17 GMT
(envelope-from git)
Date: Tue, 25 Jun 2024 11:32:17 GMT
Message-Id: <202406251132.45PBWHea013143@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-main@FreeBSD.org
From: Ruslan Bukin
Subject: git: d5963606f0c6 - main - riscv: add SBI implementation
IDs.
List-Id: Commit messages for the main branch of the src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-main@freebsd.org
Sender: owner-dev-commits-src-main@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: br
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d5963606f0c6c084955c6ed41c92c4cca8edeb36
Auto-Submitted: auto-generated
The branch main has been updated by br:
URL: https://cgit.FreeBSD.org/src/commit/?id=d5963606f0c6c084955c6ed41c92c4cca8edeb36
commit d5963606f0c6c084955c6ed41c92c4cca8edeb36
Author: Ruslan Bukin
AuthorDate: 2024-06-25 11:25:26 +0000
Commit: Ruslan Bukin
CommitDate: 2024-06-25 11:25:26 +0000
riscv: add SBI implementation IDs.
Add new SBI implementation IDs including recently allocated one for bhyve.
Reviewed by: mhorne
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D45696
---
sys/riscv/include/sbi.h | 6 ++++++
sys/riscv/riscv/sbi.c | 27 +++++++++++++++++++++++----
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/sys/riscv/include/sbi.h b/sys/riscv/include/sbi.h
index bd3991e0a89f..c8093238e268 100644
--- a/sys/riscv/include/sbi.h
+++ b/sys/riscv/include/sbi.h
@@ -49,6 +49,12 @@
#define SBI_IMPL_ID_KVM 3
#define SBI_IMPL_ID_RUSTSBI 4
#define SBI_IMPL_ID_DIOSIX 5
+#define SBI_IMPL_ID_COFFER 6
+#define SBI_IMPL_ID_XEN_PROJECT 7
+#define SBI_IMPL_ID_POLARFIRE_HSS 8
+#define SBI_IMPL_ID_COREBOOT 9
+#define SBI_IMPL_ID_OREBOOT 10
+#define SBI_IMPL_ID_BHYVE 11
/* SBI Error Codes */
#define SBI_SUCCESS 0
diff --git a/sys/riscv/riscv/sbi.c b/sys/riscv/riscv/sbi.c
index 53eadbe54bc6..b0a05bd88ef1 100644
--- a/sys/riscv/riscv/sbi.c
+++ b/sys/riscv/riscv/sbi.c
@@ -132,6 +132,11 @@ sbi_print_version(void)
case (SBI_IMPL_ID_BBL):
printf("SBI: Berkely Boot Loader %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;
+ printf("SBI: OpenSBI v%u.%u\n", major, minor);
+ break;
case (SBI_IMPL_ID_XVISOR):
printf("SBI: eXtensible Versatile hypervISOR %lu\n",
sbi_impl_version);
@@ -146,10 +151,24 @@ sbi_print_version(void)
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;
- printf("SBI: OpenSBI v%u.%u\n", major, minor);
+ case (SBI_IMPL_ID_COFFER):
+ printf("SBI: Coffer %lu\n", sbi_impl_version);
+ break;
+ case (SBI_IMPL_ID_XEN_PROJECT):
+ printf("SBI: Xen Project %lu\n", sbi_impl_version);
+ break;
+ case (SBI_IMPL_ID_POLARFIRE_HSS):
+ printf("SBI: PolarFire Hart Software Services %lu\n",
+ sbi_impl_version);
+ break;
+ case (SBI_IMPL_ID_COREBOOT):
+ printf("SBI: coreboot %lu\n", sbi_impl_version);
+ break;
+ case (SBI_IMPL_ID_OREBOOT):
+ printf("SBI: oreboot %lu\n", sbi_impl_version);
+ break;
+ case (SBI_IMPL_ID_BHYVE):
+ printf("SBI: bhyve %lu\n", sbi_impl_version);
break;
default:
printf("SBI: Unrecognized Implementation: %lu\n", sbi_impl_id);