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
|