Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: "Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org,
	"Alexandre Ghiti" <alexandre.ghiti@canonical.com>,
	"Björn Töpel" <bjorn@rivosinc.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] Documentation: riscv: Document the sv57 VM layout
Date: Tue, 1 Nov 2022 16:03:33 +0700	[thread overview]
Message-ID: <Y2Dg5fYVfhoJmOX3@debian.me> (raw)
In-Reply-To: <20221031180230.1420544-1-bjorn@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 10082 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-11-01  9:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 18:02 [PATCH] Documentation: riscv: Document the sv57 VM layout Björn Töpel
2022-11-01  9:03 ` Bagas Sanjaya [this message]
2022-11-01 10:25   ` Björn Töpel
2022-11-18 16:07 ` Alexandre Ghiti
2022-11-18 16:33   ` Björn Töpel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2Dg5fYVfhoJmOX3@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=alexandre.ghiti@canonical.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn@kernel.org \
    --cc=bjorn@rivosinc.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox