diff mbox series

[3/8] x86: start64: Support HOB in 64-bit U-Boot

Message ID 20200422004507.2025-4-aiden.park@intel.com
State New
Headers show
Series Support 64-bit U-Boot for Slim Bootloader | expand

Commit Message

Park, Aiden April 22, 2020, 12:45 a.m. UTC
From: Aiden Park <aiden.park at intel.com>

This will allow 64-bit U-Boot to use HOB.

Signed-off-by: Aiden Park <aiden.park at intel.com>
---
 arch/x86/cpu/start64.S | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Simon Glass April 26, 2020, 8:15 p.m. UTC | #1
Hi Aiden,

On Tue, 21 Apr 2020 at 18:45, <aiden.park at intel.com> wrote:
>
> From: Aiden Park <aiden.park at intel.com>
>
> This will allow 64-bit U-Boot to use HOB.
>
> Signed-off-by: Aiden Park <aiden.park at intel.com>
> ---
>  arch/x86/cpu/start64.S | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/x86/cpu/start64.S b/arch/x86/cpu/start64.S
> index b8ac5aab57..7faf4f6f13 100644
> --- a/arch/x86/cpu/start64.S
> +++ b/arch/x86/cpu/start64.S
> @@ -25,6 +25,11 @@ init_64bit_entry_ret:
>
>         call    board_init_f_init_reserve
>
> +#if defined(CONFIG_X86_RUN_64BIT_ONLY) && defined(CONFIG_USE_HOB)
> +       mov     %r10, %rdi
> +       call    set_hob_list
> +#endif

Similar question - would it be safe to always do this?

> +
>         xor     %rdi, %rdi
>         call    board_init_f
>         call    board_init_f_r
> --
> 2.20.1
>

Regards,
Simon
Park, Aiden April 29, 2020, 5:57 a.m. UTC | #2
Hi Simon,

> -----Original Message-----
> From: Simon Glass <sjg at chromium.org>
> Sent: Sunday, April 26, 2020 1:16 PM
> To: Park, Aiden <aiden.park at intel.com>
> Cc: Bin Meng <bmeng.cn at gmail.com>; U-Boot Mailing List <u-
> boot at lists.denx.de>
> Subject: Re: [PATCH 3/8] x86: start64: Support HOB in 64-bit U-Boot
> 
> Hi Aiden,
> 
> On Tue, 21 Apr 2020 at 18:45, <aiden.park at intel.com> wrote:
> >
> > From: Aiden Park <aiden.park at intel.com>
> >
> > This will allow 64-bit U-Boot to use HOB.
> >
> > Signed-off-by: Aiden Park <aiden.park at intel.com>
> > ---
> >  arch/x86/cpu/start64.S | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/x86/cpu/start64.S b/arch/x86/cpu/start64.S index
> > b8ac5aab57..7faf4f6f13 100644
> > --- a/arch/x86/cpu/start64.S
> > +++ b/arch/x86/cpu/start64.S
> > @@ -25,6 +25,11 @@ init_64bit_entry_ret:
> >
> >         call    board_init_f_init_reserve
> >
> > +#if defined(CONFIG_X86_RUN_64BIT_ONLY) && defined(CONFIG_USE_HOB)
> > +       mov     %r10, %rdi
> > +       call    set_hob_list
> > +#endif
> 
> Similar question - would it be safe to always do this?
> 
You are right. The r10 is a scratch register. The r12-r15 would be correct choice.
Instead of this, let me try to leverage arch_spl_handoff.

> > +
> >         xor     %rdi, %rdi
> >         call    board_init_f
> >         call    board_init_f_r
> > --
> > 2.20.1
> >
> 
> Regards,
> Simon

Best Regards,
Aiden
diff mbox series

Patch

diff --git a/arch/x86/cpu/start64.S b/arch/x86/cpu/start64.S
index b8ac5aab57..7faf4f6f13 100644
--- a/arch/x86/cpu/start64.S
+++ b/arch/x86/cpu/start64.S
@@ -25,6 +25,11 @@  init_64bit_entry_ret:
 
 	call	board_init_f_init_reserve
 
+#if defined(CONFIG_X86_RUN_64BIT_ONLY) && defined(CONFIG_USE_HOB)
+	mov	%r10, %rdi
+	call	set_hob_list
+#endif
+
 	xor	%rdi, %rdi
 	call	board_init_f
 	call	board_init_f_r