PERFORCE change 140142 for review

Marcel Moolenaar xcllnt at mac.com
Thu Apr 17 16:18:37 UTC 2008


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 at 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 at mac.com




More information about the p4-projects mailing list