summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/efi.h
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2023-09-08 20:25:13 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2023-09-08 20:25:13 +0200
commitf57805555834494e8cad729d01d86ba326d64959 (patch)
treebe3a984a98b86c4e62edf8224f18e2618578401c /arch/riscv/include/asm/efi.h
parentMerge patch "RISC-V: Add ptrace support for vectors" (diff)
parentriscv: libstub: Implement KASLR by using generic functions (diff)
downloadlinux-f57805555834494e8cad729d01d86ba326d64959.tar.xz
linux-f57805555834494e8cad729d01d86ba326d64959.zip
Merge patch series "riscv: Introduce KASLR"
Alexandre Ghiti <alexghiti@rivosinc.com> says: The following KASLR implementation allows to randomize the kernel mapping: - virtually: we expect the bootloader to provide a seed in the device-tree - physically: only implemented in the EFI stub, it relies on the firmware to provide a seed using EFI_RNG_PROTOCOL. arm64 has a similar implementation hence the patch 3 factorizes KASLR related functions for riscv to take advantage. The new virtual kernel location is limited by the early page table that only has one PUD and with the PMD alignment constraint, the kernel can only take < 512 positions. * b4-shazam-merge: riscv: libstub: Implement KASLR by using generic functions libstub: Fix compilation warning for rv32 arm64: libstub: Move KASLR handling functions to kaslr.c riscv: Dump out kernel offset information on panic riscv: Introduce virtual kernel mapping KASLR Link: https://lore.kernel.org/r/20230722123850.634544-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include/asm/efi.h')
-rw-r--r--arch/riscv/include/asm/efi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
index 8a6a128ec57f..46a355913b27 100644
--- a/arch/riscv/include/asm/efi.h
+++ b/arch/riscv/include/asm/efi.h
@@ -45,4 +45,6 @@ void arch_efi_call_virt_teardown(void);
unsigned long stext_offset(void);
+void efi_icache_sync(unsigned long start, unsigned long end);
+
#endif /* _ASM_EFI_H */