Date: Thu, 17 Apr 2008 09:05:43 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: Rafal Jaworowski <raj@semihalf.com> Cc: Marcel Moolenaar <marcel@freebsd.org>, Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 140142 for review Message-ID: <7BFB3A59-2546-4201-94A3-3FB95B797F9C@mac.com> In-Reply-To: <4807032D.1040204@semihalf.com> References: <200804170048.m3H0miGF002623@repoman.freebsd.org> <4807032D.1040204@semihalf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 17, 2008, at 12:58 AM, Rafal Jaworowski wrote: > Marcel Moolenaar wrote: >> http://perforce.freebsd.org/chv.cgi?CH=140142 >> >> Change 140142 by marcel@marcel_xcllnt on 2008/04/17 00:48:08 >> >> Make SMP go all the way into the scheduler. > > Wow, great to see this, Marcel! :) I'm getting up to speed with the > dual e500 > too, so will follow up on the SMP PPC for sure. Great! It's probably easiest to use the powerpc branch (or create a branch off of it) if I haven't committed anything to CVS. Everything's in place for e500, except the actual details of enumerating the CPUs or starting them. See mp_cpudep.c in sys/powerpc/aim for the OFW version. For e500 you only have to add mp_cpudep.c and implement the following functions: int powerpc_smp_first_cpu(struct cpuref *cpuref); int powerpc_smp_next_cpu(struct cpuref *cpuref); int powerpc_smp_get_bsp(struct cpuref *cpuref); int powerpc_smp_start_cpu(struct pcpu *pc); The first two are used by the powerpc common code to enumerate CPUs. The 3rd is to obtain the reference of the bootstrap processor. The 4th is to actually start APs. The AP eventually has to call void machdep_ap_bootstrap(volatile uint32_t *trcp); At that time all the MMU and CPU specific initialization should have been done. That's it, Come to think of it: most of the MD code for SMP support is actually MI code if you have the right primitives. Such as the primitives above... -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7BFB3A59-2546-4201-94A3-3FB95B797F9C>