linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] UEFI boot and runtime services support for 32-bit ARM
@ 2015-10-01 17:04 Ard Biesheuvel
  2015-10-01 17:04 ` [PATCH 1/9] arm64/efi: split off EFI init and runtime code for reuse by " Ard Biesheuvel
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2015-10-01 17:04 UTC (permalink / raw)
  To: linux-arm-kernel

This series adds support for booting the 32-bit ARM kernel directly from
UEFI firmware using a builtin UEFI stub. It mostly reuses refactored arm64
code, and the differences (primarily the PE/COFF header and entry point and
the efi_create_mapping() implementation) are split out into arm64 and ARM
versions.

Patch #1 splits off most of arch/arm64/kernel/efi.c into arch agnostic files
arm-init.c and arm-runtime.c under drivers/firmware/efi.

Patch #2 refactors the code split off in patch #1 to isolate the arm64 specific
pieces, and change a couple of arm64-isms that ARM handles slightly differently.

Patch #3 enables the generic early_ioremap and early_memremap implementations
for ARM. It reuses the kmap fixmap region, which is not used that early anyway.

Patch #4 adds support to ARM for the MEMBLOCK_NOMAP region flag.

Patch #5 splits off the core functionality of create_mapping() into a new
function __create_mapping() that we can reuse for mapping UEFI runtime regions.

Patch #6 factors out the early_alloc() routine so we can invoke __create_mapping
using another (late) allocator.

Patch #7 implements create_mapping_late() that uses a late allocator.

Patch #8 implements the UEFI support in the kernel proper to probe the UEFI
memory map and map the runtime services.

Patch #9 ties together all of the above, by implementing the UEFI stub, and
introducing the Kconfig symbols that allow all of this to be built.

There are a number of prerequisites for this series that have all been sent to
the linux-arm-kernel mailing list at some point (and mostly ignored).

Matt Fleming's efi-next branch:
https://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git/log/?h=next

arm64: EFI stub isolation:
http://thread.gmane.org/gmane.linux.kernel.efi/6414

arm64: remove UEFI reserved regions from linear mapping (aka MEMBLOCK_NOMAP)
http://thread.gmane.org/gmane.linux.kernel.mm/138474

arm64 UEFI early FDT handling
http://thread.gmane.org/gmane.linux.kernel.efi/6334

arm64/efi: adapt to UEFI 2.5 properties table changes
http://thread.gmane.org/gmane.linux.kernel.efi/5847

The complete series (including all prerequisites) can be found here:
https://git.linaro.org/people/ard.biesheuvel/linux-arm.git/shortlog/refs/heads/arm32-uefi-support

Instructions how to build and run the 32-bit ARM UEFI firmware can be found here:
https://wiki.linaro.org/LEG/UEFIforQEMU

Ard Biesheuvel (8):
  arm64/efi: split off EFI init and runtime code for reuse by 32-bit ARM
  arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM
  ARM: add support for generic early_ioremap/early_memremap
  ARM: only consider memblocks with NOMAP cleared for linear mapping
  ARM: split off core mapping logic from create_mapping
  ARM: factor out allocation routine from __create_mapping()
  ARM: implement create_mapping_late() for EFI use
  ARM: wire up UEFI init and runtime support

Roy Franz (1):
  ARM: add UEFI stub support

 arch/arm/Kconfig                        |  20 +
 arch/arm/boot/compressed/Makefile       |   5 +-
 arch/arm/boot/compressed/efi-header.S   | 130 +++++++
 arch/arm/boot/compressed/efi-stub.c     |  89 +++++
 arch/arm/boot/compressed/head.S         |  54 ++-
 arch/arm/boot/compressed/vmlinux.lds.S  |   7 +
 arch/arm/include/asm/Kbuild             |   1 +
 arch/arm/include/asm/efi.h              |  92 +++++
 arch/arm/include/asm/fixmap.h           |  28 +-
 arch/arm/include/asm/mach/map.h         |   1 +
 arch/arm/kernel/Makefile                |   1 +
 arch/arm/kernel/devtree.c               |   4 +
 arch/arm/kernel/efi.c                   |  71 ++++
 arch/arm/kernel/setup.c                 |  10 +-
 arch/arm/mm/init.c                      |  16 +-
 arch/arm/mm/ioremap.c                   |   9 +
 arch/arm/mm/mmu.c                       | 110 ++++--
 arch/arm64/include/asm/efi.h            |  16 +
 arch/arm64/kernel/efi.c                 | 392 ++------------------
 drivers/firmware/efi/Makefile           |   4 +-
 drivers/firmware/efi/arm-init.c         | 215 +++++++++++
 drivers/firmware/efi/arm-runtime.c      | 148 ++++++++
 drivers/firmware/efi/efi.c              |   4 +-
 drivers/firmware/efi/libstub/Makefile   |  12 +
 drivers/firmware/efi/libstub/arm-stub.c |   4 +-
 25 files changed, 1046 insertions(+), 397 deletions(-)
 create mode 100644 arch/arm/boot/compressed/efi-header.S
 create mode 100644 arch/arm/boot/compressed/efi-stub.c
 create mode 100644 arch/arm/include/asm/efi.h
 create mode 100644 arch/arm/kernel/efi.c
 create mode 100644 drivers/firmware/efi/arm-init.c
 create mode 100644 drivers/firmware/efi/arm-runtime.c

-- 
1.9.1

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

end of thread, other threads:[~2015-11-04 11:44 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 17:04 [PATCH 0/9] UEFI boot and runtime services support for 32-bit ARM Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 1/9] arm64/efi: split off EFI init and runtime code for reuse by " Ard Biesheuvel
2015-10-10 20:53   ` Matt Fleming
2015-10-12  7:57     ` Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 2/9] arm64/efi: refactor " Ard Biesheuvel
2015-10-10 21:00   ` Matt Fleming
2015-11-04 11:44     ` Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 3/9] ARM: add support for generic early_ioremap/early_memremap Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 4/9] ARM: only consider memblocks with NOMAP cleared for linear mapping Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 5/9] ARM: split off core mapping logic from create_mapping Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 6/9] ARM: factor out allocation routine from __create_mapping() Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 7/9] ARM: implement create_mapping_late() for EFI use Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 8/9] ARM: wire up UEFI init and runtime support Ard Biesheuvel
2015-10-01 17:04 ` [PATCH 9/9] ARM: add UEFI stub support Ard Biesheuvel
     [not found]   ` <CAD0U-h+zPhDe6Fqpg_vhF46FLjvvsbeSrQ_Fnj86o5cRc+A2QQ@mail.gmail.com>
2015-10-02 18:03     ` Ard Biesheuvel
2015-10-02 18:07       ` Ard Biesheuvel
     [not found]         ` <CAD0U-hK8=65digSpQ8b3zQcx4P3DFayu8eONDsYp9wA4ypPscg@mail.gmail.com>
2015-10-02 19:33           ` Ard Biesheuvel
     [not found]             ` <CAD0U-hLrY6ZoeT-p6ytmPmwxWcqw0cd3Ax-u0RbEd_Lkj_btUg@mail.gmail.com>
2015-10-05 12:56               ` Ard Biesheuvel
2015-10-02 20:38 ` [PATCH 0/9] UEFI boot and runtime services support for 32-bit ARM Russell King - ARM Linux
2015-10-02 20:49   ` Ard Biesheuvel

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).