Patch boot/common/relocate.S to start kernel at 0x000c

Dale Farnsworth dale at farnsworth.org
Wed Mar 5 10:35:15 EST 2003


On Tue, Mar 04, 2003 at 11:21:30PM +0000, Dan Malek wrote:
> Dale Farnsworth wrote:
>
> >-	nop	/* used by __secondary_hold on prep (mtx) and chrp smp */
> >-	nop	/* used by __secondary_hold on prep (mtx) and chrp smp */
> >+	/*
> >+	 * The first two words are used by __secondary_hold on SMP systems.
> >+	 * The second word may be overwritten before the first cpu runs
> >+	 * here, so we branch around it.
> >+	 */
> >+	b	__start
> >+	nop
> > 	nop
>
> I thought of this, but the comment on the first nop bothered me.
> Was it just a cut/paste without updating the comment, or could the nop
> and location zero be used by MP systems just like the one at location 0x04?

In __secondary_hold, location 0x4 is written by secondary cpus, and
location 0x0 is read, so I guess the comment is accurate, that both
locations are "used".  Cpu 0 writes location 0 to tell the secondary
cpus they can continue.

I know the above code works for my dual-7455 system.

Thanks,
-Dale

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list