From owner-p4-projects@FreeBSD.ORG Tue Sep 30 14:57:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 695BD16A4C0; Tue, 30 Sep 2003 14:57:11 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4216316A4B3 for ; Tue, 30 Sep 2003 14:57:11 -0700 (PDT) Received: from mail.speakeasy.net (mail9.speakeasy.net [216.254.0.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id B623744015 for ; Tue, 30 Sep 2003 14:57:07 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 17144 invoked from network); 30 Sep 2003 21:57:06 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 30 Sep 2003 21:57:06 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h8ULv06Y060133; Tue, 30 Sep 2003 17:57:00 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200309302139.h8ULdm0M025495@repoman.freebsd.org> Date: Tue, 30 Sep 2003 17:57:05 -0400 (EDT) From: John Baldwin To: Peter Wemm X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Perforce Change Reviews Subject: RE: PERFORCE change 38921 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 21:57:11 -0000 On 30-Sep-2003 Peter Wemm wrote: > http://perforce.freebsd.org/chv.cgi?CH=38921 > > Change 38921 by peter@peter_hammer on 2003/09/30 14:39:43 > > tidy some stuff up. There is no need for the startup glue code > to be in asm when it can be in init_secondary(). > > Affected files ... > > .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#10 edit > .. //depot/projects/hammer/sys/amd64/amd64/mpboot.s#7 edit > > Differences ... > > ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#10 (text+ko) ==== > > @@ -316,16 +316,17 @@ > /* XXX: List I/O APICs? They are done differently now. */ > } > > -#ifdef SMP_ME_HARDER > /* > * AP cpu's call this to sync up protected mode. > */ > void > init_secondary(void) > { > +#ifdef SMP_ME_HARDER > int gsel_tss; > int x, myid = bootAP; > u_int cr0; > + u_int32 value; > > gdt_segs[GPRIV_SEL].ssd_base = (long) &SMP_prvspace[myid]; > gdt_segs[GPROC0_SEL].ssd_base = > @@ -363,8 +364,17 @@ > cr0 = rcr0(); > cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); > load_cr0(cr0); > + > + /* Disable local apic just to be sure. */ > + value = lapic->svr; > + value &= ~(APIC_SVR_SWEN); > + lapic->svr = value; > + > + mp_naps++; > + > + ap_init(); /* kick things off, this does not return */ > +#endif > } > -#endif I should do this for i386, too, huh. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/