All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 00/14] efi: x86: Add EFI hello world and loader support for x86
@ 2016-11-07 15:47 Simon Glass
  2016-11-07 15:47 ` [U-Boot] [PATCH v4 01/14] x86: Correct a build warning in x86 tables Simon Glass
                   ` (14 more replies)
  0 siblings, 15 replies; 29+ messages in thread
From: Simon Glass @ 2016-11-07 15:47 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-11-14 23:06 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 15:47 [U-Boot] [PATCH v4 00/14] efi: x86: Add EFI hello world and loader support for x86 Simon Glass
2016-11-07 15:47 ` [U-Boot] [PATCH v4 01/14] x86: Correct a build warning in x86 tables Simon Glass
2016-11-14 23:05   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 02/14] efi: Correct cache flush alignment Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot,v4,02/14] " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 03/14] efi: Fix debug message address format Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 04/14] x86: Tidy up selection of building the EFI stub Simon Glass
2016-11-14 23:05   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 05/14] efi: Makefile: Export variables for use with EFI Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 06/14] efi: Add support for a hello world test program Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 07/14] elf: arm: Add a few ARM relocation types Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 08/14] efi: arm: Add EFI app support Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot,v4,08/14] " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 09/14] efi: arm: Add aarch64 " Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 10/14] efi: arm: Enable the hello world test program Simon Glass
2016-11-07 15:47 ` [U-Boot] [PATCH v4 11/14] x86: Move efi .lds files into the 'lib' directory Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 12/14] x86: Move efi .S " Simon Glass
2016-11-14 23:05   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 13/14] efi: x86: Adjust EFI files support efi_loader Simon Glass
2016-11-14 23:06   ` [U-Boot] [U-Boot, v4, " Alexander Graf
2016-11-07 15:47 ` [U-Boot] [PATCH v4 14/14] x86: Enable EFI loader support Simon Glass
2016-11-14 23:05   ` [U-Boot] [U-Boot,v4,14/14] " Alexander Graf
2016-11-14 21:39 ` [U-Boot] [PATCH v4 00/14] efi: x86: Add EFI hello world and loader support for x86 Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.