[U-Boot] [PATCH 05/17] x86: Simplify Flash-to-RAM code execution transition

Graeme Russ graeme.russ at gmail.com
Wed Jan 4 11:59:52 CET 2012


Hi Simon,

On 04/01/12 16:28, Simon Glass wrote:
> Hi Graeme,
> 
> On Sun, Jan 1, 2012 at 8:09 PM, Graeme Russ <graeme.russ at gmail.com> wrote:
>>
>> Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
> 
> Commit message?

Added in v2

> 
>> ---
>>  arch/x86/cpu/start.S              |   20 +++++---------------
>>  arch/x86/include/asm/u-boot-x86.h |    2 ++
>>  arch/x86/lib/board.c              |   25 ++++++++++++++++++++++---
>>  3 files changed, 29 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
>> index 7f9b6a7..9592158 100644
>> --- a/arch/x86/cpu/start.S
>> +++ b/arch/x86/cpu/start.S
>> @@ -96,32 +96,22 @@ car_init_ret:
>>        movw    $0x85, %ax
>>        jmp     die
>>
>> -.globl relocate_code
>> -.type relocate_code, @function
>> -relocate_code:
>> +.globl board_init_f_r_trampoline
>> +.type board_init_f_r_trampoline, @function
>> +board_init_f_r_trampoline:
>>        /*
>>         * SDRAM has been initialised, U-Boot code has been copied into
>>         * RAM, BSS has been cleared and relocation adjustments have been
>>         * made. It is now time to jump into the in-RAM copy of U-Boot
>>         *
>>         * %eax = Address of top of stack
> 
> *new* top of stack?

Changed to 'Address of top of new stack'

[snip]

>> -
>> -       /* Jump to in-RAM copy of board_init_r() */
>> -       call    *%ebp
>> +       /* Re-enter U-Boot by calling board_init_f_r */
>> +       call    board_init_f_r
> 
> Isn't this a bit of a funny name? Why not call it something like
> call_board_init_r() ?

No, board_init_f_r is where we are still running from Flash, but RAM has
been initialised so we can actually use it for the stack and Global Data.
board_init_r is when we are running exclusively from RAM

[snip]

Regards,

Graeme


More information about the U-Boot mailing list