git: 78a3420c20e0 - main - riscv: Print ISA extensions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 May 2023 13:23:22 UTC
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=78a3420c20e075ca8c44a4670ab5ca5afe6bbdf5
commit 78a3420c20e075ca8c44a4670ab5ca5afe6bbdf5
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2023-05-22 23:52:28 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-05-23 13:19:26 +0000
riscv: Print ISA extensions
Report the CPU's single-letter ISA extensions in printcpuinfo().
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39813
---
sys/riscv/riscv/identcpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c
index 6d82e4a2ad77..d4ad8a1078b6 100644
--- a/sys/riscv/riscv/identcpu.c
+++ b/sys/riscv/riscv/identcpu.c
@@ -429,5 +429,12 @@ printcpuinfo(u_int cpu)
desc->cpu_mvendor_name, desc->cpu_march_name, hart);
printf(" marchid=%#lx, mimpid=%#lx\n", marchid, mimpid);
+ printf(" ISA: %#b\n", desc->isa_extensions,
+ "\020"
+ "\01Atomic"
+ "\03Compressed"
+ "\04Double"
+ "\06Float"
+ "\15Mult/Div");
}
}