[U-Boot] [PATCH 20/22] x86: Disable CAR before relocation on platforms that need it

Bin Meng bmeng.cn at gmail.com
Wed Dec 31 07:21:13 CET 2014


Hi Simon,

On Sun, Dec 28, 2014 at 10:20 AM, Simon Glass <sjg at chromium.org> wrote:
> For platforms with CAR we should disable it before relocation. Check if
> this function is available and call it if so.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  arch/x86/cpu/start.S | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
> index 125782c..8cebde1 100644
> --- a/arch/x86/cpu/start.S
> +++ b/arch/x86/cpu/start.S
> @@ -205,6 +205,16 @@ board_init_f_r_trampoline:
>         /* Setup global descriptor table so gd->xyz works */
>         call    setup_gdt
>
> +       /* Set if we need to disable CAR */
> +       movl    $car_uninit, %eax
> +       cmpl    $0, %eax
> +       jz      car_ret
> +
> +       /* Pass return address in ebx */
> +.weak  car_uninit
> +       movl    $car_ret, %ebx
> +       jmp     car_uninit

Can we use 'call' here instead of jmp and %ebx as the return address?

> +car_ret:

car_uninit_ret

>         /* Re-enter U-Boot by calling board_init_f_r */
>         call    board_init_f_r
>
> --

Regards,
Bin


More information about the U-Boot mailing list