Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch don't forget to call nmi_init.



details:   https://anonhg.NetBSD.org/src/rev/62d081381d52
branches:  trunk
changeset: 758140:62d081381d52
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Oct 21 11:17:54 2010 +0000

description:
don't forget to call nmi_init.

diffstat:

 sys/arch/amd64/amd64/machdep.c |   6 ++++--
 sys/arch/i386/i386/machdep.c   |   6 ++++--
 sys/arch/x86/include/machdep.h |   4 +++-
 sys/arch/x86/x86/x86_machdep.c |  20 ++++++++++++++++++--
 4 files changed, 29 insertions(+), 7 deletions(-)

diffs (115 lines):

diff -r 232b5012a11d -r 62d081381d52 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Thu Oct 21 11:14:39 2010 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Thu Oct 21 11:17:54 2010 +0000
@@ -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
diff -r 232b5012a11d -r 62d081381d52 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Thu Oct 21 11:14:39 2010 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Oct 21 11:17:54 2010 +0000
@@ -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();
 }
 
 /*
diff -r 232b5012a11d -r 62d081381d52 sys/arch/x86/include/machdep.h
--- a/sys/arch/x86/include/machdep.h    Thu Oct 21 11:14:39 2010 +0000
+++ b/sys/arch/x86/include/machdep.h    Thu Oct 21 11:17:54 2010 +0000
@@ -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_ */
diff -r 232b5012a11d -r 62d081381d52 sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c    Thu Oct 21 11:14:39 2010 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c    Thu Oct 21 11:17:54 2010 +0000
@@ -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) */
+}



Home | Main Index | Thread Index | Old Index