[U-Boot] [PATCH v4 00/14] efi: x86: Add EFI hello world and loader support for x86

Simon Glass sjg at chromium.org
Mon Nov 14 22:39:25 CET 2016


Resend attempt...


On 7 November 2016 at 08:47, Simon Glass <sjg at chromium.org> wrote:
> This series adds EFI loader support for x86. Since U-Boot already supports
> running as an EFI app (and as a payload) this is relatively
> straightforward, requiring just moving files into place and updating a few
> compiler flags.
>
> One problem with the EFI loader is that it lacks even rudimentary test
> support within U-Boot. At present the only way to test it is to boot an
> EFI application. As a step towards correcting this, this series also adds
> support for a 'hello world' test program which can be used to make sure
> that EFI loader support works correctly on a supported architecture. It is
> only a very simple program (it makes just two API calls!) but it does
> provide a sanity check and can be expanded as needed.
>
> No attempt is made to create a pytest with this, but it should be fairly
> straightforward to do so.
>
> Changes in v4:
> - Move hello world test program into new patch
> - Add new patch to add EFI app support
> - Add new patch to add EFI app support on aarch64
> - Use the build-generated 'hello world' program instead of a binary blob
> - Add new patch to adjust EFI files support efi_loader
> - Drop the binary 'hello world' program
>
> Changes in v3:
> - Include a link to the program instead of adding it to the tree
> - Fix several typos
> - Align backslashes to the same column
>
> Changes in v2:
> - Add new patch to tidy up selection of building the EFI stub
> - Remove EFI support from README.x86 TODO list
>
> Simon Glass (14):
>   x86: Correct a build warning in x86 tables
>   efi: Correct cache flush alignment
>   efi: Fix debug message address format
>   x86: Tidy up selection of building the EFI stub
>   efi: Makefile: Export variables for use with EFI
>   efi: Add support for a hello world test program
>   elf: arm: Add a few ARM relocation types
>   efi: arm: Add EFI app support
>   efi: arm: Add aarch64 EFI app support
>   efi: arm: Enable the hello world test program
>   x86: Move efi .lds files into the 'lib' directory
>   x86: Move efi .S files into the 'lib' directory
>   efi: x86: Adjust EFI files support efi_loader
>   x86: Enable EFI loader support
>
>  Makefile                                           |  11 +-
>  arch/arm/config.mk                                 |   7 ++
>  arch/arm/cpu/armv8/config.mk                       |   4 +
>  arch/arm/lib/Makefile                              |  10 ++
>  arch/arm/lib/crt0_aarch64_efi.S                    | 135 ++++++++++++++++++++
>  arch/arm/lib/crt0_arm_efi.S                        | 138 +++++++++++++++++++++
>  arch/arm/lib/elf_aarch64_efi.lds                   |  70 +++++++++++
>  arch/arm/lib/elf_arm_efi.lds                       |  70 +++++++++++
>  arch/arm/lib/reloc_aarch64_efi.c                   |  87 +++++++++++++
>  arch/arm/lib/reloc_arm_efi.c                       |  66 ++++++++++
>  arch/arm/lib/relocate.S                            |   3 +-
>  arch/arm/lib/relocate_64.S                         |   3 +-
>  arch/x86/config.mk                                 |  20 ++-
>  arch/x86/lib/Makefile                              |  23 ++++
>  .../lib/{efi/crt0-efi-ia32.S => crt0_ia32_efi.S}   |   0
>  .../{efi/crt0-efi-x86_64.S => crt0_x86_64_efi.S}   |   0
>  arch/x86/lib/efi/Makefile                          |  18 ---
>  arch/x86/{cpu/efi => lib}/elf_ia32_efi.lds         |   2 -
>  arch/x86/{cpu/efi => lib}/elf_x86_64_efi.lds       |   2 -
>  .../x86/lib/{efi/reloc_ia32.c => reloc_ia32_efi.c} |   0
>  .../lib/{efi/reloc_x86_64.c => reloc_x86_64_efi.c} |   0
>  arch/x86/lib/tables.c                              |   2 +
>  cmd/Kconfig                                        |  10 ++
>  cmd/bootefi.c                                      |  29 +++--
>  configs/efi-x86_defconfig                          |   1 +
>  configs/qemu-x86_efi_payload64_defconfig           |   1 +
>  configs/stm32f429-discovery_defconfig              |   1 +
>  doc/README.efi                                     |  22 ++++
>  doc/README.x86                                     |   1 -
>  include/asm-generic/sections.h                     |   2 +
>  include/efi.h                                      |   7 +-
>  include/elf.h                                      |  13 ++
>  lib/efi/Makefile                                   |   4 +-
>  lib/efi_loader/Kconfig                             |   2 +-
>  lib/efi_loader/Makefile                            |   4 +
>  lib/efi_loader/efi_image_loader.c                  |   3 +-
>  lib/efi_loader/helloworld.c                        |  24 ++++
>  scripts/Makefile.lib                               |  33 +++++
>  38 files changed, 787 insertions(+), 41 deletions(-)
>  create mode 100644 arch/arm/lib/crt0_aarch64_efi.S
>  create mode 100644 arch/arm/lib/crt0_arm_efi.S
>  create mode 100644 arch/arm/lib/elf_aarch64_efi.lds
>  create mode 100644 arch/arm/lib/elf_arm_efi.lds
>  create mode 100644 arch/arm/lib/reloc_aarch64_efi.c
>  create mode 100644 arch/arm/lib/reloc_arm_efi.c
>  rename arch/x86/lib/{efi/crt0-efi-ia32.S => crt0_ia32_efi.S} (100%)
>  rename arch/x86/lib/{efi/crt0-efi-x86_64.S => crt0_x86_64_efi.S} (100%)
>  rename arch/x86/{cpu/efi => lib}/elf_ia32_efi.lds (98%)
>  rename arch/x86/{cpu/efi => lib}/elf_x86_64_efi.lds (98%)
>  rename arch/x86/lib/{efi/reloc_ia32.c => reloc_ia32_efi.c} (100%)
>  rename arch/x86/lib/{efi/reloc_x86_64.c => reloc_x86_64_efi.c} (100%)
>  create mode 100644 lib/efi_loader/helloworld.c
>
> --
> 2.8.0.rc3.226.g39d4020
>


More information about the U-Boot mailing list