[U-Boot-Users] [PATCH] Use an absolute address when jumping out of 4k boot page

Kumar Gala galak at kernel.crashing.org
Tue Aug 7 22:35:03 CEST 2007


On Aug 7, 2007, at 2:15 PM, Wolfgang Denk wrote:

> In message <Pine.LNX. 
> 4.64.0708071321210.9458 at blarg.am.freescale.net> you wrote:
>> On e500 when we leave the 4k boot page we should use an absolute  
>> address since
>> we don't know where the board code may want us to be really  
>> running at.
>
> I'm not sure I understand the problem or your intentions.
>
> Normally we try to keep start.S more  or  less  position-independent.
> Thus,  an  absolute  jump  seems  contra-productive  to me. Maybe I'm
> missing something?

The code in 85xx/start.S is aware of CFG_MONITOR_BASE.  In the first  
4k code that is running @ 0xfffff000 we setup all the TLBs and local  
access windows that will be used through out the system.  It seems  
reasonable that if my FLASH is going to end up at 0xe0000000 -  
0xe7ffffff that when I jump out of that first 4k page I'd go to an  
address range that is in CFG_MONITOR_BASE.

In my particular case I have CFG_MONITOR_BASE set to 0xe7f80000.  I  
don't have a TLB or local access window to cover anything but  
0xfffff000 so the previous code being relative would have gotten me  
to something like 0xfff80100, however I want to be at 0xe7f80100.

Today the code does:

* do init 4k page setup code
* jump to _start_cont (relative, outside of first 4k)
* setup d-cache for stack
* jump to flash_base (absolute)

All I'm doing is moving the absolute relocation to occur when we jump  
out of the 4k page instead of a few instructions later.

- k







More information about the U-Boot mailing list