Cannot call C function in "Simple" boot loader
From: Frank (young726_at_yahoo.com)
Date: 04/19/04
- Next message: Michael Schnell: "Re: Linux 2.6 Kernel in Real-time Environment"
- Previous message: DD: "Embedded linux with best developer tools?"
- Next in thread: Steven Rostedt: "Re: Cannot call C function in "Simple" boot loader"
- Reply: Steven Rostedt: "Re: Cannot call C function in "Simple" boot loader"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Apr 2004 18:47:38 -0700
Hello,
I am trying to boot up a monta vista linux kernel with vxworks boot
loader. The vxworks boot loader can load the "Simple" boot loader and
execute it with no
problem. But when relocate.S tried to call the C function
decompress_kernel() in misc-simple.c, it was stucked and can't go
through. I guess there are some stack setup or something else I didn't
do it right. Could you give any advice on what could be the problem
during C function calling?
BTW, I found this comment in relocate.S:
===========================================================================
/* Move this code somewhere safe. This is max(load + size, end)
* BIG ASSUMPTION: Addresses below 0x80000000 are assumed to be
* in RAM, and addresses above 0x80000000 are assumed to be in
* Flash. The cmpw instruction below does a signed integer
* comparison, so when comparing a RAM address to a Flash address
* the RAM address will always be greater. This allows the
* relocation to work when the load address is in Flash.
* r8 == load address
*/
GETSYM(r4, start)
GETSYM(r5, end)
sub r6,r5,r4
add r6,r8,r6 /* r6 == phys(load + size) */
===========================================================================
I don't quite understand the assumption, i.e. addresses below
0x80000000 are RAM and above are Flash. Where is this assumption
reflected in this Simple boot loader? For the board I am using,
addresses below 0xFFE00100 are RAM and addresses above 0xFFEE00100 are
Flash. How should I change the code (or Makefile?) according to my
hardware spec?
Thanks in advance for your help!
Frank
- Next message: Michael Schnell: "Re: Linux 2.6 Kernel in Real-time Environment"
- Previous message: DD: "Embedded linux with best developer tools?"
- Next in thread: Steven Rostedt: "Re: Cannot call C function in "Simple" boot loader"
- Reply: Steven Rostedt: "Re: Cannot call C function in "Simple" boot loader"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|