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 If "application processors" were skipped/di...
details: https://anonhg.NetBSD.org/src/rev/3bc7073fecdd
branches: trunk
changeset: 1006411:3bc7073fecdd
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Jan 14 01:41:37 2020 +0000
description:
If "application processors" were skipped/disabled at boot time (due to
RB_MD1 being set), don't try to examine the featurebus info, since it
was never retrieved. Addresses kern/54815
XXX pullup-9
diffstat:
sys/arch/x86/x86/cpu.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 346dbd8532af -r 3bc7073fecdd sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c Mon Jan 13 21:43:38 2020 +0000
+++ b/sys/arch/x86/x86/cpu.c Tue Jan 14 01:41:37 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.180 2020/01/08 15:47:50 ad Exp $ */
+/* $NetBSD: cpu.c,v 1.181 2020/01/14 01:41:37 pgoyette Exp $ */
/*
* Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.180 2020/01/08 15:47:50 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.181 2020/01/14 01:41:37 pgoyette Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -540,6 +540,16 @@
struct cpufeature_attach_args cfaa;
struct cpu_info *ci = sc->sc_info;
+ /*
+ * If we booted with RB_MD1 to disable multiprocessor, the
+ * auto-configuration data still contains the additional
+ * CPUs. But their initialization was mostly bypassed
+ * during attach, so we have to make sure we don't look at
+ * their featurebus info, since it wasn't retrieved.
+ */
+ if (ci == NULL)
+ return 0;
+
memset(&cfaa, 0, sizeof(cfaa));
cfaa.ci = ci;
Home |
Main Index |
Thread Index |
Old Index