lkml.org 
[lkml]   [2000]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why is trampoline.S code copied for each cpu?
On Wed, Jul 12, 2000 at 10:05:03AM -0500, James Bottomley wrote:
> > So I looked in trampoline.S and discovered the answer to this
> > question - because each instance writes some magic number a5a5a5a5 to
> > its code. Ok, so then the answer becomes - why does it do that?
>
> If you look lower down in do_boot_cpu(), this is used as a diagnosis of a boot
> failure (the check at phys_to_virt(8192)). If we don't find the signature, we
> know the CPU failed to start, if we do find it, we know it started but got
> stuck somewhere after the switch to protected mode.

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.

> In the latter case, the CPU could happily have trashed the trampoline code
> before disappearing off into hyperspace, so it makes sense to set it up anew
> each time.

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.

Philipp Rumpf

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.203 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site