Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@mvista.com>
To: Richard Hodges <rh@matriplex.com>
Cc: linux-mips <linux-mips@oss.sgi.com>
Subject: Re: Arguments for kernel_entry?
Date: 05 Nov 2001 18:07:54 -0800	[thread overview]
Message-ID: <1005012474.27128.306.camel@zeus> (raw)
In-Reply-To: <Pine.BSF.4.10.10111051736110.600-100000@mail.matriplex.com>

On Mon, 2001-11-05 at 17:44, Richard Hodges wrote:
> On 5 Nov 2001, Pete Popov wrote:
> 
> > On Mon, 2001-11-05 at 17:09, Richard Hodges wrote:
> > > Would anyone be able to provide information on the arguments
> > > to kernel_entry (in head.S)?
> > > 
> > > The first two look pretty straightforward, argument count and
> > > string vectors.  I assume that argument zero is actually the
> > > first argument, and not "vmlinux"?
> > > 
> > > What are the third (ulong) and fourth (int *) arguments?  I have
> > > read head.S and searched for days trying to find this info :-(
> > > 
> > > I thought PMON would be a decent reference, but run_target() only
> > > seems to set $4 and $5, before calling _go().
>  
> > That's boot code specific. MIPS Tech's yamon passes:
> > 
> > 0: number of arguments
> > 1: pointer to first arg
> > 2: pointer to environment variables
> > 3: pointer to prom routines you can call
> 
> Okay, I think I have it now.  It looks like _only_ prom_init() is
> interested in these arguments.
> 
> 1.  kernel_entry() gives them to init_arch(),
> 2.  init_arch gives them to prom_init(),
> 3.  prom_init() does whatever it wants (eg, builds arcs_cmdline)
> 4.  init_arch ends with a call to start_kernel(), and the original
>     arguments are effectively thrown away.
> 
> Or put more simply, the kernel_entry arguments are only used by
> prom_init().  Is this right?

I believe that's correct. arch/mips/kernel/setup.c saves arcs_cmdline in
command_line and that's the end of arcs_cmdline. 

Pete

  reply	other threads:[~2001-11-06  2:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-06  1:09 Arguments for kernel_entry? Richard Hodges
2001-11-06  1:21 ` Pete Popov
2001-11-06  1:44   ` Richard Hodges
2001-11-06  2:07     ` Pete Popov [this message]
2001-11-06 21:58       ` _MIPS_SIM and others not defined by specs file warning Wayne Gowcher
2001-11-06 21:58         ` Wayne Gowcher

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=1005012474.27128.306.camel@zeus \
    --to=ppopov@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=rh@matriplex.com \
    /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