Module Name: src Committed By: pgoyette Date: Tue Jan 14 01:41:37 UTC 2020
Modified Files: src/sys/arch/x86/x86: cpu.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.180 src/sys/arch/x86/x86/cpu.c:1.181 --- src/sys/arch/x86/x86/cpu.c:1.180 Wed Jan 8 15:47:50 2020 +++ src/sys/arch/x86/x86/cpu.c Tue Jan 14 01:41:37 2020 @@ -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 @@ cpu_rescan(device_t self, const char *if 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;