diff options
Diffstat (limited to 'Documentation/zh_CN/arm64/memory.txt')
-rw-r--r-- | Documentation/zh_CN/arm64/memory.txt | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Documentation/zh_CN/arm64/memory.txt b/Documentation/zh_CN/arm64/memory.txt new file mode 100644 index 000000000000..83b519314706 --- /dev/null +++ b/Documentation/zh_CN/arm64/memory.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | Chinese translated version of Documentation/arm64/memory.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Catalin Marinas <catalin.marinas@arm.com> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/arm64/memory.txt 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | |||
18 | 英文版维护者: Catalin Marinas <catalin.marinas@arm.com> | ||
19 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | Linux 在 AArch64 中的内存布局 | ||
26 | =========================== | ||
27 | |||
28 | 作者: Catalin Marinas <catalin.marinas@arm.com> | ||
29 | 日期: 2012 年 02 月 20 日 | ||
30 | |||
31 | 本文档描述 AArch64 Linux 内核所使用的虚拟内存布局。此构架可以实现 | ||
32 | 页大小为 4KB 的 4 级转换表和页大小为 64KB 的 3 级转换表。 | ||
33 | |||
34 | AArch64 Linux 使用页大小为 4KB 的 3 级转换表配置,对于用户和内核 | ||
35 | 都有 39-bit (512GB) 的虚拟地址空间。对于页大小为 64KB的配置,仅 | ||
36 | 使用 2 级转换表,但内存布局相同。 | ||
37 | |||
38 | 用户地址空间的 63:39 位为 0,而内核地址空间的相应位为 1。TTBRx 的 | ||
39 | 选择由虚拟地址的 63 位给出。swapper_pg_dir 仅包含内核(全局)映射, | ||
40 | 而用户 pgd 仅包含用户(非全局)映射。swapper_pgd_dir 地址被写入 | ||
41 | TTBR1 中,且从不写入 TTBR0。 | ||
42 | |||
43 | |||
44 | AArch64 Linux 内存布局: | ||
45 | |||
46 | 起始地址 结束地址 大小 用途 | ||
47 | ----------------------------------------------------------------------- | ||
48 | 0000000000000000 0000007fffffffff 512GB 用户空间 | ||
49 | |||
50 | ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc | ||
51 | |||
52 | ffffffbbfffd0000 ffffffbcfffdffff 64KB [防护页] | ||
53 | |||
54 | ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O 空间 | ||
55 | |||
56 | ffffffbbffff0000 ffffffbcffffffff 64KB [防护页] | ||
57 | |||
58 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | ||
59 | |||
60 | ffffffbe00000000 ffffffbffbffffff ~8GB [防护页,未来用于 vmmemap] | ||
61 | |||
62 | ffffffbffc000000 ffffffbfffffffff 64MB 模块 | ||
63 | |||
64 | ffffffc000000000 ffffffffffffffff 256GB 内存空间 | ||
65 | |||
66 | |||
67 | 4KB 页大小的转换表查找: | ||
68 | |||
69 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
70 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
71 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
72 | | | | | | | | ||
73 | | | | | | v | ||
74 | | | | | | [11:0] 页内偏移 | ||
75 | | | | | +-> [20:12] L3 索引 | ||
76 | | | | +-----------> [29:21] L2 索引 | ||
77 | | | +---------------------> [38:30] L1 索引 | ||
78 | | +-------------------------------> [47:39] L0 索引 (未使用) | ||
79 | +-------------------------------------------------> [63] TTBR0/1 | ||
80 | |||
81 | |||
82 | 64KB 页大小的转换表查找: | ||
83 | |||
84 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
85 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
86 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
87 | | | | | | | ||
88 | | | | | v | ||
89 | | | | | [15:0] 页内偏移 | ||
90 | | | | +----------> [28:16] L3 索引 | ||
91 | | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 ) | ||
92 | | +-------------------------------> [47:42] L1 索引 (未使用) | ||
93 | +-------------------------------------------------> [63] TTBR0/1 | ||