[PATCH] Documentation: riscv: Document the sv57 VM layout
Bagas Sanjaya
bagasdotme at gmail.com
Tue Nov 1 02:03:33 PDT 2022
On Mon, Oct 31, 2022 at 07:02:30PM +0100, Björn Töpel wrote:
> +
> +
> +RISC-V Linux Kernel SV57
> +------------------------
> +
> +::
> +
> + ========================================================================================================================
> + Start addr | Offset | End addr | Size | VM area description
> + ========================================================================================================================
> + | | | |
> + 0000000000000000 | 0 | 00ffffffffffffff | 64 PB | user-space virtual memory, different per mm
> + __________________|____________|__________________|_________|___________________________________________________________
> + | | | |
> + 0100000000000000 | +64 PB | feffffffffffffff | ~16K PB | ... huge, almost 64 bits wide hole of non-canonical
> + | | | | virtual memory addresses up to the -64 PB
> + | | | | starting offset of kernel mappings.
> + __________________|____________|__________________|_________|___________________________________________________________
> + |
> + | Kernel-space virtual memory, shared between all processes:
> + ____________________________________________________________|___________________________________________________________
> + | | | |
> + ff1bfffffee00000 | -57 PB | ff1bfffffeffffff | 2 MB | fixmap
> + ff1bffffff000000 | -57 PB | ff1bffffffffffff | 16 MB | PCI io
> + ff1c000000000000 | -57 PB | ff1fffffffffffff | 1 PB | vmemmap
> + ff20000000000000 | -56 PB | ff5fffffffffffff | 16 PB | vmalloc/ioremap space
> + ff60000000000000 | -40 PB | ffdffffeffffffff | 32 PB | direct mapping of all physical memory
> + ffdfffff00000000 | - 8 PB | fffffffeffffffff | 8 PB | kasan
> + __________________|____________|__________________|_________|____________________________________________________________
> + |
> + | Identical layout to the 39-bit one from here on:
> + ____________________________________________________________|____________________________________________________________
> + | | | |
> + ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF
> + ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel
> + __________________|____________|__________________|_________|____________________________________________________________
The memory layout figure above should have been in table format (it is
written as such, isn't it?):
---- >8 ----
diff --git a/Documentation/riscv/vm-layout.rst b/Documentation/riscv/vm-layout.rst
index 35f76798b6e41b..f87b63a0cc9cfa 100644
--- a/Documentation/riscv/vm-layout.rst
+++ b/Documentation/riscv/vm-layout.rst
@@ -102,34 +102,32 @@ RISC-V Linux Kernel SV48
RISC-V Linux Kernel SV57
------------------------
-::
-
- ========================================================================================================================
- Start addr | Offset | End addr | Size | VM area description
- ========================================================================================================================
- | | | |
- 0000000000000000 | 0 | 00ffffffffffffff | 64 PB | user-space virtual memory, different per mm
- __________________|____________|__________________|_________|___________________________________________________________
- | | | |
- 0100000000000000 | +64 PB | feffffffffffffff | ~16K PB | ... huge, almost 64 bits wide hole of non-canonical
- | | | | virtual memory addresses up to the -64 PB
- | | | | starting offset of kernel mappings.
- __________________|____________|__________________|_________|___________________________________________________________
- |
- | Kernel-space virtual memory, shared between all processes:
- ____________________________________________________________|___________________________________________________________
- | | | |
- ff1bfffffee00000 | -57 PB | ff1bfffffeffffff | 2 MB | fixmap
- ff1bffffff000000 | -57 PB | ff1bffffffffffff | 16 MB | PCI io
- ff1c000000000000 | -57 PB | ff1fffffffffffff | 1 PB | vmemmap
- ff20000000000000 | -56 PB | ff5fffffffffffff | 16 PB | vmalloc/ioremap space
- ff60000000000000 | -40 PB | ffdffffeffffffff | 32 PB | direct mapping of all physical memory
- ffdfffff00000000 | - 8 PB | fffffffeffffffff | 8 PB | kasan
- __________________|____________|__________________|_________|____________________________________________________________
- |
- | Identical layout to the 39-bit one from here on:
- ____________________________________________________________|____________________________________________________________
- | | | |
- ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF
- ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel
- __________________|____________|__________________|_________|____________________________________________________________
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | Start addr | Offset | End addr | Size | VM area description |
+ +==================+========+==================+=========+==============================================================+
+ | 0000000000000000 | 0 | 00ffffffffffffff | 64 PB | user-space virtual memory, different per mm |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | 0100000000000000 | +64 PB | feffffffffffffff | ~16K PB | ... huge, almost 64 bits wide hole of non-canonical |
+ | | | | | virtual memory addresses up to the -64 PB |
+ | | | | | starting offset of kernel mappings. |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | Kernel-space virtual memory, shared between all processes: |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ff1bfffffee00000 | -57 PB | ff1bfffffeffffff | 2 MB | fixmap |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ff1bffffff000000 | -57 PB | ff1bffffffffffff | 16 MB | PCI io |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ff1c000000000000 | -57 PB | ff1fffffffffffff | 1 PB | vmemmap |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ff20000000000000 | -56 PB | ff5fffffffffffff | 16 PB | vmalloc/ioremap space |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ff60000000000000 | -40 PB | ffdffffeffffffff | 32 PB | direct mapping of all physical memory |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ffdfffff00000000 | -8 PB | fffffffeffffffff | 8 PB | kasan |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | Identical layout to the 39-bit one from here on: |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
+ | ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel |
+ +------------------+--------+------------------+---------+--------------------------------------------------------------+
However, for consistency, other similar figures should also be converted
to tables (as separate patch).
Thanks.
--
An old man doll... just what I always wanted! - Clara
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20221101/13e3eed7/attachment.sig>
More information about the linux-riscv
mailing list