linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] docs/zh_TW: Add translation for riscv/boot-image-header
@ 2021-09-12 15:50 Leo Yu-Chi Liang
  2021-09-12 17:28 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Yu-Chi Liang @ 2021-09-12 15:50 UTC (permalink / raw)
  To: corbet, src.res, linux-kernel, linux-doc, linux-doc-tw-discuss
  Cc: ycliang, ycliang

From: Leo Yu-Chi Liang <ycliang@cs.nctu.edu.tw>

Add Traditional Chinese for Documentation/riscv/boot-image-header.rst

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
---
 .../zh_TW/riscv/boot-image-header.rst         | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/translations/zh_TW/riscv/boot-image-header.rst

diff --git a/Documentation/translations/zh_TW/riscv/boot-image-header.rst b/Documentation/translations/zh_TW/riscv/boot-image-header.rst
new file mode 100644
index 000000000000..86519d3c4f3b
--- /dev/null
+++ b/Documentation/translations/zh_TW/riscv/boot-image-header.rst
@@ -0,0 +1,67 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. include:: ../disclaimer-zh_TW.rst
+
+:Original: Documentation/riscv/patch-acceptance.rst
+
+:譯者:
+
+ 梁育齊 Liang YuChi <ycliang@cs.nctu.edu.tw>
+
+=============================
+RISC-V Linux 的啟動影像檔標頭
+=============================
+
+:Author: Atish Patra <atish.patra@wdc.com>
+:Date:   20 May 2019
+
+這份文件僅描述 RISC-V Linux 啟動影像檔標頭的詳細訊息。
+
+待完成:
+    寫一份完整的啟動流程指南。
+    
+解壓縮後的 Linux 核心影像檔中會含有以下 64 位元組的標頭::
+
+        u32 code0;                /* 可執行程式碼 */
+        u32 code1;                /* 可執行程式碼 */
+        u64 text_offset;          /* 載入影像的偏移量  */
+        u64 image_size;           /* 有效影像大小,小端序 */
+        u64 flags;                /* 核心旗標,小端序 */
+        u32 version;              /* 標頭版本 */
+        u32 res1 = 0;             /* 保留 */
+        u64 res2 = 0;             /* 保留 */
+        u64 magic = 0x5643534952; /* 魔術數字,小端序,"RISCV" */
+        u32 magic2 = 0x05435352;  /* 魔術數字 2,小端序,"RSC\x05" */
+        u32 res3;                 /* 保留 PE COFF 的偏移量 */
+
+這種標頭格式是深受 ARM64 標頭的影響並且相容於 PE/COFF 標頭。
+因此,將來可以將 ARM64 和 RISC-V 標頭合併為一個通用標頭。
+
+註
+==
+- 將來,這個標頭還可用來支援 RISC-V 的 EFI 模擬實作。 
+  EFI 規範需要核心影像開頭的 PE/COFF 影像標頭,以便將其視作 EFI 應用程式來運行。
+  為了支援 EFI 模擬,code0 應替換為 "MZ" 魔術字串,res3(偏移量 0x3c)應指向 PE/COFF 標頭的其餘部分。
+
+- 版本欄位標示的是版本號
+
+        ==========  ======
+        位元 0:15   小版號
+        位元 16:31  大版號
+        ==========  ======
+
+   這樣可以保證新、舊版本間的相容性。
+   目前的版本被定義為 0.2。
+
+- 自 0.2 版後,"magic" 欄位已不適用。
+  在未來的版本中,它可能會被刪除。
+  這本來應該和 ARM64 標頭 "magic" 欄位相符,但不幸的是沒有。 
+  "magic 2" 欄位是用來替換 "magic" 的,並且與 ARM64 標頭相符。
+
+- 在目前的標頭中,旗標欄位僅只有一個欄位。
+
+        ======  ===================================================
+        位元 0  核心的位元組順序。 小端序,則為 1;大端序,則為 0。
+        ======  ===================================================
+
+- 啟動載入程式會需要核心影像檔案的大小資訊,否則啟動程序將會失敗。
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-12 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 15:50 [PATCH 1/1] docs/zh_TW: Add translation for riscv/boot-image-header Leo Yu-Chi Liang
2021-09-12 17:28 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).