mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* SMP boot query
@ 2002-08-16  7:21 Amol Lad
  0 siblings, 0 replies; only message in thread
From: Amol Lad @ 2002-08-16  7:21 UTC (permalink / raw)
  To: linux-kernel

Hi,
 Lets assume, boot processor has done all its
initialization and is booting the second processor. 
In do_boot_cpu(), it calls fork_by_hand() and creates
an idle task for cpu#2 . 
It then iniliazes all relevant fields of 'idle' task
for cpu#2.
It also does following
start_eip = setup_trampoline();
stack_start.esp = (void *) (1024 + PAGE_SIZE + (char
*)idle);

After doing lot of APIC related stuff, it sends
Startup IPI to cpu#2 to start booting from start_eip .


cpu#2, from trampoline code jumps to startup_32 and
from there to initialize_secondary. 

initialize_secondary is

        asm volatile(
                "movl %0,%%esp\n\t"
                "jmp *%1"
                :
                :"r" (current->thread.esp),"r"
(current->thread.eip));

Now my questions
1] what is trampoline ?
2] I did not understood, how 'current' above is set to
  new idle task created in fork_by_hand (is some magic
done in start_stack.esp ?? )

-- Amol



__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-16  7:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-16  7:21 SMP boot query Amol Lad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®