Subject: RE: BootLoader on MIPS

From: Marc Karasek <[email-masked]>
Date: Fri, 22 Mar 2002 08:20:50 -0500

YAMON is prob the default right now.  It has support for loading a kernel
over tftp.  

I do not think it is OS though.  I maybe wrong, I will have to check the
source I have to see if it is or not.  I am currently adding  BOOTP support
to it, along with some other options.  If it is OS, then I will be providing
these back to the community.

/*******************************************
Marc Karasek
Sr. Firmware Engineer
iVivity Inc.
Ph: 678-990-1550 x238
Fax: 678-990-1551
email: [email-masked]
/*******************************************

-----Original Message-----
From: Y.H. Ku [mailto:[email-masked]]
Sent: Friday, March 22, 2002 3:16 AM
To: [email-masked]
Subject: BootLoader on MIPS

Hello there,

I am trying to porting Prom monitor code to
appropriate MIPS bootloader for loading Linux kernel

I ever make a test sucessfully with ppcboot's to load MBXloader
for transfering control to linux kernel (hardhat).

But I can not find the entry, and make decision what kind of BOOT LOADER
to use on MIPS platform.

I have the ddb5476 board type linux from montavista,
Could anybody give me some suggestion?

--Sam

---

From: "Y.H. Ku" <[email-masked]>
Date: Sat, 23 Mar 2002 16:42:41 +0800

Hi everybody,

I trace PMON into mips.S, and find the entry "_go".
the entry transfer control to client prog.

I am confused of what information PMON transfer to MIPS's BOOTLOADER
and transfer to which entry point of BOOTLOADER.

I found the bd_t struct of PPCBOOT.h for PPCBOOT package on POWERPC platform.
It is corresponding POWERPC-LINUX data structure bd_info in ~/include/asm/mbx.h 
(register r3~r7)

I just can not find the entry for MIPS's one. (can not find corresponding baget.h's one)

Could anybody tell me what is the information (register inforation) PMON transfer
to bootloader?

Or anybody can disscuss with me,

best regards,
--sam

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Marc Karasek
Sent: Friday, March 22, 2002 9:21 PM
To: 'Y.H. Ku'; [email-masked]
Subject: RE: BootLoader on MIPS

-----Original Message-----
From: Y.H. Ku [mailto:[email-masked]]
Sent: Friday, March 22, 2002 3:16 AM
To: [email-masked]
Subject: BootLoader on MIPS

Hello there,

--Sam

---

From: Jun Sun <[email-masked]>
Date: Mon, 25 Mar 2002 15:11:49 -0800

> Or anybody can disscuss with me,

NEC provides PMON for DDB5476.  You should be able to get it if it is not
already on the board.

Jun

---

From: "Y.H. Ku" <[email-masked]>
Date: Tue, 26 Mar 2002 18:09:13 +0800

Ya,
I have traced the PMON code (www.carmel.com/pmon/) with NEC DDB5476 board (linux package from Montavista),
(LSI Logic' Software Support Package for MIPS processors version 5.3.33)

However, though it seem clear that function "_go" of pmon/head.S transfer control to client program
by "j k0" (a exception)
BUT I do not understand what information tha PMON transfer to LINUX-MIPS KERNEL
I found the KERNEL's entry is "kernel_entry" of ~arch/mips/kernel/head.S.
But, I can not find any information just like "board information" be transferred well.
where is it!? using sp register with "j k0" command?
where is the memory setting be transferred?
What MIPS LINUX needed!?
(PPCBOOT to PPC-LINUX is clear with a board_info struct, initrd_start and initrd_end ... and work well...

REALLY thanks for help,
--Ku

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Jun Sun
Sent: Tuesday, March 26, 2002 7:12 AM
To: Y.H. Ku
Cc: Marc Karasek; [email-masked]
Subject: Re: BootLoader on MIPS

Jun

---

From: Jun Sun <[email-masked]>
Date: Tue, 26 Mar 2002 10:08:36 -0800

Y.H. Ku wrote:

> where is it!?

"board information" is not transferred to kernel.  However, parameters you
pass (as in "go <param>") are passed in as standard C main argument style.
These are processed in arch/mips/ddb5xxx/common/prom.c file, i.e., held in a0,
a1 registers.

> using sp register with "j k0" command?

No. sp is not meaningful when kernel starts.

> where is the memory setting be transferred?

system ram size?  It is hardcode in ddb5476 code.  See
include/asm/ddb5xxx/ddb5476.h file.

> What MIPS LINUX needed!?

I thought you have montavista linux (probably hardhat 2.0?).

> (PPCBOOT to PPC-LINUX is clear with a board_info struct, initrd_start and initrd_end ... and work well...

PPC booting is more regular than MIPS in general.  So they have a more uniform
 bootup process and structure.  MIPS have a lot of vendors who are usually
very creative.

Jun

---

From: "Y.H. Ku" <[email-masked]>
Date: Wed, 27 Mar 2002 20:14:38 +0800

Thanks All!!!!

What I want to know is how PMON jump to linux kernel image,

when mips.S function "_go" execute "j k0" command, 
(k0 is assigned by LREG(k0,R_EPC,gp)  /* EPC */)
k0 will be 40*(DBGREG)=40* (0x7ff00bad), 

the address is kuseg's domain. is it really work to turnin linux kernel image??
(In common case, linux kernl image always start from 0x100000)

any suggestion?
I just want to know MORE about the LINK method between PMON and MIPS-Linux?

best regards,
--Ku

---

From: Geert Uytterhoeven <[email-masked]>
Date: Wed, 27 Mar 2002 13:23:27 +0100 (MET)

> I just want to know MORE about the LINK method between PMON and MIPS-Linux?

On NEC DDB Vrc-5074, I always used something like

    call kernel_entry -s 'console=ttyS4'

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email-masked]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds