xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 00/15] arm64 EFI stub
@ 2014-09-10  0:51 Roy Franz
  2014-09-10  0:51 ` [PATCH V4 01/15] move x86 EFI boot code to common/efi Roy Franz
                   ` (14 more replies)
  0 siblings, 15 replies; 71+ messages in thread
From: Roy Franz @ 2014-09-10  0:51 UTC (permalink / raw)
  To: xen-devel, ian.campbell, stefano.stabellini, tim, jbeulich, keir
  Cc: Roy Franz, fu.wei

This patch series adds EFI boot support for arm64.  A PE/COFF header is created
in head.S, as there is no toolchain support for PE/COFF on arm64.  This also
has the advantage that the file is both an "Image" file and a PE/COFF
executable - the same binary can be loaded and run either way.  The EFI 'stub'
code is a shim layer that serves as the loader for the XEN kernel in the EFI
environment.  The stub loads the dom0 kernel and initrd if required, and adds
entries for them as well as for the EFI data structures into the device tree
passed to XEN.  Once the device tree is constructed, EFI boot services are
exited, and the stub transfers control to the normal XEN entry point.  The only
indication XEN has that it was loaded via the stub is that the device tree
contains EFI properties.  This is all very similar to the arm/arm64 Linux
kernel EFI stubs.

Changes since v3:
* Add symbolic link from common/efi/boot.c to arch/x86/efi/boot.c.  This
  simplifies the build system changes and resolves the parallel build issues
  in v3.  x86 EFI code build is unchanged, and ARM EFI code uses the normal
  common build structure. (This symlink seems to have confused git's moved file
  detection for boot.c)
* Fix XEN to be Xen throughout
* Fix spacing and missing blank lines between functions
* Add pseudo-prototype of efi_xen_start is head.S, change prototype to take
  pointer instead of integer to avoid cast, add comment explaining saving of x0
* Use uintptr_t in casts from uint to pointer for device tree.
* Change alignment requirements to 4k in PE/COFF header and alignment check
  in code.
* Rebased to latest master branch.

Changes since v2:
* Major refactor to use common EFI entry point and factor out arch specific
  code, rather than factoring out the common code.
* Update entire libfdt to v1.4.0 to provide fdt_create_empty_tree()

Changes since v1:
* Added common/efi directory for shared EFI code, and arch/arm/efi for 
  arm-specfic code.  Global build hacking of -fshort-wchar removed.
  arm32, arm64, and x86 with/without EFI enabled toolchain all build.
  The x86 build previously autodetected whether the EFI version should
  be built or not based on toolchain support.  I couldn't get this working
  nicely with the common code, so for x86 I have the common code always
  build, and the EFI autodection works as normal for building the EFI
  version.
* Basic use of the EFI memory map instead of FDT based memory description.
  More work needed to resolve differences between FDT description of 
  a small number of large memory banks with reserved regions, and EFI's
  potentially long list of available regions, which can be long.
* More refactoring of common EFI code to not directly exit using blexit(),
  as this broke the pre-linking targets.  All shared code returns status,
  and it is up to the caller to exit and clean up.
* Reduced the number of patches.  Refactoring of x86 code first, then moving
  all code to efi-shared.c in one patch.
* Fixed formatting/tab issues in new files, added Emacs footer.
* Fixed efi_get_memory_map to return NULL map pointer on error in addition
  to failed status.
* Added comments in head.S regarding PE/COFF specification, and 1:1 
  mapping used by EFI code.
* Updated device tree bindings to use new multiboot bindings.  Since the stub
  is always built into XEN, we don't have to support older bindings.

Roy Franz (15):
  move x86 EFI boot code to common/efi
  Move x86 specific funtions/variables to arch header
  create arch functions to get and process EFI memory map.
  Add architecture functions for pre/post ExitBootServices
  Add efi_arch_cfg_file() to handle arch specific cfg file fields
  Add efi_arch_handle_cmdline() for processing commandline
  Move x86 specific video and disk probing code
  Add efi_arch_memory() for arch specific memory setup
  Add arch specific module handling to read_file()
  Add SMBIOS and runtime services setup arch functions.
  Add several misc. arch functions for EFI boot code.
  Add efi_arch_use_config_file() function to control use of config file
  add arm64 cache flushing code from linux v3.16
  Update libfdt to v1.4.0
  Add ARM EFI boot support

 config/arm64.mk                             |    1 +
 xen/arch/arm/arm64/Makefile                 |    1 +
 xen/arch/arm/arm64/cache.S                  |  100 ++
 xen/arch/arm/arm64/head.S                   |  150 ++-
 xen/arch/arm/xen.lds.S                      |    1 +
 xen/arch/x86/efi/boot.c                     | 1724 +--------------------------
 xen/arch/x86/efi/runtime.c                  |    2 +-
 xen/common/Makefile                         |    1 +
 xen/common/efi/Makefile                     |    3 +
 xen/common/efi/boot.c                       |  831 +++++++++++++
 xen/common/libfdt/Makefile.libfdt           |    4 +-
 xen/common/libfdt/fdt.c                     |   30 +-
 xen/common/libfdt/fdt_empty_tree.c          |   84 ++
 xen/common/libfdt/fdt_ro.c                  |    7 +-
 xen/common/libfdt/fdt_rw.c                  |   31 +-
 xen/common/libfdt/fdt_sw.c                  |    4 +-
 xen/common/libfdt/fdt_wip.c                 |    2 +-
 xen/common/libfdt/version.lds               |    6 +
 xen/include/asm-arm/arm64/efibind.h         |  216 ++++
 xen/include/asm-arm/efi-boot.h              |  630 ++++++++++
 xen/include/asm-arm/efi.h                   |   29 +
 xen/include/asm-arm/efibind.h               |    2 +
 xen/include/asm-arm/setup.h                 |    2 +-
 xen/include/asm-x86/efi-boot.h              | 1079 +++++++++++++++++
 xen/{arch/x86/efi => include/asm-x86}/efi.h |    0
 xen/include/xen/libfdt/fdt.h                |   93 +-
 xen/include/xen/libfdt/libfdt.h             |  315 ++++-
 xen/include/xen/libfdt/libfdt_env.h         |    4 +
 28 files changed, 3573 insertions(+), 1779 deletions(-)
 create mode 100644 xen/arch/arm/arm64/cache.S
 mode change 100644 => 120000 xen/arch/x86/efi/boot.c
 create mode 100644 xen/common/efi/Makefile
 create mode 100644 xen/common/efi/boot.c
 create mode 100644 xen/common/libfdt/fdt_empty_tree.c
 create mode 100644 xen/include/asm-arm/arm64/efibind.h
 create mode 100644 xen/include/asm-arm/efi-boot.h
 create mode 100644 xen/include/asm-arm/efi.h
 create mode 100644 xen/include/asm-arm/efibind.h
 create mode 100644 xen/include/asm-x86/efi-boot.h
 rename xen/{arch/x86/efi => include/asm-x86}/efi.h (100%)

-- 
2.1.0.rc1

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

