Subject: Arguments for kernel_entry?

From: Richard Hodges <[email-masked]>
Date: Mon, 5 Nov 2001 17:09:01 -0800 (PST)

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().

Thanks!

-Richard

---

From: Pete Popov <[email-masked]>
Date: 05 Nov 2001 17:21:17 -0800

> 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

Pete

---

From: Richard Hodges <[email-masked]>
Date: Mon, 5 Nov 2001 17:44:53 -0800 (PST)

> 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

---

From: Pete Popov <[email-masked]>
Date: 05 Nov 2001 18:07:54 -0800

> 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

---

From: Wayne Gowcher <[email-masked]>
Date: Tue, 6 Nov 2001 13:58:24 -0800 (PST)

I am attempting to compile X using egcs-2.91.66 and I
am getting the following warnings which eventually
lead to the build failing.

 #warning "Macro _MIPS_ISA has not been defined by
specs file"
../../../../config/makedepend/makedepend: warning: 
vga.c: 24: #warning "Macro _MIPS_SIM has not been
defined by specs file"
../../../../config/makedepend/makedepend: warning: 
vga.c: 28: #warning "Macro _MIPS_SZINT has not been
defined by specs file"
../../../../config/makedepend/makedepend: warning: 
vga.c: 32: #warning "Macro _MIPS_SZLONG has not been
defined by specs file"
../../../../config/makedepend/makedepend: warning: 
vga.c: 36: #warning "Macro _MIPS_SZPTR has not been
defined by specs file"
../../../../config/makedepend/makedepend: warning: 
vga.c: 44: #warning "Please update your GCC to GCC
2.7.2-4 or newer"

I have previously successfully compiled X using
egcs-2.90.29.

Could someone tell me what I may be doing wrong ?
Or what I need to pas into the compiler in order for
it to read the specs file correctly.

Would also be grateful if someone could point to me a
document or something explaining what the specs file
is and how it is used. By looking at it, I figure it
to be a file that sets integer lengths, procesor type
etc. But it sure would be nice to get a bigger picture
explanation.

TIA

Wayne

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

---

From: Wayne Gowcher <[email-masked]>
Date: Tue, 6 Nov 2001 13:58:24 -0800 (PST)

TIA

Wayne