mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amol Lad <dal_loma@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: SMP boot query
Date: Fri, 16 Aug 2002 00:21:09 -0700 (PDT)	[thread overview]
Message-ID: <20020816072109.53259.qmail@web12407.mail.yahoo.com> (raw)

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

                 reply	other threads:[~2002-08-16  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020816072109.53259.qmail@web12407.mail.yahoo.com \
    --to=dal_loma@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®