Skip to content

Commit 1385313

Browse files
Yanteng Sichenhuacai
authored andcommitted
docs/zh_CN: Add LoongArch booting description's translation
Translate ../loongarch/booting.rst into Chinese. Suggested-by: Xiaotian Wu <[email protected]> Signed-off-by: Yanteng Si <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 38eb496 commit 1385313

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
.. include:: ../disclaimer-zh_CN.rst
4+
5+
:Original: Documentation/loongarch/booting.rst
6+
7+
:翻译:
8+
9+
司延腾 Yanteng Si <[email protected]>
10+
11+
====================
12+
启动 Linux/LoongArch
13+
====================
14+
15+
:作者: 司延腾 <[email protected]>
16+
:日期: 2022年11月18日
17+
18+
BootLoader传递给内核的信息
19+
==========================
20+
21+
LoongArch支持ACPI和FDT启动,需要传递给内核的信息包括memmap、initrd、cmdline、可
22+
选的ACPI/FDT表等。
23+
24+
内核在 `kernel_entry` 入口处被传递以下参数:
25+
26+
- a0 = efi_boot: `efi_boot` 是一个标志,表示这个启动环境是否完全符合UEFI
27+
的要求。
28+
29+
- a1 = cmdline: `cmdline` 是一个指向内核命令行的指针。
30+
31+
- a2 = systemtable: `systemtable` 指向EFI的系统表,在这个阶段涉及的所有
32+
指针都是物理地址。
33+
34+
Linux/LoongArch内核镜像文件头
35+
=============================
36+
37+
内核镜像是EFI镜像。作为PE文件,它们有一个64字节的头部结构体,如下所示::
38+
39+
u32 MZ_MAGIC /* "MZ", MS-DOS 头 */
40+
u32 res0 = 0 /* 保留 */
41+
u64 kernel_entry /* 内核入口点 */
42+
u64 _end - _text /* 内核镜像有效大小 */
43+
u64 load_offset /* 加载内核镜像相对内存起始地址的偏移量 */
44+
u64 res1 = 0 /* 保留 */
45+
u64 res2 = 0 /* 保留 */
46+
u64 res3 = 0 /* 保留 */
47+
u32 LINUX_PE_MAGIC /* 魔术数 */
48+
u32 pe_header - _head /* 到PE头的偏移量 */

Documentation/translations/zh_CN/loongarch/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ LoongArch体系结构
1414
:numbered:
1515

1616
introduction
17+
booting
1718
irq-chip-model
1819

1920
features

0 commit comments

Comments
 (0)