Skip to content

Commit 125c0d0

Browse files
sterling-tengJonathan Corbet
authored andcommitted
docs/zh_CN: add riscv vm-layout translation
Translate .../riscv/vm-layout.rst into Chinese. Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Reviewed-by: Alex Shi <alexs@kernel.org> Link: https://lore.kernel.org/r/b59965f7f88ea22ec824dc2e92561b018fd370d1.1646108017.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent f09f6f9 commit 125c0d0

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

Documentation/translations/zh_CN/riscv/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RISC-V 体系结构
1818
:maxdepth: 1
1919

2020
boot-image-header
21+
vm-layout
2122
pmu
2223
patch-acceptance
2324

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: ../disclaimer-zh_CN.rst
3+
4+
:Original: Documentation/riscv/vm-layout.rst
5+
6+
:翻译:
7+
8+
司延腾 Yanteng Si <siyanteng@loongson.cn>
9+
10+
============================
11+
RISC-V Linux上的虚拟内存布局
12+
============================
13+
14+
:作者: Alexandre Ghiti <alex@ghiti.fr>
15+
:日期: 12 February 2021
16+
17+
这份文件描述了RISC-V Linux内核使用的虚拟内存布局。
18+
19+
32位 RISC-V Linux 内核
20+
======================
21+
22+
RISC-V Linux Kernel SV32
23+
------------------------
24+
25+
TODO
26+
27+
64位 RISC-V Linux 内核
28+
======================
29+
30+
RISC-V特权架构文档指出,64位地址 "必须使第63-48位值都等于第47位,否则将发生缺页异常。":这将虚
31+
拟地址空间分成两半,中间有一个非常大的洞,下半部分是用户空间所在的地方,上半部分是RISC-V Linux
32+
内核所在的地方。
33+
34+
RISC-V Linux Kernel SV39
35+
------------------------
36+
37+
::
38+
39+
========================================================================================================================
40+
开始地址 | 偏移 | 结束地址 | 大小 | 虚拟内存区域描述
41+
========================================================================================================================
42+
| | | |
43+
0000000000000000 | 0 | 0000003fffffffff | 256 GB | 用户空间虚拟内存,每个内存管理器不同
44+
__________________|____________|__________________|_________|___________________________________________________________
45+
| | | |
46+
0000004000000000 | +256 GB | ffffffbfffffffff | ~16M TB | ... 巨大的、几乎64位宽的直到内核映射的-256GB地方
47+
| | | | 开始偏移的非经典虚拟内存地址空洞。
48+
| | | |
49+
__________________|____________|__________________|_________|___________________________________________________________
50+
|
51+
| 内核空间的虚拟内存,在所有进程之间共享:
52+
____________________________________________________________|___________________________________________________________
53+
| | | |
54+
ffffffc6fee00000 | -228 GB | ffffffc6feffffff | 2 MB | fixmap
55+
ffffffc6ff000000 | -228 GB | ffffffc6ffffffff | 16 MB | PCI io
56+
ffffffc700000000 | -228 GB | ffffffc7ffffffff | 4 GB | vmemmap
57+
ffffffc800000000 | -224 GB | ffffffd7ffffffff | 64 GB | vmalloc/ioremap space
58+
ffffffd800000000 | -160 GB | fffffff6ffffffff | 124 GB | 直接映射所有物理内存
59+
fffffff700000000 | -36 GB | fffffffeffffffff | 32 GB | kasan
60+
__________________|____________|__________________|_________|____________________________________________________________
61+
|
62+
|
63+
____________________________________________________________|____________________________________________________________
64+
| | | |
65+
ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF
66+
ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel
67+
__________________|____________|__________________|_________|____________________________________________________________

0 commit comments

Comments
 (0)