Chinese translated version of Documentation/arm64/memory.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Maintainer: Catalin Marinas catalin.marinas@arm.com
Chinese maintainer: Fu Wei wefu@redhat.com
Documentation/arm64/memory.txt çä¸æç¿»è¯
å¦ææ³è¯è®ºææ´æ°æ¬æçå
容ï¼è¯·ç´æ¥èç³»åææ¡£çç»´æ¤è
ãå¦æä½ ä½¿ç¨è±æ
交æµæå°é¾çè¯ï¼ä¹å¯ä»¥åä¸æçç»´æ¤è
æ±å©ãå¦ææ¬ç¿»è¯æ´æ°ä¸åæ¶æè
ç¿»
è¯åå¨é®é¢ï¼è¯·èç³»ä¸æçç»´æ¤è
ã
æ¬æç¿»è¯æ交æ¶ç Git æ£åºç¹ä¸ºï¼ bc465aa9d045feb0e13b4a8f32cc33c1943f62d6
è±æçç»´æ¤è
ï¼ Catalin Marinas catalin.marinas@arm.com
ä¸æçç»´æ¤è
ï¼ å
ç Fu Wei wefu@redhat.com
ä¸æçç¿»è¯è
ï¼ å
ç Fu Wei wefu@redhat.com
ä¸æçæ ¡è¯è
ï¼ å
ç Fu Wei wefu@redhat.com
以ä¸ä¸ºæ£æ
Linux å¨ AArch64 ä¸çå
åå¸å±
===========================
ä½è : Catalin Marinas catalin.marinas@arm.com
æ¬ææ¡£æè¿° AArch64 Linux å
æ ¸æ使ç¨çèæå
åå¸å±ãæ¤ææ¶å¯ä»¥å®ç°
页大å°ä¸º 4KB ç 4 级转æ¢è¡¨å页大å°ä¸º 64KB ç 3 级转æ¢è¡¨ã
AArch64 Linux ä½¿ç¨ 3 级æ 4 级转æ¢è¡¨ï¼å
¶é¡µå¤§å°é
置为 4KBï¼å¯¹äºç¨æ·åå
æ ¸
åå«é½æ 39-bit (512GB) æ 48-bit (256TB) çèæå°å空é´ã
对äºé¡µå¤§å°ä¸º 64KBçé
ç½®ï¼ä»
ä½¿ç¨ 2 级转æ¢è¡¨ï¼æ 42-bit (4TB) çèæå°å空é´ï¼ä½å
åå¸å±ç¸åã
ç¨æ·å°å空é´ç 63:48 ä½ä¸º 0ï¼èå
æ ¸å°å空é´çç¸åºä½ä¸º 1ãTTBRx ç
éæ©ç±èæå°åç 63 ä½ç»åºãswapper_pg_dir ä»
å
å«å
æ ¸ï¼å
¨å±ï¼æ å°ï¼
èç¨æ· pgd ä»
å
å«ç¨æ·ï¼éå
¨å±ï¼æ å°ãswapper_pg_dir å°å被åå
¥
TTBR1 ä¸ï¼ä¸ä»ä¸åå
¥ TTBR0ã
AArch64 Linux å¨é¡µå¤§å°ä¸º 4KBï¼å¹¶ä½¿ç¨ 3 级转æ¢è¡¨æ¶çå åå¸å±ï¼
èµ·å§å°å ç»æå°å å¤§å° ç¨é
0000000000000000 0000007fffffffff 512GB ç¨æ·ç©ºé´
ffffff8000000000 ffffffffffffffff 512GB å
æ ¸ç©ºé´
AArch64 Linux å¨é¡µå¤§å°ä¸º 4KBï¼å¹¶ä½¿ç¨ 4 级转æ¢è¡¨æ¶çå åå¸å±ï¼
èµ·å§å°å ç»æå°å å¤§å° ç¨é
0000000000000000 0000ffffffffffff 256TB ç¨æ·ç©ºé´
ffff000000000000 ffffffffffffffff 256TB å
æ ¸ç©ºé´
AArch64 Linux å¨é¡µå¤§å°ä¸º 64KBï¼å¹¶ä½¿ç¨ 2 级转æ¢è¡¨æ¶çå åå¸å±ï¼
èµ·å§å°å ç»æå°å å¤§å° ç¨é
0000000000000000 000003ffffffffff 4TB ç¨æ·ç©ºé´
fffffc0000000000 ffffffffffffffff 4TB å
æ ¸ç©ºé´
AArch64 Linux å¨é¡µå¤§å°ä¸º 64KBï¼å¹¶ä½¿ç¨ 3 级转æ¢è¡¨æ¶çå åå¸å±ï¼
èµ·å§å°å ç»æå°å å¤§å° ç¨é
0000000000000000 0000ffffffffffff 256TB ç¨æ·ç©ºé´
ffff000000000000 ffffffffffffffff 256TB å
æ ¸ç©ºé´
æ´è¯¦ç»çå æ ¸èæå åå¸å±ï¼è¯·åé å æ ¸å¯å¨ä¿¡æ¯ã
4KB 页大å°ç转æ¢è¡¨æ¥æ¾ï¼
+——–+——–+——–+——–+——–+——–+——–+——–+
|63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0|
+——–+——–+——–+——–+——–+——–+——–+——–+
| | | | | |
| | | | | v
| | | | | [11:0] 页å
å移
| | | | +-> [20:12] L3 ç´¢å¼
| | | +———–> [29:21] L2 ç´¢å¼
| | +———————> [38:30] L1 ç´¢å¼
| +——————————-> [47:39] L0 ç´¢å¼
+————————————————-> [63] TTBR0/1
64KB 页大å°ç转æ¢è¡¨æ¥æ¾ï¼
+——–+——–+——–+——–+——–+——–+——–+——–+
|63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0|
+——–+——–+——–+——–+——–+——–+——–+——–+
| | | | |
| | | | v
| | | | [15:0] 页å
å移
| | | +———-> [28:16] L3 ç´¢å¼
| | +————————–> [41:29] L2 ç´¢å¼
| +——————————-> [47:42] L1 ç´¢å¼
+————————————————-> [63] TTBR0/1
å½ä½¿ç¨ KVM æ¶, 管çç¨åºï¼hypervisorï¼å¨ EL2 ä¸éè¿ç¸å¯¹å
æ ¸èæå°åç
ä¸ä¸ªåºå®å移æ¥æ å°å
æ ¸é¡µï¼å
æ ¸èæå°åçé« 24 ä½è®¾ä¸ºé¶ï¼:
èµ·å§å°å ç»æå°å å¤§å° ç¨é
0000004000000000 0000007fffffffff 256GB å¨ HYP ä¸æ å°çå æ ¸å¯¹è±¡