Re: Question on bootloader Relocation?

From: Dean Ramsier (ramsiernospam_at_nospam.com)
Date: 01/17/05


Date: Mon, 17 Jan 2005 09:09:22 -0500

No. The bootloader must copy itself to RAM and jump there. That happens
very early, as soon as RAM is available. The code from the reset vector to
the point of relocation must be position independent.

Also note that many/most bootloaders use virtual addresses in their bib
files. So the same problem exists there. Code has to be relative until the
MMU is turned on.

-- 
Dean Ramsier - eMVP
"Ajaya Babu" <AjayaBabu@discussions.microsoft.com> wrote in message
news:AC7858A7-8D94-4969-803C-F4705876252E@microsoft.com...
> Hi All,
>
> I am newbie to Windows CE I was going through bootloader documentation and
> code.
>
> I understand from BIB file documentation and Bootloader documentation we
can
> locate the boot loader to the RAMIMAGE + RAMOFFSET. I've seen most of the
> existing ARM bootloaders ( S3C2410, OMAP ) configure RAMIMAGE to the SDRAM
> address or Internal RAM address and relocate themselves to SDRAM from
StartUp
> routine after initialization of SDRAM controller.
>
> However StartUp routine suppose to run from RESET vector, most of the time
> from Flash located at 0 location ( in case of ARM ). But we are
configuring
> RAMIMAGE in the BIB file as SDRAM address that implicitly menas if we need
to
> run the binary from Flash  it must be position independent code is this
> correct??
>
> But who is telling Linker/Locator about this. BIB files are typically
> configuring RAMIMAGE to RAM. Does this mean entire boot loader code is
> position independent??
>
>
> -- 
> Imagination is Better than Knowledge by E=mc^2


Relevant Pages

  • Re: what is the functionality of kernelrelocate() of eboot code?
    ... The bootloader is copied to RAM, but the bootloader doesn't know it. ... why the relocation should be needed for ram based boot code and global ... From the bootloadermainthe kernelrelocate() is located at the ...
    (microsoft.public.windowsce.platbuilder)
  • Re: XIP - Execute in Place (For Bootloader)
    ... then the bootloader will not get copied to the RAM from the Flash. ... I would like to execute the Bootloader from the Flash Memory itself ... How to make the Bootloader to Execute from the Flash Memory itself ...
    (comp.arch.embedded)
  • Re: Relocate from nor to ddr CE 5.0
    ... it depends on the bootloader implementation; ... programmed into flash. ... but the image info says it belongs to ram. ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Free x86 C compiler wanted
    ... bootloader would copy the code from PROM to RAM then branch to the ... it may be a problem of your bootloader? ... Why at all do you copy the program into the RAM, ... AFAIR the entry point of an COM file simply is the first byte. ...
    (comp.compilers)
  • Re: runing EBoot from NOR FLASH
    ... you're running directly from flash and not copying the bootloader to RAM ... you can change your .bib file to locate the image at ... EBOOT 8c000000 00040000 RAMIMAGE ... RAM 8c026000 00006000 RAM ...
    (microsoft.public.windowsce.platbuilder)