diff options
author | 2021-12-06 11:46:51 +0100 | |
---|---|---|
committer | 2022-01-19 17:54:09 -0800 | |
commit | e8a62cc26ddf53a3c6ba2a8d33036cf7b84f3923 (patch) | |
tree | 15b9020880a651c756268a4560b8c6c720fc1031 /drivers/firmware/efi | |
parent | asm-generic: Prepare for riscv use of pud_alloc_one and pud_free (diff) | |
download | linux-e8a62cc26ddf53a3c6ba2a8d33036cf7b84f3923.tar.gz linux-e8a62cc26ddf53a3c6ba2a8d33036cf7b84f3923.tar.bz2 linux-e8a62cc26ddf53a3c6ba2a8d33036cf7b84f3923.zip |
riscv: Implement sv48 support
By adding a new 4th level of page table, give the possibility to 64bit
kernel to address 2^48 bytes of virtual address: in practice, that offers
128TB of virtual address space to userspace and allows up to 64TB of
physical memory.
If the underlying hardware does not support sv48, we will automatically
fallback to a standard 3-level page table by folding the new PUD level into
PGDIR level. In order to detect HW capabilities at runtime, we
use SATP feature that ignores writes with an unsupported mode.
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'drivers/firmware/efi')
-rw-r--r-- | drivers/firmware/efi/libstub/efi-stub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c index 26e69788f27a..b3db5d91ed38 100644 --- a/drivers/firmware/efi/libstub/efi-stub.c +++ b/drivers/firmware/efi/libstub/efi-stub.c @@ -40,6 +40,8 @@ #ifdef CONFIG_ARM64 # define EFI_RT_VIRTUAL_LIMIT DEFAULT_MAP_WINDOW_64 +#elif defined(CONFIG_RISCV) +# define EFI_RT_VIRTUAL_LIMIT TASK_SIZE_MIN #else # define EFI_RT_VIRTUAL_LIMIT TASK_SIZE #endif |