mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
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
This commit is contained in:
parent
8521ea135f
commit
d5963606f0
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user