Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Remove #ifdef XEN (Xen has its own cpu.c), ...
details: https://anonhg.NetBSD.org/src/rev/078a5434d7c6
branches: trunk
changeset: 360526:078a5434d7c6
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Mar 15 09:17:31 2018 +0000
description:
Remove #ifdef XEN (Xen has its own cpu.c), and add a comment.
diffstat:
sys/arch/x86/x86/cpu.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r f3f06e47ad9d -r 078a5434d7c6 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c Thu Mar 15 08:15:21 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c Thu Mar 15 09:17:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.151 2018/03/14 17:40:41 maxv Exp $ */
+/* $NetBSD: cpu.c,v 1.152 2018/03/15 09:17:31 maxv Exp $ */
/*
* Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.151 2018/03/14 17:40:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.152 2018/03/15 09:17:31 maxv Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -1338,8 +1338,6 @@
x86_send_ipi(ci, 0);
}
-#if !defined(XEN)
-
/* --------------------------------------------------------------------- */
/*
@@ -1364,6 +1362,13 @@
/* TODO: detect MITIGATION_INTEL_IBRS */
mitigation_method = MITIGATION_NONE;
} else if (cpu_vendor == CPUVENDOR_AMD) {
+ /*
+ * The AMD Family 10h manual documents the IC_CFG.DIS_IND bit.
+ * This bit disables the Indirect Branch Predictor.
+ *
+ * Families 12h and 16h are believed to have this bit too, but
+ * their manuals don't document it.
+ */
switch (CPUID_TO_FAMILY(ci->ci_signature)) {
case 0x10:
case 0x12:
@@ -1504,5 +1509,3 @@
return error;
}
-
-#endif
Home |
Main Index |
Thread Index |
Old Index