svn commit: r342092 - stable/12/sys/riscv/include
Mark Johnston
markj at FreeBSD.org
Fri Dec 14 18:40:10 UTC 2018
Author: markj
Date: Fri Dec 14 18:40:08 2018
New Revision: 342092
URL: https://svnweb.freebsd.org/changeset/base/342092
Log:
MFC r341694:
Update the description of the address space layout on RISC-V.
Modified:
stable/12/sys/riscv/include/vmparam.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/riscv/include/vmparam.h
==============================================================================
--- stable/12/sys/riscv/include/vmparam.h Fri Dec 14 18:39:17 2018 (r342091)
+++ stable/12/sys/riscv/include/vmparam.h Fri Dec 14 18:40:08 2018 (r342092)
@@ -115,23 +115,24 @@
/**
* Address space layout.
*
- * RISC-V implements up to a 48 bit virtual address space. The address space is
- * split into 2 regions at each end of the 64 bit address space, with an
- * out of range "hole" in the middle.
+ * RISC-V implements multiple paging modes with different virtual address space
+ * sizes: SV32, SV39 and SV48. SV39 permits a virtual address space size of
+ * 512GB and uses a three-level page table. Since this is large enough for most
+ * purposes, we currently use SV39 for both userland and the kernel, avoiding
+ * the extra translation step required by SV48.
*
- * We limit the size of the two spaces to 39 bits each.
+ * The address space is split into two regions at each end of the 64-bit address
+ * space:
*
- * Upper region: 0xffffffffffffffff
- * 0xffffff8000000000
+ * 0x0000000000000000 - 0x0000003fffffffff 256GB user map
+ * 0x0000004000000000 - 0xffffffbfffffffff unmappable
+ * 0xffffffc000000000 - 0xffffffc7ffffffff 32GB kernel map
+ * 0xffffffc800000000 - 0xffffffcfffffffff 32GB unused
+ * 0xffffffd000000000 - 0xffffffefffffffff 128GB direct map
+ * 0xfffffff000000000 - 0xffffffffffffffff 64GB unused
*
- * Hole: 0xffffff7fffffffff
- * 0x0000008000000000
+ * The kernel is loaded at the beginning of the kernel map.
*
- * Lower region: 0x0000007fffffffff
- * 0x0000000000000000
- *
- * We use the upper region for the kernel, and the lower region for userland.
- *
* We define some interesting address constants:
*
* VM_MIN_ADDRESS and VM_MAX_ADDRESS define the start and end of the entire
@@ -146,11 +147,9 @@
#define VM_MIN_ADDRESS (0x0000000000000000UL)
#define VM_MAX_ADDRESS (0xffffffffffffffffUL)
-/* 32 GiB of kernel addresses */
#define VM_MIN_KERNEL_ADDRESS (0xffffffc000000000UL)
#define VM_MAX_KERNEL_ADDRESS (0xffffffc800000000UL)
-/* 128 GiB maximum for the direct map region */
#define DMAP_MIN_ADDRESS (0xffffffd000000000UL)
#define DMAP_MAX_ADDRESS (0xfffffff000000000UL)
More information about the svn-src-stable
mailing list