Skip to content

Add UEFI support for RISC-V

Ard Biesheuvel linux-efi linux-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest7 patches 10 repliesIn review

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7efi/libstub: Move arm-stub to a common filearch/arm/Kconfig arch/arm64/Kconfig drivers/firmware/efi/Kconfig +2 more+10 -100 replies
2/7efi/libstub: Make initrd file loader configurabledrivers/firmware/efi/Kconfig drivers/firmware/efi/libstub/file.c+14 -03 replies
3/7efi/libstub/riscv: add arch specific efi.h header filearch/riscv/include/asm/efi.h+41 -00 replies
4/7include: pe.h: Add RISC-V related PE definitioninclude/linux/pe.h+3 -00 replies
5/7RISC-V: Define fixmap bindings for generic early ioremap supportarch/riscv/Kconfig arch/riscv/include/asm/Kbuild arch/riscv/include/asm/fixmap.h +1 more+21 -00 replies
6/7RISC-V: Add PE/COFF header for EFI stubarch/riscv/include/asm/sections.h arch/riscv/kernel/Makefile arch/riscv/kernel/efi-header.S +3 more+206 -20 replies
7/7RISC-V: Add EFI stub support.arch/riscv/Kconfig arch/riscv/Makefile arch/riscv/configs/defconfig +3 more+143 -23 replies

Reviews trailers per patch

4 of 7 patches have a Reviewed-by or Acked-by.

PatchPalmer DabbeltArd Biesheuvel
1/7R-b
2/7
3/7R-b
4/7R-b
5/7A-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/7] Add UEFI support for RISC-V

This is a rework of Atish's series [0] to add EFI stub loader support to the RISC-V port. The purpose is to split the code in a way that makes it amenable to being merged via different trees during the same cycle. While at it, I added a patch to disable initrd= loading for new ports, given that it is deprecated and replaced with a method based on a special UEFI device path.

My changes are logged in the individual patches.

I propose to take the first four patches via the EFI tree, and expose them via a stable tag so that the RISC-V maintainers can merge it before applying the remaining patches. That will ensure that both trees remain in a buildable state, with working EFI stub support on the riscv branch.

Cc Atish Patra <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Albert Ou <[email protected]>

Ard Biesheuvel (1):
efi/libstub: Make initrd file loader configurable

Atish Patra (6):
efi/libstub: Move arm-stub to a common file efi/libstub/riscv: add arch specific efi.h header file
include: pe.h: Add RISC-V related PE definition
RISC-V: Define fixmap bindings for generic early ioremap support
RISC-V: Add PE/COFF header for EFI stub
RISC-V: Add EFI stub support.

 arch/arm/Kconfig                              |   2 +-
 arch/arm64/Kconfig                            |   2 +-
 arch/riscv/Kconfig                            |  21 ++++
 arch/riscv/Makefile                           |   1 +
 arch/riscv/configs/defconfig                  |   1 +
 arch/riscv/include/asm/Kbuild                 |   1 +
 arch/riscv/include/asm/efi.h                  |  41 +++++++
 arch/riscv/include/asm/fixmap.h               |  18 +++
 arch/riscv/include/asm/io.h                   |   1 +
 arch/riscv/include/asm/sections.h             |  13 +++
 arch/riscv/kernel/Makefile                    |   4 +
 arch/riscv/kernel/efi-header.S                | 100 ++++++++++++++++
 arch/riscv/kernel/head.S                      |  16 +++
 arch/riscv/kernel/image-vars.h                |  53 +++++++++
 arch/riscv/kernel/vmlinux.lds.S               |  22 +++-
 drivers/firmware/efi/Kconfig                  |  15 ++-
 drivers/firmware/efi/libstub/Makefile         |  22 +++-
 .../efi/libstub/{arm-stub.c => efi-stub.c}    |   0
 drivers/firmware/efi/libstub/file.c           |   3 +
 drivers/firmware/efi/libstub/riscv-stub.c     | 109 ++++++++++++++++++
 include/linux/pe.h                            |   3 +
 21 files changed, 436 insertions(+), 12 deletions(-)
 create mode 100644 arch/riscv/include/asm/efi.h
 create mode 100644 arch/riscv/include/asm/sections.h
 create mode 100644 arch/riscv/kernel/efi-header.S
 create mode 100644 arch/riscv/kernel/image-vars.h
 rename drivers/firmware/efi/libstub/{arm-stub.c => efi-stub.c} (100%)
 create mode 100644 drivers/firmware/efi/libstub/riscv-stub.c
Signature · 1 line
2.17.1