opnsense-src/sys/riscv
Mark Johnston 831049dc34 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
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 31218f3209)
2022-03-14 10:45:49 -04:00
..
conf cxgbe(4): Changes to the fatal error handler. 2022-03-02 14:08:33 -08:00
include riscv: Add support for enabling SV48 mode 2022-03-14 10:45:49 -04:00
riscv riscv: Add support for enabling SV48 mode 2022-03-14 10:45:49 -04:00
sifive sifive_spi: Add missing case for SPIBUS_MODE_NONE 2021-09-07 13:08:20 +01:00