end of thread, other threads:[~2014-09-23 12:39 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10  0:51 [PATCH V4 00/15] arm64 EFI stub Roy Franz
2014-09-10  0:51 ` [PATCH V4 01/15] move x86 EFI boot code to common/efi Roy Franz
2014-09-11 13:50   ` Jan Beulich
2014-09-11 17:16     ` Roy Franz
2014-09-12  6:55       ` Jan Beulich
2014-09-10  0:51 ` [PATCH V4 02/15] Move x86 specific funtions/variables to arch header Roy Franz
2014-09-11 14:03   ` Jan Beulich
2014-09-11 17:33     ` Roy Franz
2014-09-12  7:04       ` Jan Beulich
2014-09-12  9:43         ` Ian Campbell
2014-09-12  9:53           ` Jan Beulich
2014-09-12  9:58             ` Ian Campbell
2014-09-12 16:52         ` Roy Franz
2014-09-10  0:51 ` [PATCH V4 03/15] create arch functions to get and process EFI memory map Roy Franz
2014-09-11 14:11   ` Jan Beulich
2014-09-11 17:40     ` Roy Franz
2014-09-12  7:07       ` Jan Beulich
2014-09-12  9:45         ` Ian Campbell
2014-09-12  9:56           ` Jan Beulich
2014-09-12 10:23             ` Ian Campbell
2014-09-12 10:35               ` Jan Beulich
2014-09-12 17:01                 ` Roy Franz
2014-09-10  0:51 ` [PATCH V4 04/15] Add architecture functions for pre/post ExitBootServices Roy Franz
2014-09-11 14:13   ` Jan Beulich
2014-09-11 17:44     ` Roy Franz
2014-09-12  7:08       ` Jan Beulich
2014-09-12  9:46         ` Ian Campbell
2014-09-12  9:58           ` Jan Beulich
2014-09-12 16:57             ` Roy Franz
2014-09-15  8:47               ` Jan Beulich
2014-09-10  0:51 ` [PATCH V4 05/15] Add efi_arch_cfg_file() to handle arch specific cfg file fields Roy Franz
2014-09-11 14:16   ` Jan Beulich
2014-09-11 18:11     ` Roy Franz
2014-09-12  7:10       ` Jan Beulich
2014-09-10  0:51 ` [PATCH V4 06/15] Add efi_arch_handle_cmdline() for processing commandline Roy Franz
2014-09-11 14:22   ` Jan Beulich
2014-09-11 18:24     ` Roy Franz
2014-09-10  0:51 ` [PATCH V4 07/15] Move x86 specific video and disk probing code Roy Franz
2014-09-11 14:26   ` Jan Beulich
2014-09-11 18:30     ` Roy Franz
2014-09-12  7:12       ` Jan Beulich
2014-09-10  0:51 ` [PATCH V4 08/15] Add efi_arch_memory() for arch specific memory setup Roy Franz
2014-09-11 14:27   ` Jan Beulich
2014-09-10  0:51 ` [PATCH V4 09/15] Add arch specific module handling to read_file() Roy Franz
2014-09-11 14:40   ` Jan Beulich
2014-09-10  0:52 ` [PATCH V4 10/15] Add SMBIOS and runtime services setup arch functions Roy Franz
2014-09-11 14:44   ` Jan Beulich
2014-09-11 22:03     ` Roy Franz
2014-09-11 23:41       ` Stefano Stabellini
2014-09-12  7:14       ` Jan Beulich
2014-09-12 16:24         ` Roy Franz
2014-09-10  0:52 ` [PATCH V4 11/15] Add several misc. arch functions for EFI boot code Roy Franz
2014-09-11 14:45   ` Jan Beulich
2014-09-10  0:52 ` [PATCH V4 12/15] Add efi_arch_use_config_file() function to control use of config file Roy Franz
2014-09-11 14:49   ` Jan Beulich
2014-09-11 23:54     ` Stefano Stabellini
2014-09-12  7:15       ` Jan Beulich
2014-09-12 16:30         ` Roy Franz
2014-09-10  0:52 ` [PATCH V4 13/15] add arm64 cache flushing code from linux v3.16 Roy Franz
2014-09-10  0:52 ` [PATCH V4 14/15] Update libfdt to v1.4.0 Roy Franz
2014-09-10  0:52 ` [PATCH V4 15/15] Add ARM EFI boot support Roy Franz
2014-09-11 14:53   ` Jan Beulich
2014-09-11 22:26     ` Roy Franz
2014-09-12  7:17       ` Jan Beulich
2014-09-12  0:49   ` Stefano Stabellini
2014-09-12  3:21     ` Roy Franz
2014-09-12 17:41       ` Stefano Stabellini
2014-09-12 17:50         ` Roy Franz
2014-09-12 17:55           ` Stefano Stabellini
2014-09-22 11:13             ` Ian Campbell
2014-09-23 12:39               ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).