linux-mips
[Top] [All Lists]

Re: Arguments for kernel_entry?

To: Pete Popov <ppopov@mvista.com>
Subject: Re: Arguments for kernel_entry?
From: Richard Hodges <rh@matriplex.com>
Date: Mon, 5 Nov 2001 17:44:53 -0800 (PST)
Cc: linux-mips <linux-mips@oss.sgi.com>
In-reply-to: <1005009677.27128.300.camel@zeus>
Sender: owner-linux-mips@oss.sgi.com
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?

Thanks!

-Richard


<Prev in Thread] Current Thread [Next in Thread>