[PATCH 07/12] efi: move x86 efi boot support to x86 arch

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Feb 23 03:39:34 PST 2017


On 08:27 Thu 16 Feb     , Michael Olbrich wrote:
> On Wed, Feb 15, 2017 at 08:34:15PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > prepare to drop the efi arch as efi boot up is not arch sepecific
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > ---
> >  Documentation/boards/efi.rst                 |   2 +-
> >  arch/x86/Kconfig                             |  53 ++++++++++++--
> >  arch/x86/Makefile                            |  74 +++++++++++++++++--
> >  arch/x86/configs/efi_defconfig               |  78 ++++++++++++++++++++
> >  arch/x86/configs/generic_defconfig           |   1 +
> >  arch/x86/include/asm/elf.h                   |  86 +++++++++++++++-------
> >  arch/x86/include/asm/io.h                    |  71 +++++++++---------
> >  arch/x86/include/asm/types.h                 |  51 ++++++++-----
> >  arch/x86/include/asm/unaligned.h             |   5 ++
> >  arch/x86/lib/Makefile                        |   2 +
> >  arch/x86/lib/asm-offsets.c                   |   7 ++
> >  arch/x86/mach-efi/.gitignore                 |   2 +
> >  arch/x86/mach-efi/Makefile                   |   4 +
> >  arch/x86/mach-efi/crt0-efi-ia32.S            |  76 +++++++++++++++++++
> >  arch/x86/mach-efi/crt0-efi-x86_64.S          |  75 +++++++++++++++++++
> >  arch/x86/mach-efi/elf_ia32_efi.lds.S         | 106 +++++++++++++++++++++++++++
> >  arch/x86/mach-efi/elf_x86_64_efi.lds.S       |  99 +++++++++++++++++++++++++
> >  arch/x86/mach-efi/include/mach/barebox.lds.h |   0
> 
> I think this should be done instead of adding an empty file:
> 
> diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
> index c8a919b928c9..dd2d286d32ec 100644
> --- a/include/asm-generic/barebox.lds.h
> +++ b/include/asm-generic/barebox.lds.h
> @@ -6,7 +6,7 @@
>  #define STRUCT_ALIGNMENT 32
>  #define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
>  
> -#if defined CONFIG_X86 || \
> +#if defined CONFIG_X86_32 || \
>  	defined CONFIG_ARCH_EP93XX || \
>  	defined CONFIG_ARCH_ZYNQ

I don't like the idead to add more and more ifdef

It's better to switch to a Kconfig instead

and as we can build EFI for X86 32 this will not work anyway

Best Regards,
J.



More information about the barebox mailing list