summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2006-10-18 20:59:51 +0000
committerkettenis <kettenis@openbsd.org>2006-10-18 20:59:51 +0000
commit29f9f93d473ce186818e6ff44ea26e75546727b9 (patch)
tree7ab69d39c9f055ac86d1f0201e9384ba6795fdc0
parentuppercase for `RFC'; (diff)
downloadwireguard-openbsd-29f9f93d473ce186818e6ff44ea26e75546727b9.tar.xz
wireguard-openbsd-29f9f93d473ce186818e6ff44ea26e75546727b9.zip
Decide whether we need to attach the primary cpu by checking the CPUF_PRESENT
flag. tested by ckuethe@, ok deraadt@, gwk@
-rw-r--r--sys/arch/i386/i386/mainbus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c
index d5cfc3727c1..2c2ecb3c3b9 100644
--- a/sys/arch/i386/i386/mainbus.c
+++ b/sys/arch/i386/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.26 2006/04/14 21:26:18 marco Exp $ */
+/* $OpenBSD: mainbus.c,v 1.27 2006/10/18 20:59:51 kettenis Exp $ */
/* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */
/*
@@ -177,11 +177,11 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
#if NMPBIOS > 0
if (mpbios_probe(self))
mpbios_scan(self);
- else
#endif
- {
+
+ if ((cpu_info_primary.ci_flags & CPUF_PRESENT) == 0) {
struct cpu_attach_args caa;
-
+
memset(&caa, 0, sizeof(caa));
caa.caa_name = "cpu";
caa.cpu_number = 0;