Date: Tue, 30 Sep 2003 17:57:05 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Peter Wemm <peter@FreeBSD.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: RE: PERFORCE change 38921 for review Message-ID: <XFMail.20030930175705.jhb@FreeBSD.org> In-Reply-To: <200309302139.h8ULdm0M025495@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030930175705.jhb>