Cannot call C function in "Simple" boot loader

From: Frank (young726_at_yahoo.com)
Date: 04/19/04


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



Relevant Pages

  • Re: MSP430 in-circuit firmware upgrade question
    ... I still don't quite understand what you mean by make the interrupt vector ... boot loader will be able to receive new application firmware ... >> over UART and program it into the flash to replace the older application. ... >> have to be copied to RAM first? ...
    (comp.arch.embedded)
  • Re: Cannot call C function in "Simple" boot loader
    ... I see you're still struggling over the PPC board and vxworks boot loader. ... so when comparing a RAM address to a Flash address ... > * the RAM address will always be greater. ...
    (comp.os.linux.embedded)
  • Re: S3C2410 Nand Boot
    ... initialize the RAM and copy the bootloader from flash to RAM. ... <apellerin AT adeneo DOT adetelgroup DOT com> ... doesn't have a NOR Flash to Boot Loader. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Lots of easy questions about drivers/linking
    ... >have a boot loader in FLASH that copies the BIN to RAM ... for execution. ...
    (microsoft.public.windowsce.platbuilder)
  • How Warmboot is implementing in Nand flash based Boot media.
    ... The approach to load the wince image of a NAND flash based boot media is to ... When we done a Warmboot the current boot loader try to copy the ... jump the Program counter in to the starting address of Wince OS image in RAM ...
    (microsoft.public.windowsce.platbuilder)

Loading