freebsd-dev/sys/riscv/include
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
..
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
asm.h Add .cfi_{start,end}proc for RISC-V assembly functions 2020-11-26 17:37:22 +00:00
atomic.h riscv: fix errors in some atomic type aliases 2021-03-04 16:59:58 -04:00
bus_dma_impl.h bus_dma: Deduplicate locking helper functions. 2022-01-05 13:50:40 -08:00
bus_dma.h
bus.h Add missing assignment forgotten in r365899 2020-09-20 15:11:52 +00:00
clock.h
counter.h riscv: small counter(9) improvements 2020-12-11 20:01:45 +00:00
cpu.h Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
cpufunc.h riscv: Use generic CSR macros for writing SATP 2022-03-01 09:39:43 -05:00
db_machdep.h riscv: improve exception code naming 2020-10-24 20:57:13 +00:00
dump.h minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
efi.h
elf.h
encoding.h
endian.h Consolidate machine/endian.h definitions 2021-03-26 19:00:22 -03:00
exec.h
float.h
floatingpoint.h
fpe.h
frame.h
gdb_machdep.h riscv: gdb(4) support 2022-01-10 13:40:12 -04:00
ieeefp.h libc: Provide sub fp(s|g)etmask() implementations for RISC-V 2020-08-03 12:48:51 +00:00
in_cksum.h
intr.h
kdb.h Introduce kdb-level watchpoint functions 2021-03-29 12:05:43 -03:00
machdep.h Handle load from loader(8) 2020-06-24 15:20:00 +00:00
md_var.h Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
memdev.h riscv: Add memmmap so we can mmap /dev/mem 2020-10-01 15:04:55 +00:00
metadata.h RISC-V boot1.efi and loader.efi support 2020-07-06 18:19:42 +00:00
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
ofw_machdep.h
param.h riscv: Define __PCI_REROUTE_INTERRUPT 2020-09-30 02:21:38 +00:00
pcb.h Remove unused fields from struct pcb. 2020-01-30 19:15:27 +00:00
pcpu_aux.h Correct padding length for RISC-V PCPU data. 2020-08-12 18:45:36 +00:00
pcpu.h Remove PCPU_INC 2021-03-20 19:23:59 -07:00
pmap.h riscv: Add various pmap definitions needed to support SV48 mode 2022-03-01 09:39:43 -05:00
pmc_mdep.h
proc.h Make struct syscall_args machine independent 2021-12-08 18:45:33 +00:00
procctl.h
profile.h riscv: fix uintfptr_t 2020-08-05 22:09:40 +00:00
psl.h
pte.h riscv: Add various pmap definitions needed to support SV48 mode 2022-03-01 09:39:43 -05:00
ptrace.h
reg.h riscv: Make machine/regs.h self-contained 2021-11-23 21:21:17 -07:00
reloc.h
resource.h Enable NEW_PCIB on riscv. 2020-01-24 16:50:51 +00:00
riscvreg.h riscv: Add support for enabling SV48 mode 2022-03-01 09:39:44 -05:00
runq.h
sbi.h riscv: add SBI system reset extension 2021-01-27 19:19:54 -04:00
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stack.h Stack unwinding robustness fixes for RISC-V. 2020-12-08 17:57:18 +00:00
stdarg.h
sysarch.h
tls.h Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
trap.h
ucontext.h
vdso.h riscv: Implement non-stub __vdso_gettc and __vdso_gettimekeep 2021-07-05 16:16:53 +01:00
vm.h
vmparam.h riscv: Add support for enabling SV48 mode 2022-03-01 09:39:44 -05:00