Re: SMP processor rework help needed

Eric W. Biederman (ebiederm@xmission.com)
15 Oct 2001 09:20:25 -0600


Andi Kleen <ak@muc.de> writes:

> On Sun, Oct 14, 2001 at 10:50:50PM +0200, Gerhard Mack wrote:
> > This may sound like a dumb question but wouldn't simply swapping the CPUs
> > have the same affect?
>
> In theory yes, assuming the determination of the boot cpu is fully
> deterministic. the spec says it is the one with the lowest apic number; but
> who knows if that is true in every weird board.

I do recall that the apics have programmable numbers. We even test
that as part of our cpu initialization. So that means little.

For intel the initial determination is made having the cpus race on
the apic bus. The cpu that sends a message first gets the lowest
apicid. Though I need to see how the P4 Xeon does it, as the apic
bus is actually unused.

Also many boards have logic so that allows the second cpu to become the
boot cpu if the first cpu fails to boot. This logic might be as
simple as round-robin, so even a deterministic may make this
difficult.

So the only reliable way to force the boot cpu is with software that
runs before the operating system, usually the firmware.

I'll keep this in mind for linuxBIOS, as that would be an ideal place
to implement something like that.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/