Re: why is trampoline.S code copied for each cpu?

From: James Bottomley (James.Bottomley@steeleye.com)
Date: Wed Jul 12 2000 - 12:01:49 EST


prumpf@uzix.org said:
> No. phys_to_virt(8192) != trampoline_base, at least in the general
> case.

> It really looks like the code in smpboot.c is out of date to me.

Actually, it is, look at how the memory init sequence goes. There are only
two other pages allocated before you get to smp_alloc_memory(). Here's the
proof (putting a printk into setup_trampoline()).

CPU0: Intel Pentium Pro stepping 07
calibrating APIC timer ...
..... CPU clock speed is 198.9541 MHz.
..... system bus clock speed is 66.3177 MHz.
trampoline base = (virt) c0002000, (phys) 8192
Booting processor 1 eip 2000
Calibrating delay loop... 397.31 BogoMIPS
[...]

I do agree the test lower down should be updated to use trampoline_base
instead of phys_to_virt(8192).

> This doesn't seem to happen in practice. If it does, we probably want
> to panic() anyway - we now have a random CPU executing random code but
> not behaving as expected.

It doesn't happen in the normal course of events. For those of us who play
with SMP HAL's, having this type of information can be invaluable. Also,
getting the machine to boot so you can try to find out what happened to the
errant CPU is useful. Usually it is just stuck somewhere like the message
implies.

James

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



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:15 EST