mbox series

[v5,0/7] Add UEFI support for RISC-V

Message ID 20200422172414.6662-1-ardb@kernel.org (mailing list archive)
Headers show
Series Add UEFI support for RISC-V | expand

Message

Ard Biesheuvel April 22, 2020, 5:24 p.m. UTC
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 <atish.patra@wdc.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org

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

Comments

Ard Biesheuvel April 22, 2020, 5:25 p.m. UTC | #1
On Wed, 22 Apr 2020 at 19:24, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> 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.
>

[0] https://lore.kernel.org/linux-efi/20200421033336.9663-1-atish.patra@wdc.com/
Atish Patra April 22, 2020, 6:50 p.m. UTC | #2
On Wed, 2020-04-22 at 19:24 +0200, Ard Biesheuvel wrote:
> 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.
> 

Thanks for refactoring the series. I did not see this one and replied
to the original comments :(. Everything looks good to me except the
selecting the RISCV_ISA_C bit.

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

Great.

> Cc: Atish Patra <atish.patra@wdc.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: linux-riscv@lists.infradead.org
> 
> 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
>
Palmer Dabbelt April 23, 2020, 10:43 p.m. UTC | #3
On Wed, 22 Apr 2020 10:24:07 PDT (-0700), ardb@kernel.org wrote:
> 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.

Works for me.  Thanks!

>
> Cc: Atish Patra <atish.patra@wdc.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: linux-riscv@lists.infradead.org
>
> 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
Ard Biesheuvel April 24, 2020, 11:08 a.m. UTC | #4
On Fri, 24 Apr 2020 at 00:43, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
> On Wed, 22 Apr 2020 10:24:07 PDT (-0700), ardb@kernel.org wrote:
> > 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.
>
> Works for me.  Thanks!
>

OK. I'll resend the final versions of the remaining patches (with the
ISA_C tweak added) to be taken into the RISC-V tree once the first few
patches have landed in tip/efi/core