linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yu-Chi Liang <ycliang@andestech.com>
To: <corbet@lwn.net>, <src.res@email.cn>,
	<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-doc-tw-discuss@lists.sourceforge.net>
Cc: <ycliang@cs.nctu.edu.tw>, <ycliang@andestech.com>
Subject: [PATCH 1/1] docs/zh_TW: Add translation for riscv/boot-image-header
Date: Sun, 12 Sep 2021 15:50:49 +0000	[thread overview]
Message-ID: <20210912155049.129774-1-ycliang@andestech.com> (raw)

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


             reply	other threads:[~2021-09-12 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 15:50 Leo Yu-Chi Liang [this message]
2021-09-12 17:28 ` [PATCH 1/1] docs/zh_TW: Add translation for riscv/boot-image-header Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210912155049.129774-1-ycliang@andestech.com \
    --to=ycliang@andestech.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=src.res@email.cn \
    --cc=ycliang@cs.nctu.edu.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).