diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fa.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fa.md
index b5df56eb..cf9a603e 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fa.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fa.md
@@ -23,6 +23,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
@@ -457,7 +458,7 @@ rustflags = ["-C", "link-args=-e __start -static -nostartfiles"]
-## خلاصه
+## خلاصه {#summary}
یک باینری مستقل مینیمال راست مانند این است:
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fr.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fr.md
index 0982bbf9..5c70882a 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fr.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.fr.md
@@ -22,6 +22,7 @@ Ce blog est développé sur [GitHub]. Si vous avez un problème ou une question,
[GitHub]: https://github.com/phil-opp/blog_os
[en bas de page]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
@@ -42,7 +43,7 @@ Cela signifie que nous ne pouvons pas utiliser la majeure partie de la [biblioth
[sécurité de la mémoire]: https://tonyarcieri.com/it-s-time-for-a-memory-safety-intervention
Pour créer un noyau d'OS en Rust, nous devons créer un exécutable qui peut tourner sans système d'exploitation sous-jacent. Un tel exécutable est appelé “freestanding” (autoporté) ou “bare-metal”.
-Cet article décrit les étapes nécessaires pour créer un exécutable Rust autoporté et explique pourquoi ces étapes sont importantes. Si vous n'êtes intéressé que par un exemple minimal, vous pouvez **[aller au résumé](#résumé)**.
+Cet article décrit les étapes nécessaires pour créer un exécutable Rust autoporté et explique pourquoi ces étapes sont importantes. Si vous n'êtes intéressé que par un exemple minimal, vous pouvez **[aller au résumé](#resume)**.
## Désactiver la Bibliothèque Standard
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ja.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ja.md
index 907fdbef..f25e4182 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ja.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ja.md
@@ -22,6 +22,7 @@ translators = ["JohnTitor"]
[GitHub]: https://github.com/phil-opp/blog_os
[comments]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
@@ -45,7 +46,7 @@ OS カーネルを書くためには、いかなる OS の機能にも依存し
Rust で OS カーネルを書くには、基盤となる OS なしで動く実行環境をつくる必要があります。そのような実行環境はフリースタンディング環境やベアメタルのように呼ばれます。
-この記事では、フリースタンディングな Rust のバイナリをつくるために必要なステップを紹介し、なぜそれが必要なのかを説明します。もし最小限の説明だけを読みたいのであれば **[概要](#概要)** まで飛ばしてください。
+この記事では、フリースタンディングな Rust のバイナリをつくるために必要なステップを紹介し、なぜそれが必要なのかを説明します。もし最小限の説明だけを読みたいのであれば **[概要](#summary)** まで飛ばしてください。
## 標準ライブラリの無効化
@@ -462,7 +463,7 @@ rustflags = ["-C", "link-args=-e __start -static -nostartfiles"]
-## 概要
+## 概要 {#summary}
最小限の独立した Rust バイナリは次のようになります:
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.md
index 4ed03e8f..6ba6829c 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.md
@@ -18,6 +18,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ru.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ru.md
index 2677ac3f..d6192f0b 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ru.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.ru.md
@@ -19,6 +19,7 @@ translators = ["MrZloHex"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
@@ -43,7 +44,7 @@ translators = ["MrZloHex"]
Чтобы создать ядро ОС на Rust, нужно создать исполняемый файл, который мог бы запускаться без ОС.
-Этот пост описывает необходимые шаги для создания независимого исполняемого файла на Rust и объясняет, почему эти шаги нужны. Если вам интересен только минимальный пример, можете сразу перейти к __[итогам](#Итоги)__.
+Этот пост описывает необходимые шаги для создания независимого исполняемого файла на Rust и объясняет, почему эти шаги нужны. Если вам интересен только минимальный пример, можете сразу перейти к __[итогам](#summary)__.
## Отключение стандартной библиотеки
По умолчанию, все Rust-крейты подключают [стандартную библиотеку][standard library], которая зависит от возможностей операционной системы, таких как потоки, файлы, сети. Она также зависит от стандартной библиотки C `libc`, которая очень тесно взаимодействует с возможностями ОС. Так как мы хотим написать операционную систему, мы не можем использовать библиотеки, которые зависят от операционной системы. Поэтому необходимо отключить автоматические подключение стандартной библиотеки через [атрибут `no_std`][attribute].
@@ -453,7 +454,7 @@ rustflags = ["-C", "link-args=-e __start -static -nostartfiles"]
-## Итоги
+## Итоги {#summary}
Минимальный независимый исполняемый бинарный файл Rust выглядит примерно так:
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-CN.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-CN.md
index 6047e2a7..6be3b1df 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-CN.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-CN.md
@@ -21,6 +21,7 @@ translators = ["luojia65", "Rustin-Liu", "TheBegining"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
diff --git a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-TW.md b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-TW.md
index 795a29c4..4494d478 100644
--- a/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-TW.md
+++ b/blog/content/edition-2/posts/01-freestanding-rust-binary/index.zh-TW.md
@@ -21,6 +21,7 @@ translators = ["wusyong"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
@@ -43,7 +44,7 @@ translators = ["wusyong"]
為了在 Rust 中建立 OS 核心,我們需要建立一個無須底層作業系統即可運行的執行檔,這類的執行檔通常稱為「獨立式(freestanding)」或「裸機(bare-metal)」的執行檔。
-這篇文章描述了建立一個獨立的 Rust 執行檔的必要步驟,並解釋為什麼需要這些步驟。如果您只對簡單的範例感興趣,可以直接跳到 **[總結](#總結)**。
+這篇文章描述了建立一個獨立的 Rust 執行檔的必要步驟,並解釋為什麼需要這些步驟。如果您只對簡單的範例感興趣,可以直接跳到 **[總結](#summary)**。
## 停用標準函式庫
@@ -450,7 +451,7 @@ rustflags = ["-C", "link-args=-e __start -static -nostartfiles"]
-## 總結
+## 總結 {#summary}
一個最小的 Rust 獨立執行檔會看起來像這樣:
@@ -516,4 +517,4 @@ cargo rustc -- -C link-args="-e __start -static -nostartfiles"
[下一篇文章][next post] 將會講解如何將我們的獨立執行檔轉成最小的作業系統核心。這包含建立自訂目標、用啟動程式組合我們的執行檔,還有學習如何輸出一些東西到螢幕上。
-[next post]: @/edition-2/posts/02-minimal-rust-kernel/index.md
\ No newline at end of file
+[next post]: @/edition-2/posts/02-minimal-rust-kernel/index.md
diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.fa.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.fa.md
index dd3f2b87..b5396c8c 100644
--- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.fa.md
+++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.fa.md
@@ -23,6 +23,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-02
@@ -95,7 +96,7 @@ rtl = true
همانطور که ممکن است به یاد داشته باشید، باینری مستقل را از طریق `cargo` ایجاد کردیم، اما با توجه به سیستم عامل، به نامهای ورودی و پرچمهای کامپایل مختلف نیاز داشتیم. به این دلیل که `cargo` به طور پیش فرض برای سیستم میزبان بیلد میکند، بطور مثال سیستمی که از آن برای نوشتن هسته استفاده میکنید. این چیزی نیست که ما برای هسته خود بخواهیم، زیرا منطقی نیست که هسته سیستم عاملمان را روی یک سیستم عامل دیگر اجرا کنیم. در عوض، ما میخواهیم هسته را برای یک _سیستم هدف_ کاملاً مشخص کامپایل کنیم.
-### نصب Rust Nightly
+### نصب Rust Nightly {#installing-rust-nightly}
راست دارای سه کانال انتشار است: _stable_, _beta_, and _nightly_ (ترجمه از چپ به راست: پایدار، بتا و شبانه). کتاب Rust تفاوت بین این کانالها را به خوبی توضیح میدهد، بنابراین یک دقیقه وقت بگذارید و [آن را بررسی کنید](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#choo-choo-release-channels-and-riding-the-trains). برای ساخت یک سیستم عامل به برخی از ویژگیهای آزمایشی نیاز داریم که فقط در کانال شبانه موجود است، بنابراین باید نسخه شبانه Rust را نصب کنیم.
diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ja.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ja.md
index 1b7f1cd1..2858a722 100644
--- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ja.md
+++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ja.md
@@ -22,11 +22,12 @@ translators = ["woodyZootopia", "JohnTitor"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-02
-## 起動のプロセス
+## 起動のプロセス {#the-boot-process}
コンピュータを起動すると、マザーボードの [ROM] に保存されたファームウェアのコードを実行し始めます。このコードは、[起動時の自己テスト][power-on self-test]を実行し、使用可能なRAMを検出し、CPUとハードウェアを事前初期化します。その後、ブータブルディスクを探し、オペレーティングシステムのカーネルを起動します。
[ROM]: https://ja.wikipedia.org/wiki/Read_only_memory
@@ -91,7 +92,7 @@ x86には2つのファームウェアの標準規格があります:"Basic Inp
覚えていますか、この独立したバイナリは`cargo`を使ってビルドしましたが、オペレーティングシステムに依って異なるエントリポイント名とコンパイルフラグが必要なのでした。これは`cargo`は標準では **ホストシステム**(あなたの使っているシステム)向けにビルドするためです。例えばWindows上で走るカーネルというのはあまり意味がなく、私達の望む動作ではありません。代わりに、明確に定義された **ターゲットシステム** 向けにコンパイルできると理想的です。
-### RustのNightly版をインストールする
+### RustのNightly版をインストールする {#installing-rust-nightly}
Rustには**stable**、**beta**、**nightly**の3つのリリースチャンネルがあります。Rust Bookはこれらの3つのチャンネルの違いをとても良く説明しているので、一度[確認してみてください](https://doc.rust-jp.rs/book-ja/appendix-07-nightly-rust.html)。オペレーティングシステムをビルドするには、nightlyチャンネルでしか利用できないいくつかの実験的機能を使う必要があるので、Rustのnightly版をインストールすることになります。
Rustの実行環境を管理するのには、[rustup]を強くおすすめします。nightly、beta、stable版のコンパイラをそれぞれインストールすることができますし、アップデートするのも簡単です。現在のディレクトリにnightlyコンパイラを使うようにするには、`rustup override set nightly`と実行してください。もしくは、`rust-toolchain`というファイルに`nightly`と記入してプロジェクトのルートディレクトリに置くことでも指定できます。Nightly版を使っていることは、`rustc --version`と実行することで確かめられます。表示されるバージョン名の末尾に`-nightly`とあるはずです。
diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md
index 41b9e429..7e5fa8c3 100644
--- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md
+++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md
@@ -18,6 +18,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-02
diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ru.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ru.md
index 18248f41..6f3690b8 100644
--- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ru.md
+++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.ru.md
@@ -19,11 +19,12 @@ translators = ["MrZloHex"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-02
-## Последовательность процессов запуска
+## Последовательность процессов запуска {#the-boot-process}
Когда вы включаете компьютер, он начинает выполнять код микропрограммы, который хранится в [ПЗУ][ROM] материнской платы. Этот код выполняет [самотестирование при включении][power-on self-test], определяет доступную оперативную память и выполняет предварительную инициализацию процессора и аппаратного обеспечения. После этого он ищет загрузочный диск и начинает загрузку ядра операционной системы.
@@ -92,7 +93,7 @@ translators = ["MrZloHex"]
Как вы помните, мы собирали независимый бинарный файл с помощью `cargo`, но в зависимости от операционной системы нам требовались разные имена точек входа и флаги компиляции. Это потому, что `cargo` по умолчанию компилирует для _хостовой системы_, то есть системы, на которой вы работаете. Это не то, что мы хотим для нашего ядра, потому что ядро, работающее поверх, например, Windows, не имеет особого смысла. Вместо этого мы хотим компилировать для четко определенной _целевой системы_.
-### Установка Rust Nightly
+### Установка Rust Nightly {#installing-rust-nightly}
Rust имеет три релизных канала: _stable_, _beta_ и _nightly_. В книге Rust Book очень хорошо объясняется разница между этими каналами, поэтому уделите минуту и [ознакомьтесь с ней](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#choo-choo-release-channels-and-riding-the-trains). Для создания операционной системы нам понадобятся некоторые экспериментальные возможности, которые доступны только на канале nightly, поэтому нам нужно установить nightly версию Rust.
@@ -265,7 +266,7 @@ error[E0463]: can't find crate for `core`
Вот тут-то и приходит на помощь функция [`build-std`][`build-std` feature] в cargo. Она позволяет перекомпилировать `core` и другие стандартные библиотеки по требованию, вместо того, чтобы использовать предварительно скомпилированные версии, поставляемые вместе с установкой Rust. Эта функция очень новая и еще не закончена, поэтому она помечена как "нестабильная" и доступна только на [nightly Rust].
[`build-std` feature]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std
-[nightly Rust]: #установка-rust-nightly
+[nightly Rust]: #installing-rust-nightly
Чтобы использовать эту функцию, нам нужно создать файл [конфигурации cargo][cargo configuration] по пути `.cargo/config.toml` со следующим содержимым:
@@ -400,7 +401,7 @@ pub extern "C" fn _start() -> ! {
Чтобы превратить наше скомпилированное ядро в загрузочный образ диска, нам нужно связать его с загрузчиком. Как мы узнали в [разделе о загрузке], загрузчик отвечает за инициализацию процессора и загрузку нашего ядра.
-[разделе о загрузке]: #последовательность-процессов-запуска
+[разделе о загрузке]: #the-boot-process
Вместо того чтобы писать собственный загрузчик, который является самостоятельным проектом, мы используем модуль [`bootloader`]. Этот модуль реализует базовый BIOS-загрузчик без каких-либо C-зависимостей, только Rust и встроенный ассемблер. Чтобы использовать его для загрузки нашего ядра, нам нужно добавить зависимость от него:
diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.zh-CN.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.zh-CN.md
index c4a26f02..8a7076d6 100644
--- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.zh-CN.md
+++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.zh-CN.md
@@ -21,6 +21,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-02
diff --git a/blog/content/edition-2/posts/03-vga-text-buffer/index.fa.md b/blog/content/edition-2/posts/03-vga-text-buffer/index.fa.md
index 01a313e1..cdf40906 100644
--- a/blog/content/edition-2/posts/03-vga-text-buffer/index.fa.md
+++ b/blog/content/edition-2/posts/03-vga-text-buffer/index.fa.md
@@ -24,6 +24,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-03
diff --git a/blog/content/edition-2/posts/03-vga-text-buffer/index.ja.md b/blog/content/edition-2/posts/03-vga-text-buffer/index.ja.md
index 9f04497e..dd9fac5a 100644
--- a/blog/content/edition-2/posts/03-vga-text-buffer/index.ja.md
+++ b/blog/content/edition-2/posts/03-vga-text-buffer/index.ja.md
@@ -23,6 +23,7 @@ translators = ["woodyZootopia", "JohnTitor"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-03
diff --git a/blog/content/edition-2/posts/03-vga-text-buffer/index.md b/blog/content/edition-2/posts/03-vga-text-buffer/index.md
index f0ca9924..9176ba4d 100644
--- a/blog/content/edition-2/posts/03-vga-text-buffer/index.md
+++ b/blog/content/edition-2/posts/03-vga-text-buffer/index.md
@@ -19,6 +19,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-03
diff --git a/blog/content/edition-2/posts/03-vga-text-buffer/index.zh-CN.md b/blog/content/edition-2/posts/03-vga-text-buffer/index.zh-CN.md
index b3c2640e..c5eaf2db 100644
--- a/blog/content/edition-2/posts/03-vga-text-buffer/index.zh-CN.md
+++ b/blog/content/edition-2/posts/03-vga-text-buffer/index.zh-CN.md
@@ -22,6 +22,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-03
diff --git a/blog/content/edition-2/posts/04-testing/index.fa.md b/blog/content/edition-2/posts/04-testing/index.fa.md
index 9af6be5e..2e065c56 100644
--- a/blog/content/edition-2/posts/04-testing/index.fa.md
+++ b/blog/content/edition-2/posts/04-testing/index.fa.md
@@ -21,6 +21,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-04
diff --git a/blog/content/edition-2/posts/04-testing/index.ja.md b/blog/content/edition-2/posts/04-testing/index.ja.md
index fdfcfb17..6f8837f5 100644
--- a/blog/content/edition-2/posts/04-testing/index.ja.md
+++ b/blog/content/edition-2/posts/04-testing/index.ja.md
@@ -20,6 +20,7 @@ translators = ["woodyZootopia", "JohnTitor"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-04
diff --git a/blog/content/edition-2/posts/04-testing/index.md b/blog/content/edition-2/posts/04-testing/index.md
index a876dcc5..94b8d4ec 100644
--- a/blog/content/edition-2/posts/04-testing/index.md
+++ b/blog/content/edition-2/posts/04-testing/index.md
@@ -17,6 +17,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-04
diff --git a/blog/content/edition-2/posts/04-testing/index.zh-CN.md b/blog/content/edition-2/posts/04-testing/index.zh-CN.md
index a8f9a70d..a343d67a 100644
--- a/blog/content/edition-2/posts/04-testing/index.zh-CN.md
+++ b/blog/content/edition-2/posts/04-testing/index.zh-CN.md
@@ -19,6 +19,7 @@ translators = ["luojia65", "Rustin-Liu"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-04
diff --git a/blog/content/edition-2/posts/05-cpu-exceptions/index.fa.md b/blog/content/edition-2/posts/05-cpu-exceptions/index.fa.md
index 1704e596..91ba4c3e 100644
--- a/blog/content/edition-2/posts/05-cpu-exceptions/index.fa.md
+++ b/blog/content/edition-2/posts/05-cpu-exceptions/index.fa.md
@@ -23,6 +23,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-05
diff --git a/blog/content/edition-2/posts/05-cpu-exceptions/index.ja.md b/blog/content/edition-2/posts/05-cpu-exceptions/index.ja.md
index 689f589d..41faf2fd 100644
--- a/blog/content/edition-2/posts/05-cpu-exceptions/index.ja.md
+++ b/blog/content/edition-2/posts/05-cpu-exceptions/index.ja.md
@@ -22,6 +22,7 @@ CPU例外は、例えば無効なメモリアドレスにアクセスしたと
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-05
diff --git a/blog/content/edition-2/posts/05-cpu-exceptions/index.md b/blog/content/edition-2/posts/05-cpu-exceptions/index.md
index 3064b7b5..4bf60143 100644
--- a/blog/content/edition-2/posts/05-cpu-exceptions/index.md
+++ b/blog/content/edition-2/posts/05-cpu-exceptions/index.md
@@ -18,6 +18,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-05
diff --git a/blog/content/edition-2/posts/06-double-faults/index.fa.md b/blog/content/edition-2/posts/06-double-faults/index.fa.md
index ad68b869..05ca782d 100644
--- a/blog/content/edition-2/posts/06-double-faults/index.fa.md
+++ b/blog/content/edition-2/posts/06-double-faults/index.fa.md
@@ -21,6 +21,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-06
diff --git a/blog/content/edition-2/posts/06-double-faults/index.ja.md b/blog/content/edition-2/posts/06-double-faults/index.ja.md
index 5adcaaf0..fbce089c 100644
--- a/blog/content/edition-2/posts/06-double-faults/index.ja.md
+++ b/blog/content/edition-2/posts/06-double-faults/index.ja.md
@@ -20,6 +20,7 @@ translators = ["garasubo"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-06
diff --git a/blog/content/edition-2/posts/06-double-faults/index.md b/blog/content/edition-2/posts/06-double-faults/index.md
index a276837a..02a13d01 100644
--- a/blog/content/edition-2/posts/06-double-faults/index.md
+++ b/blog/content/edition-2/posts/06-double-faults/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-06
diff --git a/blog/content/edition-2/posts/07-hardware-interrupts/index.fa.md b/blog/content/edition-2/posts/07-hardware-interrupts/index.fa.md
index d3a91b3b..5a5319dc 100644
--- a/blog/content/edition-2/posts/07-hardware-interrupts/index.fa.md
+++ b/blog/content/edition-2/posts/07-hardware-interrupts/index.fa.md
@@ -21,6 +21,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-07
diff --git a/blog/content/edition-2/posts/07-hardware-interrupts/index.md b/blog/content/edition-2/posts/07-hardware-interrupts/index.md
index f99cae90..bc0aa50a 100644
--- a/blog/content/edition-2/posts/07-hardware-interrupts/index.md
+++ b/blog/content/edition-2/posts/07-hardware-interrupts/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-07
diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.fa.md b/blog/content/edition-2/posts/08-paging-introduction/index.fa.md
index 89cbcf19..27b0714e 100644
--- a/blog/content/edition-2/posts/08-paging-introduction/index.fa.md
+++ b/blog/content/edition-2/posts/08-paging-introduction/index.fa.md
@@ -21,6 +21,7 @@ rtl = true
[گیتهاب]: https://github.com/phil-opp/blog_os
[در زیر]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-08
diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.ja.md b/blog/content/edition-2/posts/08-paging-introduction/index.ja.md
index 321627a7..03be001c 100644
--- a/blog/content/edition-2/posts/08-paging-introduction/index.ja.md
+++ b/blog/content/edition-2/posts/08-paging-introduction/index.ja.md
@@ -20,6 +20,7 @@ translators = ["woodyZootopia", "JohnTitor"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-08
diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.md b/blog/content/edition-2/posts/08-paging-introduction/index.md
index 416c55dd..283b339a 100644
--- a/blog/content/edition-2/posts/08-paging-introduction/index.md
+++ b/blog/content/edition-2/posts/08-paging-introduction/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-08
diff --git a/blog/content/edition-2/posts/09-paging-implementation/index.ja.md b/blog/content/edition-2/posts/09-paging-implementation/index.ja.md
index ff00a0bd..bfb3d52b 100644
--- a/blog/content/edition-2/posts/09-paging-implementation/index.ja.md
+++ b/blog/content/edition-2/posts/09-paging-implementation/index.ja.md
@@ -18,6 +18,7 @@ translators = ["woodyZootopia", "garasubo"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-09
@@ -71,7 +72,7 @@ translators = ["woodyZootopia", "garasubo"]
この方法では、新しいページテーブルを作るたびに新しいマッピングを作る必要があるという欠点があります。また、他のアドレス空間のページテーブルにアクセスすることができると新しいプロセスを作るときに便利なのですが、これも不可能です。
-### 物理メモリ全体をマップする
+### 物理メモリ全体をマップする {#map-the-complete-physical-memory}
これらの問題はページテーブルのフレームだけと言わず**物理メモリ全体をマップして**しまえば解決します:
@@ -272,7 +273,7 @@ frame.map(|frame| frame.start_address() + u64::from(addr.page_offset()))
[cargo features]: https://doc.rust-lang.org/cargo/reference/features.html#the-features-section
-- `map_physical_memory` featureを使うと、全物理メモリを仮想アドレス空間のどこかにマッピングします。そのため、カーネルはすべての物理メモリにアクセスでき、[上で述べた方法に従って物理メモリ全体をマップする](#wu-li-memoriquan-ti-wodui-ying-fu-keru)ことができます。
+- `map_physical_memory` featureを使うと、全物理メモリを仮想アドレス空間のどこかにマッピングします。そのため、カーネルはすべての物理メモリにアクセスでき、[上で述べた方法に従って物理メモリ全体をマップする](#map-the-complete-physical-memory)ことができます。
- `recursive_page_table` featureでは、ブートローダはレベル4ページテーブルのエントリを再帰的にマッピングします。これによりカーネルは[再帰的ページテーブル](#zai-gui-de-peziteburu)で述べた方法に従ってページテーブルにアクセスすることができます。
私達のカーネルには、シンプルでプラットフォーム非依存かつ(ページテーブルのフレームでないメモリにもアクセスできるので)より強力である1つ目の方法を採ることにします。必要なブートローダの機能を有効化するために、`map_physical_memory` featureを`bootloader`のdependencyに追加します。
diff --git a/blog/content/edition-2/posts/09-paging-implementation/index.md b/blog/content/edition-2/posts/09-paging-implementation/index.md
index 5f786510..e9803ff2 100644
--- a/blog/content/edition-2/posts/09-paging-implementation/index.md
+++ b/blog/content/edition-2/posts/09-paging-implementation/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-09
diff --git a/blog/content/edition-2/posts/10-heap-allocation/index.md b/blog/content/edition-2/posts/10-heap-allocation/index.md
index 8a290fef..c56b5f10 100644
--- a/blog/content/edition-2/posts/10-heap-allocation/index.md
+++ b/blog/content/edition-2/posts/10-heap-allocation/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-10
diff --git a/blog/content/edition-2/posts/11-allocator-designs/index.md b/blog/content/edition-2/posts/11-allocator-designs/index.md
index d078e152..eb19d14f 100644
--- a/blog/content/edition-2/posts/11-allocator-designs/index.md
+++ b/blog/content/edition-2/posts/11-allocator-designs/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-11
diff --git a/blog/content/edition-2/posts/12-async-await/index.ja.md b/blog/content/edition-2/posts/12-async-await/index.ja.md
index d37ccdf4..121bcfc1 100644
--- a/blog/content/edition-2/posts/12-async-await/index.ja.md
+++ b/blog/content/edition-2/posts/12-async-await/index.ja.md
@@ -20,6 +20,7 @@ translators = ["kahirokunn", "garasubo", "sozysozbot", "woodyZootopia"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-12
@@ -232,7 +233,7 @@ Futureコンビネータの大きな利点は、操作を非同期に保つこ
[_Zero-cost futures in Rust_]: https://aturon.github.io/blog/2016/08/11/futures/
-##### 欠点
+##### 欠点 {#drawbacks}
Futureコンビネータを使うと、非常に効率的なコードを書くことができますが、型システムやクロージャベースのインターフェイスのため、状況によっては使いにくいことがあります。例えば、次のようなコードを考えてみましょう:
diff --git a/blog/content/edition-2/posts/12-async-await/index.md b/blog/content/edition-2/posts/12-async-await/index.md
index 4cdd8b85..fbe7e69f 100644
--- a/blog/content/edition-2/posts/12-async-await/index.md
+++ b/blog/content/edition-2/posts/12-async-await/index.md
@@ -16,6 +16,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-12
diff --git a/blog/content/edition-2/posts/deprecated/04-unit-testing/index.md b/blog/content/edition-2/posts/deprecated/04-unit-testing/index.md
index 81a80343..5c97cf68 100644
--- a/blog/content/edition-2/posts/deprecated/04-unit-testing/index.md
+++ b/blog/content/edition-2/posts/deprecated/04-unit-testing/index.md
@@ -17,6 +17,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-04
diff --git a/blog/content/edition-2/posts/deprecated/05-integration-tests/index.md b/blog/content/edition-2/posts/deprecated/05-integration-tests/index.md
index cf1c8b3c..900ec34d 100644
--- a/blog/content/edition-2/posts/deprecated/05-integration-tests/index.md
+++ b/blog/content/edition-2/posts/deprecated/05-integration-tests/index.md
@@ -17,6 +17,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/post-05
diff --git a/blog/content/edition-2/posts/deprecated/10-advanced-paging/index.md b/blog/content/edition-2/posts/deprecated/10-advanced-paging/index.md
index d2348543..70eac621 100644
--- a/blog/content/edition-2/posts/deprecated/10-advanced-paging/index.md
+++ b/blog/content/edition-2/posts/deprecated/10-advanced-paging/index.md
@@ -17,6 +17,7 @@ This blog is openly developed on [GitHub]. If you have any problems or questions
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
+
[post branch]: https://github.com/phil-opp/blog_os/tree/5c0fb63f33380fc8596d7166c2ebde03ef3d6726
## Introduction