Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cpuctl/arch Print AMD RAS features and Instruction-...
details: https://anonhg.NetBSD.org/src/rev/0784f7dceb97
branches: trunk
changeset: 372335:0784f7dceb97
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Nov 16 13:15:26 2022 +0000
description:
Print AMD RAS features and Instruction-Based Sampling features.
diffstat:
usr.sbin/cpuctl/arch/i386.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 086549a51dc9 -r 0784f7dceb97 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c Wed Nov 16 13:14:33 2022 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c Wed Nov 16 13:15:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.128 2022/06/15 16:28:01 msaitoh Exp $ */
+/* $NetBSD: i386.c,v 1.129 2022/11/16 13:15:26 msaitoh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.128 2022/06/15 16:28:01 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.129 2022/11/16 13:15:26 msaitoh Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -2232,6 +2232,11 @@
}
if (cpu_vendor == CPUVENDOR_AMD) {
+ if (ci->ci_max_ext_cpuid >= 0x80000007) {
+ x86_cpuid(0x80000007, descs);
+ print_bits(cpuname, "RAS features",
+ CPUID_RAS_FLAGS, descs[1]);
+ }
if ((ci->ci_max_ext_cpuid >= 0x8000000a)
&& (ci->ci_feat_val[3] & CPUID_SVM) != 0) {
x86_cpuid(0x8000000a, descs);
@@ -2242,6 +2247,12 @@
print_bits(cpuname, "SVM features",
CPUID_AMD_SVM_FLAGS, descs[3]);
}
+ if (ci->ci_max_ext_cpuid >= 0x8000001b) {
+ x86_cpuid(0x8000001b, descs);
+ print_bits(cpuname,
+ "Instruction-Based Sampling features",
+ CPUID_IBS_FLAGS, descs[0]);
+ }
if (ci->ci_max_ext_cpuid >= 0x8000001f) {
x86_cpuid(0x8000001f, descs);
print_bits(cpuname, "Encrypted Memory features",
Home |
Main Index |
Thread Index |
Old Index