[U-Boot-Users] U-Boot hang

Leon KUKOVEC leon.kukovec at ultra.si
Thu Nov 13 10:03:49 CET 2003


Hi Wolfgang and the gang,

On Wed, 12 Nov 2003, Wolfgang Denk wrote:

> 0xA1FFFFFF - 0xa1fe0000 = 128 kB.
>
> > Stack size: #define CONFIG_STACKSIZE        (120<<10)      /* stack size */
>
> How do you manage to squeeze 120k of stack AND the U-Boot image in  a
> total of 128 kB?

I don't know, I'm fairly new to the U-Boot 'level' of programming so I
left it untouched. But I see the point here.

> Try what happens when setting TEXT_BASE = 0xA1F00000 ...

I've set it to 0xA1000000 to be on a safe side and it works. I still have to
find if my debugger is showing me correct values or not, $sp seems to be
0x0 all the time, but the code works ? BTW, thanks for your help.

Since these questions are really adressing memory layout I would like to
clarify some of the things myself. I was searching for documentation of
U-Boot memory layout for ARM in README and could not find none. Therefore I'm
asking you guys to verify the following diagram and update the things that
are missing and or are incorrect. This will hopefully help all new guys,
like me, joining the U-Boot project.

startup: 0x00000000 is FLASH

 0x00000000     .--U-Boot start--. ------------------------------------.
      .         |     code       |                                     |
      .         |     code       |                                     |
 0x00018ce4     |---U-Boot End---|  (u-boot.bin size: 101604 bytes)    |
      .         |                |                                     |
      .         |                |                                     |
                                                                       |
U-boot code is relocated to TEXT_ADDRESS as the arrow shows -------->  |
                                                                       |
 0x00000000     .----------------.                                     |
                |                | FLASH                               |
                |                |                                     |
                                                                       |
                .                .                                     |
                .                .                                     |
                                                                       |
                |                |                                     |
 0xA0000000     |----------------| RAM START                           |
                |                |                                     |
                                                                       |
                .  Free          .                                     |
                .    Memory      .                                     |
                       For                                             |
                |        Malloc  |                                     |
                |                |                                     |
                |---STACK END----|                                     |
                |     stack      |                                     |
                |     stack      |                                     |
 0xA1FE00000    |--TEXT_ADDRESS--|<------------------------------------'
                |     code       |
                |     code       |
 0xA1FFFFFF     `---U-Boot End---' RAM END


What direction does the stack grow ? From STACK END up(greater address) to
TEXT_ADDRESS or from TEXT_ADDRESS down(lower address) to STACK END ?

Thank you all.

-- 

Best Regards,
	Leon.




More information about the U-Boot mailing list