[U-Boot] [PATCH v2 25/63] x86: board_f: Update init sequence for 64-bit startup

Bin Meng bmeng.cn at gmail.com
Wed Dec 28 04:26:06 CET 2016


Hi Simon,

On Sun, Nov 20, 2016 at 4:25 AM, Simon Glass <sjg at chromium.org> wrote:
> Adjust the code so that 64-bit startup works. Since we don't need to do CAR
> changes in U-Boot proper anymore (they are done in SPL) we can simplify the
> flow and return normally from board_init_f().
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
>  common/board_f.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/common/board_f.c b/common/board_f.c
> index 4b74835..f19f998 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -767,7 +767,8 @@ static int setup_reloc(void)
>  }
>
>  /* ARM calls relocate_code from its crt0.S */
> -#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX)
> +#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
> +               !CONFIG_IS_ENABLED(X86_64)
>
>  static int jump_to_copy(void)
>  {
> @@ -1045,7 +1046,8 @@ static init_fnc_t init_sequence_f[] = {
>  #if defined(CONFIG_XTENSA)
>         clear_bss,
>  #endif
> -#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX)
> +#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
> +               !CONFIG_IS_ENABLED(X86_64)
>         jump_to_copy,
>  #endif
>         NULL,
> @@ -1079,7 +1081,7 @@ void board_init_f(ulong boot_flags)
>                 hang();
>
>  #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
> -               !defined(CONFIG_EFI_APP)
> +               !defined(CONFIG_EFI_APP) && !CONFIG_IS_ENABLED(X86_64)
>         /* NOTREACHED - jump_to_copy() does not return */
>         hang();
>  #endif
> @@ -1103,8 +1105,10 @@ void board_init_f(ulong boot_flags)
>   * NOTE: At present only x86 uses this route, but it is intended that
>   * all archs will move to this when generic relocation is implemented.
>   */
> -static init_fnc_t init_sequence_f_r[] = {
> +static const init_fnc_t init_sequence_f_r[] = {

nits: adding "const" is irrelevant to this patch.

> +#if !CONFIG_IS_ENABLED(X86_64)
>         init_cache_f_r,
> +#endif
>
>         NULL,
>  };
> --

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Regards,
Bin


More information about the U-Boot mailing list