freebsd-dev/sys/riscv
Mark Johnston 31218f3209 riscv: Add support for enabling SV48 mode
This increases the size of the user map from 256GB to 128TB.  The kernel
map is left unchanged for now.

For now SV48 mode is left disabled by default, but can be enabled with a
tunable.  Note that extant hardware does not implement SV48, but QEMU
does.

- In pmap_bootstrap(), allocate a L0 page and attempt to enable SV48
  mode.  If the write to SATP doesn't take, the kernel continues to run
  in SV39 mode.
- Define VM_MAX_USER_ADDRESS to refer to the SV48 limit.  In SV39 mode,
  the region [VM_MAX_USER_ADDRESS_SV39, VM_MAX_USER_ADDRESS_SV48] is not
  mappable.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34280
2022-03-01 09:39:44 -05:00
..
conf riscv: conf: Remove options EXT_RESOURCES 2022-02-21 17:29:13 +01:00
include riscv: Add support for enabling SV48 mode 2022-03-01 09:39:44 -05:00
riscv riscv: Add support for enabling SV48 mode 2022-03-01 09:39:44 -05:00
sifive sifive_spi: Add missing case for SPIBUS_MODE_NONE 2021-08-30 23:38:02 +01:00