diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index d3896f7c080f..99d1d48071b9 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.90 2008/04/28 20:23:12 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.91 2008/04/29 15:26:26 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007 @@ -113,7 +113,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.90 2008/04/28 20:23:12 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.91 2008/04/29 15:26:26 ad Exp $"); /* #define XENDEBUG_LOW */ @@ -1759,6 +1759,17 @@ init_x86_64(paddr_t first_avail) init_x86_64_ksyms(); +#ifndef XEN + intr_default_setup(); +#else + events_default_setup(); +#endif + + splraise(IPL_HIGH); + x86_enable_intr(); + + x86_init(); + #ifdef DDB if (boothowto & RB_KDB) Debugger(); @@ -1770,17 +1781,6 @@ init_x86_64(paddr_t first_avail) kgdb_connect(1); } #endif - -#ifndef XEN - intr_default_setup(); -#else - events_default_setup(); -#endif - - splraise(IPL_HIGH); - x86_enable_intr(); - - x86_init(); } void diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index a98b9c61626a..05b3f60efccc 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.631 2008/04/28 20:23:24 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.632 2008/04/29 15:27:08 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.631 2008/04/28 20:23:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.632 2008/04/29 15:27:08 ad Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -1876,23 +1876,6 @@ init386(paddr_t first_avail) init386_ksyms(); -#ifdef DDB - if (boothowto & RB_KDB) - Debugger(); -#endif -#ifdef IPKDB - ipkdb_init(); - if (boothowto & RB_KDB) - ipkdb_connect(0); -#endif -#ifdef KGDB - kgdb_port_init(); - if (boothowto & RB_KDB) { - kgdb_debug_init = 1; - kgdb_connect(1); - } -#endif - #if NMCA > 0 /* check for MCA bus, needed to be done before ISA stuff - if * MCA is detected, ISA needs to use level triggered interrupts @@ -1910,6 +1893,23 @@ init386(paddr_t first_avail) splraise(IPL_IPI); x86_enable_intr(); +#ifdef DDB + if (boothowto & RB_KDB) + Debugger(); +#endif +#ifdef IPKDB + ipkdb_init(); + if (boothowto & RB_KDB) + ipkdb_connect(0); +#endif +#ifdef KGDB + kgdb_port_init(); + if (boothowto & RB_KDB) { + kgdb_debug_init = 1; + kgdb_connect(1); + } +#endif + if (physmem < btoc(2 * 1024 * 1024)) { printf("warning: too little memory available; " "have %lu bytes, want %lu bytes\n"