[U-Boot-Users] Re: U-Boot Boot Sequence
Wolfgang Denk
wd at denx.de
Mon Jan 13 14:08:01 CET 2003
In message <29726.1042461249 at www64.gmx.net> you wrote:
>
> > See the README.
>
> I've already looked. Here is a part:
>
> > System Initialization:
> > ----------------------
> > In the reset configuration, U-Boot starts at the reset entry point
> > (on most PowerPC systens at address 0x00000100). Because of the reset
> > configuration for CS0# this is a mirror of the onboard Flash memory.
> > To be able to re-map memory U-Boot then jumps to it's link address.
>
> What means link adress exactly? Run-Time adresses to RAM?
Link address is the address for which the code is linked, i. e. the
argument to the "-Ttext" linker option. You defined this as TEXT_BASE
in your board specific config file. And no, this is not a RAM
address, this is an address in flash memory (after the final flash
mapping has been set up).
> But anyway whether to boot from, at adress 0x100 must be the the _start
> label located. How (or where) do you set the _start label to this adress
> in U-Boot image?
See the previous discussion on the list, and read the MPC860 User's
manual about the reset sequence. In short: after reset, the memory
addresses by CS0 will be mirrored, so it will be visible at
0x00000000 and 0xFFF00000 and many other addresses as well.
> The other question was why to jump to the in_flash label? Following
This has been answered in detail before. Once we program an address
mask to OR0, the mirroring will stop, and we must be sure that our
code is executing from an address that "stays visible".
> When I look what happens before the jump to the in_flash label, I see,
> that there no BRx or ORx have been set. Actually we still running, still
> the flash is mirrored over the whole adress space.
Right, if we would program OR0 before jumping to a correct address in
the area defined by the link address we would simply crash as the
code woul be no longer visible.
> Anyway, what important is, are the following statments true:
>
> 1) We, for instance, burn U-Boot image to external flash
OK.
> 2) and start at adress 0x100.
OK.
> 3) Because code is relocatable, you can start executing where you like, for
> instance
> on adress X, depending on your processor.
Wrong. You start at _start only, which in your case seems to be
visible at 0x100 after reset.
> 4) You simply must ensure _start is at your entry point
This sentence makes no sense. _start _IS_ the entry point. Period.
> -> How is this done on the MPC8xx, since _start will be in .text and .text
> following .interp in the flash image?
There is no ".interp" in the image. Here is an example:
-> objdump -h u-boot
u-boot: file format elf32-big
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00021590 40000000 40000000 00000078 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .reloc 00001158 40021600 40021600 00021678 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .data 0000642c 40022758 40022758 000227d0 2**3
CONTENTS, ALLOC, LOAD, DATA
3 .bss 00004270 40028c00 40028c00 00028c78 2**2
ALLOC
4 .stab 000318d8 00000000 00000000 00028c78 2**2
CONTENTS, READONLY, DEBUGGING
5 .stabstr 00010335 00000000 00000000 0005a550 2**0
CONTENTS, READONLY, DEBUGGING
6 .comment 00000cb1 00000000 00000000 0006a885 2**0
CONTENTS, READONLY
I have no idea what ".iterp" is. There is no single reference to any
".interp" in the whole U-Boot code.
> 5) Since we procced executing from _start in flash,
>
> -> why to jump to in_flash as already been mentioned?
Go back to position 0, and re-read this message from beginning.
I am NOT going to explain this YET ANOTHER TIME.
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
Any technology distinguishable from magic is insufficiently advanced.
More information about the U-Boot
mailing list