diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2022-12-06 00:11:24 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2022-12-06 00:11:24 +0000 |
commit | 07a3087201ca0da7a75c86b2fb3ab784a7b71761 (patch) | |
tree | 8a509bd1e9efd18a33cfed4c0c412b51457fcb8f /sys | |
parent | c3534d7da6e63f344721054e1903c0f391fb2963 (diff) |
Print SBI vendor, version and implemented spec version
On my Unmatched:
SBI: OpenSBI v0.9, SBI Specification Version 0.2
ok mlarkin@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/riscv64/riscv64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/riscv64/riscv64/sbi.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/riscv64/riscv64/machdep.c b/sys/arch/riscv64/riscv64/machdep.c index 61ea8541113..60debb0b388 100644 --- a/sys/arch/riscv64/riscv64/machdep.c +++ b/sys/arch/riscv64/riscv64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.29 2022/10/30 17:43:40 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.30 2022/12/06 00:11:23 jca Exp $ */ /* * Copyright (c) 2014 Patrick Wildt <patrick@blueri.se> @@ -273,6 +273,8 @@ cpu_startup(void) printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free), ptoa(uvmexp.free) / 1024 / 1024); + sbi_print_version(); + curpcb = &proc0.p_addr->u_pcb; curpcb->pcb_flags = 0; curpcb->pcb_tf = &proc0tf; diff --git a/sys/arch/riscv64/riscv64/sbi.c b/sys/arch/riscv64/riscv64/sbi.c index 8c85a708284..57b90aad434 100644 --- a/sys/arch/riscv64/riscv64/sbi.c +++ b/sys/arch/riscv64/riscv64/sbi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbi.c,v 1.6 2021/07/02 08:44:37 kettenis Exp $ */ +/* $OpenBSD: sbi.c,v 1.7 2022/12/06 00:11:23 jca Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -76,22 +76,22 @@ sbi_print_version(void) switch (sbi_impl_id) { case (SBI_IMPL_ID_BBL): - printf("SBI: Berkely Boot Loader %lu\n", sbi_impl_version); + printf("SBI: Berkely Boot Loader %lu", 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); + printf("SBI: OpenSBI v%u.%u", major, minor); break; default: - printf("SBI: Unrecognized Implementation: %lu\n", sbi_impl_id); + printf("SBI: Unrecognized Implementation: %lu", sbi_impl_id); break; } major = (sbi_spec_version & SBI_SPEC_VERS_MAJOR_MASK) >> SBI_SPEC_VERS_MAJOR_OFFSET; minor = (sbi_spec_version & SBI_SPEC_VERS_MINOR_MASK); - printf("SBI Specification Version: %u.%u\n", major, minor); + printf(", SBI Specification Version %u.%u\n", major, minor); } #ifdef MULTIPROCESSOR |