From owner-freebsd-current@FreeBSD.ORG Wed May 26 14:22:03 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B175A1065677 for ; Wed, 26 May 2010 14:22:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 834A98FC1E for ; Wed, 26 May 2010 14:22:03 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 33C8D46B45; Wed, 26 May 2010 10:22:03 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 639FF8A021; Wed, 26 May 2010 10:22:02 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 26 May 2010 08:26:30 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100525100404.GF287@rvdp.org> In-Reply-To: <20100525100404.GF287@rvdp.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005260826.30963.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 26 May 2010 10:22:02 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Ronald van der Pol Subject: Re: panic: lapic_enable_cmc: missing APIC 0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2010 14:22:03 -0000 On Tuesday 25 May 2010 6:04:04 am Ronald van der Pol wrote: > I am trying to move to current from 8.1-PRERELEASE. After > buildworld, buildkernel, installkernel and rebooting I get: > > panic: lapic_enable_cmc: missing APIC 0 > cpuid = 0 > KDB: enter : panic Try this patch: Index: i386/i386/mca.c =================================================================== --- i386/i386/mca.c (revision 208556) +++ i386/i386/mca.c (working copy) @@ -812,6 +812,19 @@ load_cr4(rcr4() | CR4_MCE); } +/* + * The machine check registers for the BSP cannot be initialized until + * the local APIC is initialized. This happens at SI_SUB_CPU, + * SI_ORDER_SECOND. + */ +static void +mca_init_bsp(void *arg __unused) +{ + + mca_init(); +} +SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); + /* Called when a machine check exception fires. */ int mca_intr(void) Index: i386/i386/machdep.c =================================================================== --- i386/i386/machdep.c (revision 208545) +++ i386/i386/machdep.c (working copy) @@ -328,7 +328,6 @@ #ifndef XEN cpu_setregs(); #endif - mca_init(); } /* Index: amd64/amd64/mca.c =================================================================== --- amd64/amd64/mca.c (revision 208545) +++ amd64/amd64/mca.c (working copy) @@ -789,6 +789,19 @@ load_cr4(rcr4() | CR4_MCE); } +/* + * The machine check registers for the BSP cannot be initialized until + * the local APIC is initialized. This happens at SI_SUB_CPU, + * SI_ORDER_SECOND. + */ +static void +mca_init_bsp(void *arg __unused) +{ + + mca_init(); +} +SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); + /* Called when a machine check exception fires. */ int mca_intr(void) Index: amd64/amd64/machdep.c =================================================================== --- amd64/amd64/machdep.c (revision 208545) +++ amd64/amd64/machdep.c (working copy) @@ -285,7 +285,6 @@ vm_pager_bufferinit(); cpu_setregs(); - mca_init(); } /* -- John Baldwin