All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] passing bootargs to Linux on NIOS
@ 2004-08-05 10:45 Thomas Brand
  2004-08-05 13:42 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Brand @ 2004-08-05 10:45 UTC (permalink / raw)
  To: u-boot

Hi,

I'm currently implementing the bootm command for the NIOS processor from 
Altera. I'd like to pass boot arguments to the kernel. I tried to figure 
  out how it works in other architectures, but I'm still clueless.

I call the function theKernel(...) with some arguments like I have seen 
it in other implementations. Now my question is, how do I access these 
arguments in the kernel?. I know the NIOS processor is passing the first 
4 arguments in registers when calling a function as a subroutine. But in 
the linux kernel in main.c is another call in the function 
start_kernel() for a kernel specific setup [setup_arch()] which will 
move the window-pointer and so change the registerfile. Therefore I 
cannot access the registers directly.

Or should I just define a piece of memory to put the arguments in? It 
will be hard coded in the kernel then.

Any hints? Every answer will be appreciated.

Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot-Users] passing bootargs to Linux on NIOS
  2004-08-05 10:45 [U-Boot-Users] passing bootargs to Linux on NIOS Thomas Brand
@ 2004-08-05 13:42 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2004-08-05 13:42 UTC (permalink / raw)
  To: u-boot

In message <41120FD7.9070002@imms.de> you wrote:
> 
> I'm currently implementing the bootm command for the NIOS processor from 
> Altera. I'd like to pass boot arguments to the kernel. I tried to figure 
>   out how it works in other architectures, but I'm still clueless.

What exactly don't you understand? 

> I call the function theKernel(...) with some arguments like I have seen 
> it in other implementations. Now my question is, how do I access these 
> arguments in the kernel?. I know the NIOS processor is passing the first 

Well, how does the NIOS version of the kernel access it's boot arguments?

> 4 arguments in registers when calling a function as a subroutine. But in 
> the linux kernel in main.c is another call in the function 

main.c is not the right place to look. You want to check the kernel's
entry point, i. e. "_start" (there is probably some "head.S"  file  n
your source tree?).

> Or should I just define a piece of memory to put the arguments in? It 
> will be hard coded in the kernel then.

You design it...


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The use of Microsoft crippleware systems is a sin that  carries  with
it its own punishment.
         -- Tom Christiansen in <6bo3fr$pj8$5@csnews.cs.colorado.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-05 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 10:45 [U-Boot-Users] passing bootargs to Linux on NIOS Thomas Brand
2004-08-05 13:42 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.