Skip to content

Enable EFI support

Andrew Jones kvm kvm-riscv kvmarm linux-s390 linuxppc-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 2 repliesIn review
  2. v113 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on v3 of arm's efi improvement series
- Just make base_address a weak function rather than duplicate it
- Always preserve .so files (they're useful for debug)
- Build the sieve test for EFI
- Pick up a couple tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13riscv: Call abort instead of assert on unhandled exceptionslib/riscv/processor.c+2 -10 replies
2/13riscv: show_regs: Prepare for EFI imageslib/riscv/processor.c riscv/flat.lds+5 -40 replies
3/13treewide: lib/stack: Fix backtracelib/arm/stack.c lib/arm64/stack.c lib/riscv/stack.c +3 more+42 -430 replies
4/13treewide: lib/stack: Make base_address arch specificlib/riscv/stack.c lib/stack.c lib/stack.h+24 -41 reply
5/13riscv: Import gnu-efi filesriscv/efi/crt0-efi-riscv64.S riscv/efi/elf_riscv64_efi.lds riscv/efi/reloc_riscv64.c+419 -00 replies
6/13riscv: Tweak the gnu-efi imported codelib/elf.h riscv/efi/crt0-efi-riscv64.S riscv/efi/reloc_riscv64.c+8 -20 replies
7/13riscv: Enable building for EFIconfigure lib/riscv/asm/setup.h riscv/Makefile +1 more+36 -30 replies
8/13riscv: efi: Switch stack in _startriscv/efi/crt0-efi-riscv64.S+18 -00 replies
9/13efi: Add support for obtaining the boot hartidlib/efi.c+33 -00 replies
10/13riscv: Refactor setup codelib/riscv/setup.c+68 -410 replies
11/13riscv: Enable EFI bootlib/riscv/asm/setup.h lib/riscv/setup.c+64 -10 replies
12/13riscv: efi: Add run scriptconfigure riscv/efi/run riscv/run+108 -20 replies
13/13riscv: efi: Use efi-direct by defaultconfigure+6 -10 replies

Reviews trailers per patch

2 of 13 patches have a Reviewed-by or Acked-by.

PatchClaudio ImbrendaNicholas Piggin
1/13
2/13
3/13A-b R-b
4/13R-b
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

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

Read the v2 thread

Cover letter [kvm-unit-tests PATCH v2 00/13] Enable EFI support

This series starts with some fixes for backtraces for bugs found when tracing with riscv EFI builds. The series then brings EFI support to riscv, basing the approach heavily on arm64's support (including arm64's improvements[1]). It should now be possible to launch tests from EFI-capable bootloaders.

[1] https://lore.kernel.org/all/20240305164623.379149-20-andrew.jones at linux.dev/

v2:
- Rebase on v3 of arm's efi improvement series
- Just make base_address a weak function rather than duplicate it
- Always preserve .so files (they're useful for debug)
- Build the sieve test for EFI
- Pick up a couple tags

Thanks,
drew

Andrew Jones (13):
riscv: Call abort instead of assert on unhandled exceptions
riscv: show_regs: Prepare for EFI images
treewide: lib/stack: Fix backtrace
treewide: lib/stack: Make base_address arch specific
riscv: Import gnu-efi files
riscv: Tweak the gnu-efi imported code
riscv: Enable building for EFI
riscv: efi: Switch stack in _start
efi: Add support for obtaining the boot hartid
riscv: Refactor setup code
riscv: Enable EFI boot
riscv: efi: Add run script
riscv: efi: Use efi-direct by default

 configure                     |  12 +-
 lib/arm/stack.c               |  13 +--
 lib/arm64/stack.c             |  12 +-
 lib/efi.c                     |  33 ++++++
 lib/elf.h                     |   5 +
 lib/riscv/asm/setup.h         |   5 +
 lib/riscv/processor.c         |  11 +-
 lib/riscv/setup.c             | 170 +++++++++++++++++++++-------
 lib/riscv/stack.c             |  30 +++--
 lib/s390x/stack.c             |  12 +-
 lib/stack.c                   |   8 +-
 lib/stack.h                   |  24 +++-
 lib/x86/stack.c               |  12 +-
 riscv/Makefile                |  27 ++++-
 riscv/cstart.S                |   4 +
 riscv/efi/crt0-efi-riscv64.S  | 205 ++++++++++++++++++++++++++++++++++
 riscv/efi/elf_riscv64_efi.lds | 142 +++++++++++++++++++++++
 riscv/efi/reloc_riscv64.c     |  91 +++++++++++++++
 riscv/efi/run                 | 106 ++++++++++++++++++
 riscv/flat.lds                |   1 +
 riscv/run                     |   2 +-
 21 files changed, 828 insertions(+), 97 deletions(-)
 create mode 100644 riscv/efi/crt0-efi-riscv64.S
 create mode 100644 riscv/efi/elf_riscv64_efi.lds
 create mode 100644 riscv/efi/reloc_riscv64.c
 create mode 100755 riscv/efi/run
Signature · 1 line
2.44.0