RISC-V: Add PE/COFF header for EFI stub
Linux kernel Image can appear as an EFI application With appropriate PE/COFF header fields in the beginning of the Image header. An EFI application loader can directly load a Linux kernel Image and an EFI stub residing in kernel can boot Linux kernel directly. Add the necessary PE/COFF header. Signed-off-by:Atish Patra <atish.patra@wdc.com> Link: https://lore.kernel.org/r/20200421033336.9663-3-atish.patra@wdc.com [ardb: - use C prefix for c.li to ensure the expected opcode is emitted - align all image sections according to PE/COFF section alignment ] Signed-off-by:
Ard Biesheuvel <ardb@kernel.org> Reviewed-by:
Anup Patel <anup@brainfault.org> Signed-off-by:
Palmer Dabbelt <palmerdabbelt@google.com>
Showing
- arch/riscv/include/asm/sections.h 13 additions, 0 deletionsarch/riscv/include/asm/sections.h
- arch/riscv/kernel/efi-header.S 111 additions, 0 deletionsarch/riscv/kernel/efi-header.S
- arch/riscv/kernel/head.S 16 additions, 0 deletionsarch/riscv/kernel/head.S
- arch/riscv/kernel/image-vars.h 51 additions, 0 deletionsarch/riscv/kernel/image-vars.h
- arch/riscv/kernel/vmlinux.lds.S 21 additions, 2 deletionsarch/riscv/kernel/vmlinux.lds.S
Please register or sign in to comment