Module Name:    src
Committed By:   yamt
Date:           Thu Oct 21 11:17:55 UTC 2010

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/i386/i386: machdep.c
        src/sys/arch/x86/include: machdep.h
        src/sys/arch/x86/x86: x86_machdep.c

Log Message:
don't forget to call nmi_init.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.694 -r1.695 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/include/machdep.h
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x86/x86/x86_machdep.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.149 src/sys/arch/amd64/amd64/machdep.c:1.150
--- src/sys/arch/amd64/amd64/machdep.c:1.149	Wed Sep 22 16:16:51 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Oct 21 11:17:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $	*/
+/*	$NetBSD: machdep.c,v 1.150 2010/10/21 11:17:55 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.150 2010/10/21 11:17:55 yamt Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -359,6 +359,8 @@
 #if !defined(XEN)
 	ltr(cpu_info_primary.ci_tss_sel);
 #endif /* !defined(XEN) */
+
+	x86_startup();
 }
 
 #ifdef XEN

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.694 src/sys/arch/i386/i386/machdep.c:1.695
--- src/sys/arch/i386/i386/machdep.c:1.694	Tue Aug 17 22:24:04 2010
+++ src/sys/arch/i386/i386/machdep.c	Thu Oct 21 11:17:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.694 2010/08/17 22:24:04 jym Exp $	*/
+/*	$NetBSD: machdep.c,v 1.695 2010/10/21 11:17:55 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.694 2010/08/17 22:24:04 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.695 2010/10/21 11:17:55 yamt Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -504,6 +504,8 @@
 	cpu_init_tss(&cpu_info_primary);
 	ltr(cpu_info_primary.ci_tss_sel);
 #endif
+
+	x86_startup();
 }
 
 /*

Index: src/sys/arch/x86/include/machdep.h
diff -u src/sys/arch/x86/include/machdep.h:1.4 src/sys/arch/x86/include/machdep.h:1.5
--- src/sys/arch/x86/include/machdep.h:1.4	Mon Aug 23 16:20:44 2010
+++ src/sys/arch/x86/include/machdep.h	Thu Oct 21 11:17:54 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.h,v 1.4 2010/08/23 16:20:44 jruoho Exp $ */
+/* $NetBSD: machdep.h,v 1.5 2010/10/21 11:17:54 yamt Exp $ */
 /*
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -42,4 +42,6 @@
 int	initx86_fake_memmap(struct extent *);
 int	initx86_load_memmap(paddr_t first_avail);
 
+void	x86_startup(void);
+
 #endif	/* _X86_MACHDEP_H_ */

Index: src/sys/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.43 src/sys/arch/x86/x86/x86_machdep.c:1.44
--- src/sys/arch/x86/x86/x86_machdep.c:1.43	Mon Aug 23 16:20:45 2010
+++ src/sys/arch/x86/x86/x86_machdep.c	Thu Oct 21 11:17:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.43 2010/08/23 16:20:45 jruoho Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.44 2010/10/21 11:17:54 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.43 2010/08/23 16:20:45 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.44 2010/10/21 11:17:54 yamt Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -53,6 +53,7 @@
 #include <x86/cpuvar.h>
 #include <x86/cputypes.h>
 #include <x86/machdep.h>
+#include <x86/nmi.h>
 #include <x86/pio.h>
 
 #include <dev/isa/isareg.h>
@@ -951,3 +952,18 @@
 	x86_listener = kauth_listen_scope(KAUTH_SCOPE_MACHDEP,
 	    x86_listener_cb, NULL);
 }
+
+/*
+ * x86_startup: x86 common startup routine
+ *
+ * called by cpu_startup.
+ */
+
+void
+x86_startup(void)
+{
+
+#if !defined(XEN)
+	nmi_init();
+#endif /* !defined(XEN) */
+}

Reply via email to