* [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
@ 2016-04-21 13:45 wefu
2016-04-21 16:42 ` Will Deacon
0 siblings, 1 reply; 15+ messages in thread
From: wefu @ 2016-04-21 13:45 UTC (permalink / raw)
To: harryxiyou, corbet, will.deacon
Cc: linux-kernel, linux-doc, linux-kernel, ard.biesheuvel,
catalin.marinas, Fu Wei
From: Fu Wei <wefu@redhat.com>
This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
It is based on the modifications of Documentation/arm64/booting.txt in submission:
"a7f8de16".
Signed-off-by: Fu Wei <wefu@redhat.com>
---
Documentation/zh_CN/arm64/booting.txt | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
index 1145bf8..c1dd968 100644
--- a/Documentation/zh_CN/arm64/booting.txt
+++ b/Documentation/zh_CN/arm64/booting.txt
@@ -8,7 +8,7 @@ or if there is a problem with the translation.
M: Will Deacon <will.deacon@arm.com>
zh_CN: Fu Wei <wefu@redhat.com>
-C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
+C: 55f058e7574c3615dea4615573a19bdb258696c6
---------------------------------------------------------------------
Documentation/arm64/booting.txt 的中文翻译
@@ -20,7 +20,7 @@ Documentation/arm64/booting.txt 的中文翻译
中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
-本文翻译提交时的 Git 检出点为: 1926e54f115725a9248d0c4c65c22acaf94de4c4
+本文翻译提交时的 Git 检出点为: 55f058e7574c3615dea4615573a19bdb258696c6
以下为正文
---------------------------------------------------------------------
@@ -125,18 +125,22 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
1 - 4K
2 - 16K
3 - 64K
- 位 3-63: 保留。
+ 位 3: 内核物理位置
+ 0 - 2MB 对齐基址应尽量靠近内存起始处,因为
+ 其基址以下的内存无法通过线性映射访问
+ 1 - 2MB 对齐基址可以在物理内存的任意位置
+ 位 4-63: 保留。
- 当 image_size 为零时,引导装载程序应试图在内核映像末尾之后尽可能
多地保留空闲内存供内核直接使用。对内存空间的需求量因所选定的内核
特性而异, 并无实际限制。
-内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的
-text_offset 字节处,并从该处被调用。当前,对 Linux 来说在此基址以下的
-内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。2MB 对齐
-基址和内核映像起始地址之间的区域对于内核来说没有特殊意义,且可能被
-用于其他目的。
+内核映像必须被放置在任意一个可用系统内存 2MB 对齐基址的 text_offset
+字节处,并从该处被调用。2MB 对齐基址和内核映像起始地址之间的区域对于
+内核来说没有特殊意义,且可能被用于其他目的。
从映像起始地址算起,最少必须准备 image_size 字节的空闲内存供内核使用。
+注: v4.6 之前的版本无法使用内核映像物理偏移以下的内存,所以当时建议
+将映像尽量放置在靠近系统内存起始的地方。
任何提供给内核的内存(甚至在映像起始地址之前),若未从内核中标记为保留
(如在设备树(dtb)的 memreserve 区域),都将被认为对内核是可用。
--
2.5.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-04-21 13:45 [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt wefu
@ 2016-04-21 16:42 ` Will Deacon
2016-04-28 13:16 ` Jonathan Corbet
2016-04-28 13:56 ` Fu Wei
0 siblings, 2 replies; 15+ messages in thread
From: Will Deacon @ 2016-04-21 16:42 UTC (permalink / raw)
To: wefu
Cc: harryxiyou, corbet, linux-kernel, linux-doc, linux-kernel,
ard.biesheuvel, catalin.marinas
On Thu, Apr 21, 2016 at 09:45:40PM +0800, wefu@redhat.com wrote:
> From: Fu Wei <wefu@redhat.com>
>
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>
> It is based on the modifications of Documentation/arm64/booting.txt in submission:
> "a7f8de16".
>
> Signed-off-by: Fu Wei <wefu@redhat.com>
> ---
> Documentation/zh_CN/arm64/booting.txt | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
> index 1145bf8..c1dd968 100644
> --- a/Documentation/zh_CN/arm64/booting.txt
> +++ b/Documentation/zh_CN/arm64/booting.txt
> @@ -8,7 +8,7 @@ or if there is a problem with the translation.
>
> M: Will Deacon <will.deacon@arm.com>
> zh_CN: Fu Wei <wefu@redhat.com>
> -C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
> +C: 55f058e7574c3615dea4615573a19bdb258696c6
Just curious, but what are these SHAs supposed to represent? Neither of
them looks particularly relevant to me.
Will
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-04-21 16:42 ` Will Deacon
@ 2016-04-28 13:16 ` Jonathan Corbet
2016-04-28 14:00 ` Fu Wei
2016-04-28 13:56 ` Fu Wei
1 sibling, 1 reply; 15+ messages in thread
From: Jonathan Corbet @ 2016-04-28 13:16 UTC (permalink / raw)
To: Will Deacon
Cc: wefu, harryxiyou, linux-kernel, linux-doc, linux-kernel,
ard.biesheuvel, catalin.marinas
On Thu, 21 Apr 2016 17:42:28 +0100
Will Deacon <will.deacon@arm.com> wrote:
> > -C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
> > +C: 55f058e7574c3615dea4615573a19bdb258696c6
>
> Just curious, but what are these SHAs supposed to represent? Neither of
> them looks particularly relevant to me.
I'm kind of assuming it's the head of the repo at the time the update was
done.
I've applied the patch to the docs tree, anyway.
Thanks,
jon
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-04-28 13:16 ` Jonathan Corbet
@ 2016-04-28 14:00 ` Fu Wei
0 siblings, 0 replies; 15+ messages in thread
From: Fu Wei @ 2016-04-28 14:00 UTC (permalink / raw)
To: Jonathan Corbet, Will Deacon
Cc: harryxiyou, linux-kernel, linux-doc, linux-kernel, ard.biesheuvel,
catalin.marinas
Hi Jonathan,
On 04/28/2016 09:16 PM, Jonathan Corbet wrote:
> On Thu, 21 Apr 2016 17:42:28 +0100
> Will Deacon <will.deacon@arm.com> wrote:
>
>>> -C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
>>> +C: 55f058e7574c3615dea4615573a19bdb258696c6
>>
>> Just curious, but what are these SHAs supposed to represent? Neither of
>> them looks particularly relevant to me.
>
> I'm kind of assuming it's the head of the repo at the time the update was
> done.
yes, you are right. :-)
next time, I just need to do
"git diff 55f058e7574c3615dea4615573a19bdb258696c6..HEAD <English doc> >
doc.patch" to see the difference :-)
>
> I've applied the patch to the docs tree, anyway.
Great thanks for your help! :-)
>
> Thanks,
>
> jon
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-04-21 16:42 ` Will Deacon
2016-04-28 13:16 ` Jonathan Corbet
@ 2016-04-28 13:56 ` Fu Wei
1 sibling, 0 replies; 15+ messages in thread
From: Fu Wei @ 2016-04-28 13:56 UTC (permalink / raw)
To: Will Deacon
Cc: harryxiyou, corbet, linux-kernel, linux-doc, linux-kernel,
ard.biesheuvel, catalin.marinas
Hi Will
On 04/22/2016 12:42 AM, Will Deacon wrote:
> On Thu, Apr 21, 2016 at 09:45:40PM +0800, wefu@redhat.com wrote:
>> From: Fu Wei <wefu@redhat.com>
>>
>> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>>
>> It is based on the modifications of Documentation/arm64/booting.txt in submission:
>> "a7f8de16".
>>
>> Signed-off-by: Fu Wei <wefu@redhat.com>
>> ---
>> Documentation/zh_CN/arm64/booting.txt | 20 ++++++++++++--------
>> 1 file changed, 12 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
>> index 1145bf8..c1dd968 100644
>> --- a/Documentation/zh_CN/arm64/booting.txt
>> +++ b/Documentation/zh_CN/arm64/booting.txt
>> @@ -8,7 +8,7 @@ or if there is a problem with the translation.
>>
>> M: Will Deacon <will.deacon@arm.com>
>> zh_CN: Fu Wei <wefu@redhat.com>
>> -C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
>> +C: 55f058e7574c3615dea4615573a19bdb258696c6
>
> Just curious, but what are these SHAs supposed to represent? Neither of
> them looks particularly relevant to me.
Sorry for late response.
This is the checkout point when I translated the documentation.
I learn it from "MAINTAINERS", I would like to upstream my script patch
to keep track of the Documentation status. It can tell me
(1)which English doc is updated since I submitted the translation.
(2)which doc haven't been translated(a list)
M: original doc Maintainer(Maybe I should use "En" ro "E" for English)?
zh_CN: Chinese doc maintainer
C: Commit number or Checkout point
And my plan is that the patch can also be used in other languages, like
"ja_JP" and "ko_KR". I hope that can help or encourage more and more
people to do the doc translation work. And that can help people using
another language to learn and enjoy the kernel development more easily.
>
> Will
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
@ 2016-02-16 8:41 wefu
2016-02-16 8:51 ` Weiwei Jia
2016-02-17 21:07 ` Jonathan Corbet
0 siblings, 2 replies; 15+ messages in thread
From: wefu @ 2016-02-16 8:41 UTC (permalink / raw)
To: harryxiyou, corbet, will.deacon
Cc: linux-kernel, linux-doc, linux-kernel, Fu Wei
From: Fu Wei <wefu@redhat.com>
This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
It is based on the modifications of Documentation/arm64/booting.txt in submission:
"61bd93ce", "6c020ea8", "9d372c9f", "6d32ab2d".
And improve the format of documentation.
Signed-off-by: Fu Wei <wefu@redhat.com>
---
Documentation/zh_CN/arm64/booting.txt | 93 ++++++++++++++++++++++-------------
1 file changed, 58 insertions(+), 35 deletions(-)
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
index 7cd36af..1145bf8 100644
--- a/Documentation/zh_CN/arm64/booting.txt
+++ b/Documentation/zh_CN/arm64/booting.txt
@@ -6,8 +6,9 @@ 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: Will Deacon <will.deacon@arm.com>
-Chinese maintainer: Fu Wei <wefu@redhat.com>
+M: Will Deacon <will.deacon@arm.com>
+zh_CN: Fu Wei <wefu@redhat.com>
+C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
---------------------------------------------------------------------
Documentation/arm64/booting.txt 的中文翻译
@@ -15,12 +16,11 @@ Documentation/arm64/booting.txt 的中文翻译
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
-本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6
-
英文版维护者: Will Deacon <will.deacon@arm.com>
中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
+本文翻译提交时的 Git 检出点为: 1926e54f115725a9248d0c4c65c22acaf94de4c4
以下为正文
---------------------------------------------------------------------
@@ -33,9 +33,9 @@ Documentation/arm64/booting.txt 的中文翻译
本文档基于 Russell King 的 ARM 启动文档,且适用于所有公开发布的
AArch64 Linux 内核代码。
-AArch64 异常模型由多个异常级别(EL0 - EL3)组成,对于 EL0 和 EL1
-异常级有对应的安全和非安全模式。EL2 是系统管理级,且仅存在于
-非安全模式下。EL3 是最高特权级,且仅存在于安全模式下。
+AArch64 异常模型由多个异常级(EL0 - EL3)组成,对于 EL0 和 EL1 异常级
+有对应的安全和非安全模式。EL2 是系统管理级,且仅存在于非安全模式下。
+EL3 是最高特权级,且仅存在于安全模式下。
基于本文档的目的,我们将简单地使用‘引导装载程序’(‘boot loader’)
这个术语来定义在将控制权交给 Linux 内核前 CPU 上执行的所有软件。
@@ -56,9 +56,9 @@ AArch64 异常模型由多个异常级别(EL0 - EL3)组成,对于 EL0 和
必要性: 强制
引导装载程序应该找到并初始化系统中所有内核用于保持系统变量数据的 RAM。
-这个操作的执行是设备依赖的。(它可能使用内部算法来自动定位和计算所有
-RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何引导装载程序
-设计者想到的匹配方法。)
+这个操作的执行方式因设备而异。(它可能使用内部算法来自动定位和计算所有
+RAM,或可能使用对这个设备已知的 RAM 信息,还可能是引导装载程序设计者
+想到的任何合适的方法。)
2、设置设备树数据
@@ -66,10 +66,12 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
必要性: 强制
-设备树数据块(dtb)必须 8 字节对齐,并位于从内核映像起始算起第一个 512MB
-内,且不得跨越 2MB 对齐边界。这使得内核可以通过初始页表中的单个节描述符来
-映射此数据块。
+设备树数据块(dtb)必须 8 字节对齐,且大小不能超过 2MB。由于设备树
+数据块将在使能缓存的情况下以 2MB 粒度被映射,故其不能被置于带任意
+特定属性被映射的 2MB 区域内。
+注: v4.2 之前的版本同时要求设备树数据块被置于从内核映像以下
+text_offset 字节处算起第一个 512MB 内。
3、解压内核映像
-------------
@@ -78,7 +80,7 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内核映像文件
(比如 Image.gz),则需要通过引导装载程序(使用 gzip 等)来进行解压。
-若引导装载程序没有实现这个需求,就要使用非压缩内核映像文件。
+若引导装载程序没有实现这个功能,就要使用非压缩内核映像文件。
4、调用内核映像
@@ -97,7 +99,7 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
u64 res3 = 0; /* 保留 */
u64 res4 = 0; /* 保留 */
u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */
- u32 res5; /* 保留 (用于 PE COFF 偏移) */
+ u32 res5; /* 保留 (用于 PE COFF 偏移) */
映像头注释:
@@ -107,26 +109,36 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
- code0/code1 负责跳转到 stext.
- 当通过 EFI 启动时, 最初 code0/code1 被跳过。
- res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点 (efi_stub_entry)。
- 当 stub 代码完成了它的使命,它会跳转到 code0 继续正常的启动流程。
+ res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点
+ (efi_stub_entry)。当 stub 代码完成了它的使命,它会跳转到 code0
+ 继续正常的启动流程。
- v3.17 之前,未明确指定 text_offset 的字节序。此时,image_size 为零,
且 text_offset 依照内核字节序为 0x80000。
- 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载程序使用。
- 当 image_size 为零,text_offset 可假定为 0x80000。
+ 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载
+ 程序使用。当 image_size 为零,text_offset 可假定为 0x80000。
- flags 域 (v3.17 引入) 为 64 位小端模式,其编码如下:
位 0: 内核字节序。 1 表示大端模式,0 表示小端模式。
- 位 1-63: 保留。
-
-- 当 image_size 为零时,引导装载程序应该试图在内核映像末尾之后尽可能多地保留空闲内存
- 供内核直接使用。对内存空间的需求量因所选定的内核特性而异, 且无实际限制。
-
-内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的 text_offset 字节处,并从那里被调用。
-当前,对 Linux 来说在此基址以下的内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。
-从映像起始地址算起,最少必须为内核释放出 image_size 字节的空间。
-
-任何提供给内核的内存(甚至在 2MB 对齐的基地址之前),若未从内核中标记为保留
+ 位 1-2: 内核页大小。
+ 0 - 未指定。
+ 1 - 4K
+ 2 - 16K
+ 3 - 64K
+ 位 3-63: 保留。
+
+- 当 image_size 为零时,引导装载程序应试图在内核映像末尾之后尽可能
+ 多地保留空闲内存供内核直接使用。对内存空间的需求量因所选定的内核
+ 特性而异, 并无实际限制。
+
+内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的
+text_offset 字节处,并从该处被调用。当前,对 Linux 来说在此基址以下的
+内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。2MB 对齐
+基址和内核映像起始地址之间的区域对于内核来说没有特殊意义,且可能被
+用于其他目的。
+从映像起始地址算起,最少必须准备 image_size 字节的空闲内存供内核使用。
+
+任何提供给内核的内存(甚至在映像起始地址之前),若未从内核中标记为保留
(如在设备树(dtb)的 memreserve 区域),都将被认为对内核是可用。
在跳转入内核前,必须符合以下状态:
@@ -147,13 +159,16 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
- 高速缓存、MMU
MMU 必须关闭。
- 指令缓存开启或关闭都可以。
+ 指令缓存开启或关闭皆可。
已载入的内核映像的相应内存区必须被清理,以达到缓存一致性点(PoC)。
- 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址维护其缓存,而非 set/way 操作。
+ 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址
+ 维护其缓存,而非 set/way 操作。
遵从通过虚拟地址操作维护构架缓存的系统缓存必须被配置,并可以被使能。
- 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且禁用。
+ 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且
+ 禁用。
- *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册 ARM DDI 0487A
+ *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册
+ ARM DDI 0487A
- 架构计时器
CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU
@@ -169,13 +184,21 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件
在一个更高的异常级别下初始化,以防止在 未知 状态下运行。
- 对于拥有 GICv3 中断控制器的系统:
- - 若当前在 EL3 :
+ 对于拥有 GICv3 中断控制器并以 v3 模式运行的系统:
+ - 如果 EL3 存在:
ICC_SRE_EL3.Enable (位 3) 必须初始化为 0b1。
ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b1。
- 若内核运行在 EL1:
ICC_SRE_EL2.Enable (位 3) 必须初始化为 0b1。
ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b1。
+ - 设备树(DT)或 ACPI 表必须描述一个 GICv3 中断控制器。
+
+ 对于拥有 GICv3 中断控制器并以兼容(v2)模式运行的系统:
+ - 如果 EL3 存在:
+ ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b0。
+ - 若内核运行在 EL1:
+ ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b0。
+ - 设备树(DT)或 ACPI 表必须描述一个 GICv2 中断控制器。
以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的
必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。
--
2.5.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-02-16 8:41 wefu
@ 2016-02-16 8:51 ` Weiwei Jia
2016-02-16 10:10 ` Will Deacon
2016-02-17 21:07 ` Jonathan Corbet
1 sibling, 1 reply; 15+ messages in thread
From: Weiwei Jia @ 2016-02-16 8:51 UTC (permalink / raw)
To: wefu@redhat.com
Cc: Jonathan Corbet, Will Deacon, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel
2016-02-16 16:41 GMT+08:00 <wefu@redhat.com>:
> From: Fu Wei <wefu@redhat.com>
>
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>
> It is based on the modifications of Documentation/arm64/booting.txt in submission:
> "61bd93ce", "6c020ea8", "9d372c9f", "6d32ab2d".
> And improve the format of documentation.
>
> Signed-off-by: Fu Wei <wefu@redhat.com>
Reviewed-by: Weiwei Jia <harryxiyou@gmail.com>
> ---
> Documentation/zh_CN/arm64/booting.txt | 93 ++++++++++++++++++++++-------------
> 1 file changed, 58 insertions(+), 35 deletions(-)
>
> diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
> index 7cd36af..1145bf8 100644
> --- a/Documentation/zh_CN/arm64/booting.txt
> +++ b/Documentation/zh_CN/arm64/booting.txt
> @@ -6,8 +6,9 @@ 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: Will Deacon <will.deacon@arm.com>
> -Chinese maintainer: Fu Wei <wefu@redhat.com>
> +M: Will Deacon <will.deacon@arm.com>
> +zh_CN: Fu Wei <wefu@redhat.com>
> +C: 1926e54f115725a9248d0c4c65c22acaf94de4c4
> ---------------------------------------------------------------------
> Documentation/arm64/booting.txt 的中文翻译
>
> @@ -15,12 +16,11 @@ Documentation/arm64/booting.txt 的中文翻译
> 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
> 译存在问题,请联系中文版维护者。
>
> -本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6
> -
> 英文版维护者: Will Deacon <will.deacon@arm.com>
> 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
> 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
> 中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
> +本文翻译提交时的 Git 检出点为: 1926e54f115725a9248d0c4c65c22acaf94de4c4
>
> 以下为正文
> ---------------------------------------------------------------------
> @@ -33,9 +33,9 @@ Documentation/arm64/booting.txt 的中文翻译
> 本文档基于 Russell King 的 ARM 启动文档,且适用于所有公开发布的
> AArch64 Linux 内核代码。
>
> -AArch64 异常模型由多个异常级别(EL0 - EL3)组成,对于 EL0 和 EL1
> -异常级有对应的安全和非安全模式。EL2 是系统管理级,且仅存在于
> -非安全模式下。EL3 是最高特权级,且仅存在于安全模式下。
> +AArch64 异常模型由多个异常级(EL0 - EL3)组成,对于 EL0 和 EL1 异常级
> +有对应的安全和非安全模式。EL2 是系统管理级,且仅存在于非安全模式下。
> +EL3 是最高特权级,且仅存在于安全模式下。
>
> 基于本文档的目的,我们将简单地使用‘引导装载程序’(‘boot loader’)
> 这个术语来定义在将控制权交给 Linux 内核前 CPU 上执行的所有软件。
> @@ -56,9 +56,9 @@ AArch64 异常模型由多个异常级别(EL0 - EL3)组成,对于 EL0 和
> 必要性: 强制
>
> 引导装载程序应该找到并初始化系统中所有内核用于保持系统变量数据的 RAM。
> -这个操作的执行是设备依赖的。(它可能使用内部算法来自动定位和计算所有
> -RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何引导装载程序
> -设计者想到的匹配方法。)
> +这个操作的执行方式因设备而异。(它可能使用内部算法来自动定位和计算所有
> +RAM,或可能使用对这个设备已知的 RAM 信息,还可能是引导装载程序设计者
> +想到的任何合适的方法。)
>
>
> 2、设置设备树数据
> @@ -66,10 +66,12 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
>
> 必要性: 强制
>
> -设备树数据块(dtb)必须 8 字节对齐,并位于从内核映像起始算起第一个 512MB
> -内,且不得跨越 2MB 对齐边界。这使得内核可以通过初始页表中的单个节描述符来
> -映射此数据块。
> +设备树数据块(dtb)必须 8 字节对齐,且大小不能超过 2MB。由于设备树
> +数据块将在使能缓存的情况下以 2MB 粒度被映射,故其不能被置于带任意
> +特定属性被映射的 2MB 区域内。
>
> +注: v4.2 之前的版本同时要求设备树数据块被置于从内核映像以下
> +text_offset 字节处算起第一个 512MB 内。
>
> 3、解压内核映像
> -------------
> @@ -78,7 +80,7 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
>
> AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内核映像文件
> (比如 Image.gz),则需要通过引导装载程序(使用 gzip 等)来进行解压。
> -若引导装载程序没有实现这个需求,就要使用非压缩内核映像文件。
> +若引导装载程序没有实现这个功能,就要使用非压缩内核映像文件。
>
>
> 4、调用内核映像
> @@ -97,7 +99,7 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
> u64 res3 = 0; /* 保留 */
> u64 res4 = 0; /* 保留 */
> u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */
> - u32 res5; /* 保留 (用于 PE COFF 偏移) */
> + u32 res5; /* 保留 (用于 PE COFF 偏移) */
>
>
> 映像头注释:
> @@ -107,26 +109,36 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
> - code0/code1 负责跳转到 stext.
>
> - 当通过 EFI 启动时, 最初 code0/code1 被跳过。
> - res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点 (efi_stub_entry)。
> - 当 stub 代码完成了它的使命,它会跳转到 code0 继续正常的启动流程。
> + res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点
> + (efi_stub_entry)。当 stub 代码完成了它的使命,它会跳转到 code0
> + 继续正常的启动流程。
>
> - v3.17 之前,未明确指定 text_offset 的字节序。此时,image_size 为零,
> 且 text_offset 依照内核字节序为 0x80000。
> - 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载程序使用。
> - 当 image_size 为零,text_offset 可假定为 0x80000。
> + 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载
> + 程序使用。当 image_size 为零,text_offset 可假定为 0x80000。
>
> - flags 域 (v3.17 引入) 为 64 位小端模式,其编码如下:
> 位 0: 内核字节序。 1 表示大端模式,0 表示小端模式。
> - 位 1-63: 保留。
> -
> -- 当 image_size 为零时,引导装载程序应该试图在内核映像末尾之后尽可能多地保留空闲内存
> - 供内核直接使用。对内存空间的需求量因所选定的内核特性而异, 且无实际限制。
> -
> -内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的 text_offset 字节处,并从那里被调用。
> -当前,对 Linux 来说在此基址以下的内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。
> -从映像起始地址算起,最少必须为内核释放出 image_size 字节的空间。
> -
> -任何提供给内核的内存(甚至在 2MB 对齐的基地址之前),若未从内核中标记为保留
> + 位 1-2: 内核页大小。
> + 0 - 未指定。
> + 1 - 4K
> + 2 - 16K
> + 3 - 64K
> + 位 3-63: 保留。
> +
> +- 当 image_size 为零时,引导装载程序应试图在内核映像末尾之后尽可能
> + 多地保留空闲内存供内核直接使用。对内存空间的需求量因所选定的内核
> + 特性而异, 并无实际限制。
> +
> +内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的
> +text_offset 字节处,并从该处被调用。当前,对 Linux 来说在此基址以下的
> +内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。2MB 对齐
> +基址和内核映像起始地址之间的区域对于内核来说没有特殊意义,且可能被
> +用于其他目的。
> +从映像起始地址算起,最少必须准备 image_size 字节的空闲内存供内核使用。
> +
> +任何提供给内核的内存(甚至在映像起始地址之前),若未从内核中标记为保留
> (如在设备树(dtb)的 memreserve 区域),都将被认为对内核是可用。
>
> 在跳转入内核前,必须符合以下状态:
> @@ -147,13 +159,16 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
>
> - 高速缓存、MMU
> MMU 必须关闭。
> - 指令缓存开启或关闭都可以。
> + 指令缓存开启或关闭皆可。
> 已载入的内核映像的相应内存区必须被清理,以达到缓存一致性点(PoC)。
> - 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址维护其缓存,而非 set/way 操作。
> + 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址
> + 维护其缓存,而非 set/way 操作。
> 遵从通过虚拟地址操作维护构架缓存的系统缓存必须被配置,并可以被使能。
> - 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且禁用。
> + 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且
> + 禁用。
>
> - *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册 ARM DDI 0487A
> + *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册
> + ARM DDI 0487A
>
> - 架构计时器
> CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU
> @@ -169,13 +184,21 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
> 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件
> 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。
>
> - 对于拥有 GICv3 中断控制器的系统:
> - - 若当前在 EL3 :
> + 对于拥有 GICv3 中断控制器并以 v3 模式运行的系统:
> + - 如果 EL3 存在:
> ICC_SRE_EL3.Enable (位 3) 必须初始化为 0b1。
> ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b1。
> - 若内核运行在 EL1:
> ICC_SRE_EL2.Enable (位 3) 必须初始化为 0b1。
> ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b1。
> + - 设备树(DT)或 ACPI 表必须描述一个 GICv3 中断控制器。
> +
> + 对于拥有 GICv3 中断控制器并以兼容(v2)模式运行的系统:
> + - 如果 EL3 存在:
> + ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b0。
> + - 若内核运行在 EL1:
> + ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b0。
> + - 设备树(DT)或 ACPI 表必须描述一个 GICv2 中断控制器。
>
> 以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的
> 必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。
> --
> 2.5.0
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-02-16 8:51 ` Weiwei Jia
@ 2016-02-16 10:10 ` Will Deacon
2016-02-16 12:48 ` Jonathan Corbet
0 siblings, 1 reply; 15+ messages in thread
From: Will Deacon @ 2016-02-16 10:10 UTC (permalink / raw)
To: Weiwei Jia
Cc: wefu@redhat.com, Jonathan Corbet, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel
On Tue, Feb 16, 2016 at 04:51:53PM +0800, Weiwei Jia wrote:
> 2016-02-16 16:41 GMT+08:00 <wefu@redhat.com>:
> > From: Fu Wei <wefu@redhat.com>
> >
> > This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
> >
> > It is based on the modifications of Documentation/arm64/booting.txt in submission:
> > "61bd93ce", "6c020ea8", "9d372c9f", "6d32ab2d".
> > And improve the format of documentation.
> >
> > Signed-off-by: Fu Wei <wefu@redhat.com>
>
> Reviewed-by: Weiwei Jia <harryxiyou@gmail.com>
Great, thanks for doing this. I guess Jon will pick it up?
Will
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2016-02-16 8:41 wefu
2016-02-16 8:51 ` Weiwei Jia
@ 2016-02-17 21:07 ` Jonathan Corbet
1 sibling, 0 replies; 15+ messages in thread
From: Jonathan Corbet @ 2016-02-17 21:07 UTC (permalink / raw)
To: wefu; +Cc: harryxiyou, will.deacon, linux-kernel, linux-doc, linux-kernel
On Tue, 16 Feb 2016 16:41:58 +0800
wefu@redhat.com wrote:
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
Applied to the docs tree, thanks.
jon
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <=wefu@redhat.com>]
* [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
[not found] <=wefu@redhat.com>
@ 2015-03-24 9:37 ` wefu
2015-03-24 9:42 ` harryxiyou
2015-03-26 17:14 ` Jonathan Corbet
0 siblings, 2 replies; 15+ messages in thread
From: wefu @ 2015-03-24 9:37 UTC (permalink / raw)
To: harryxiyou
Cc: gregkh, linux-kernel, linux-doc, catalin.marinas, will.deacon,
msalter, mark.rutland, marc.zyngier, fu.wei, Fu Wei
From: Fu Wei <wefu@redhat.com>
This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
It is based on the modifications of Documentation/arm64/booting.txt in submission:
"a2c1d73b", "cdd78578", "c218bca7", "63f8344c".
Signed-off-by: Fu Wei <wefu@redhat.com>
---
Documentation/zh_CN/arm64/booting.txt | 54 +++++++++++++++++++++++++++++------
1 file changed, 45 insertions(+), 9 deletions(-)
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
index 6f6d956..7cd36af 100644
--- a/Documentation/zh_CN/arm64/booting.txt
+++ b/Documentation/zh_CN/arm64/booting.txt
@@ -15,6 +15,8 @@ Documentation/arm64/booting.txt 的中文翻译
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
+本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6
+
英文版维护者: Will Deacon <will.deacon@arm.com>
中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
@@ -88,22 +90,44 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
u32 code0; /* 可执行代码 */
u32 code1; /* 可执行代码 */
- u64 text_offset; /* 映像装载偏移 */
- u64 res0 = 0; /* 保留 */
- u64 res1 = 0; /* 保留 */
+ u64 text_offset; /* 映像装载偏移,小端模式 */
+ u64 image_size; /* 映像实际大小, 小端模式 */
+ u64 flags; /* 内核旗标, 小端模式 *
u64 res2 = 0; /* 保留 */
u64 res3 = 0; /* 保留 */
u64 res4 = 0; /* 保留 */
u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */
- u32 res5 = 0; /* 保留 */
+ u32 res5; /* 保留 (用于 PE COFF 偏移) */
映像头注释:
+- 自 v3.17 起,除非另有说明,所有域都是小端模式。
+
- code0/code1 负责跳转到 stext.
-映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM
-的起始地址必须是以 2MB 对齐的。
+- 当通过 EFI 启动时, 最初 code0/code1 被跳过。
+ res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点 (efi_stub_entry)。
+ 当 stub 代码完成了它的使命,它会跳转到 code0 继续正常的启动流程。
+
+- v3.17 之前,未明确指定 text_offset 的字节序。此时,image_size 为零,
+ 且 text_offset 依照内核字节序为 0x80000。
+ 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载程序使用。
+ 当 image_size 为零,text_offset 可假定为 0x80000。
+
+- flags 域 (v3.17 引入) 为 64 位小端模式,其编码如下:
+ 位 0: 内核字节序。 1 表示大端模式,0 表示小端模式。
+ 位 1-63: 保留。
+
+- 当 image_size 为零时,引导装载程序应该试图在内核映像末尾之后尽可能多地保留空闲内存
+ 供内核直接使用。对内存空间的需求量因所选定的内核特性而异, 且无实际限制。
+
+内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的 text_offset 字节处,并从那里被调用。
+当前,对 Linux 来说在此基址以下的内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。
+从映像起始地址算起,最少必须为内核释放出 image_size 字节的空间。
+
+任何提供给内核的内存(甚至在 2MB 对齐的基地址之前),若未从内核中标记为保留
+(如在设备树(dtb)的 memreserve 区域),都将被认为对内核是可用。
在跳转入内核前,必须符合以下状态:
@@ -124,8 +148,12 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
- 高速缓存、MMU
MMU 必须关闭。
指令缓存开启或关闭都可以。
- 数据缓存必须关闭且无效。
- 外部高速缓存(如果存在)必须配置并禁用。
+ 已载入的内核映像的相应内存区必须被清理,以达到缓存一致性点(PoC)。
+ 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址维护其缓存,而非 set/way 操作。
+ 遵从通过虚拟地址操作维护构架缓存的系统缓存必须被配置,并可以被使能。
+ 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且禁用。
+
+ *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册 ARM DDI 0487A
- 架构计时器
CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU
@@ -141,6 +169,14 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件
在一个更高的异常级别下初始化,以防止在 未知 状态下运行。
+ 对于拥有 GICv3 中断控制器的系统:
+ - 若当前在 EL3 :
+ ICC_SRE_EL3.Enable (位 3) 必须初始化为 0b1。
+ ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b1。
+ - 若内核运行在 EL1:
+ ICC_SRE_EL2.Enable (位 3) 必须初始化为 0b1。
+ ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b1。
+
以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的
必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。
@@ -170,7 +206,7 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的
CPU_ON 调用来将 CPU 带入内核。
- *译者注:到文档翻译时,此文档已更新为 ARM DEN 0022B。
+ *译者注: ARM DEN 0022A 已更新到 ARM DEN 0022C。
设备树必须包含一个 ‘psci’ 节点,请参考以下文档:
Documentation/devicetree/bindings/arm/psci.txt
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2015-03-24 9:37 ` wefu
@ 2015-03-24 9:42 ` harryxiyou
2015-03-26 17:14 ` Jonathan Corbet
1 sibling, 0 replies; 15+ messages in thread
From: harryxiyou @ 2015-03-24 9:42 UTC (permalink / raw)
To: wefu@redhat.com
Cc: Greg-Kroah-Hartman, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Catalin Marinas, Will Deacon, msalter,
mark.rutland, marc.zyngier, Fu Wei
2015-03-24 17:37 GMT+08:00 <wefu@redhat.com>:
> From: Fu Wei <wefu@redhat.com>
>
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>
> It is based on the modifications of Documentation/arm64/booting.txt in submission:
> "a2c1d73b", "cdd78578", "c218bca7", "63f8344c".
>
> Signed-off-by: Fu Wei <wefu@redhat.com>
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Thanks, Weiwei
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt
2015-03-24 9:37 ` wefu
2015-03-24 9:42 ` harryxiyou
@ 2015-03-26 17:14 ` Jonathan Corbet
1 sibling, 0 replies; 15+ messages in thread
From: Jonathan Corbet @ 2015-03-26 17:14 UTC (permalink / raw)
To: wefu
Cc: harryxiyou, gregkh, linux-kernel, linux-doc, catalin.marinas,
will.deacon, msalter, mark.rutland, marc.zyngier, fu.wei
On Tue, 24 Mar 2015 17:37:19 +0800
wefu@redhat.com wrote:
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>
Applied to the docs tree, thanks.
jon
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH]Documentation:Update Documentation/zh_CN/arm64/booting.txt
@ 2014-01-28 12:28 Fu Wei
2014-01-28 13:38 ` jiaweiwei
0 siblings, 1 reply; 15+ messages in thread
From: Fu Wei @ 2014-01-28 12:28 UTC (permalink / raw)
To: Harry Wei
Cc: Will Deacon, Greg-Kroah-Hartman, LKML, Linux Doc ML, Fu Wei,
Mark Salter, Roy Franz, Mark Rutland
This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
It is based on the modifications of Documentation/arm64/booting.txt in submission:
"4d5e0b15", "4370eec0", "4fcd6e14".
Update maintainer's Email address.
Signed-off-by: Fu Wei <wefu@redhat.com>
---
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
index 28fa325..6f6d956 100644
--- a/Documentation/zh_CN/arm64/booting.txt
+++ b/Documentation/zh_CN/arm64/booting.txt
@@ -7,7 +7,7 @@ help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Maintainer: Will Deacon <will.deacon@arm.com>
-Chinese maintainer: Fu Wei <tekkamanninja@gmail.com>
+Chinese maintainer: Fu Wei <wefu@redhat.com>
---------------------------------------------------------------------
Documentation/arm64/booting.txt 的中文翻译
@@ -16,9 +16,9 @@ Documentation/arm64/booting.txt 的中文翻译
译存在问题,请联系中文版维护者。
英文版维护者: Will Deacon <will.deacon@arm.com>
-中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
-中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
-中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
+中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
+中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
+中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
以下为正文
---------------------------------------------------------------------
@@ -64,8 +64,8 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
必要性: 强制
-设备树数据块(dtb)大小必须不大于 2 MB,且位于从内核映像起始算起第一个
-512MB 内的 2MB 边界上。这使得内核可以通过初始页表中的单个节描述符来
+设备树数据块(dtb)必须 8 字节对齐,并位于从内核映像起始算起第一个 512MB
+内,且不得跨越 2MB 对齐边界。这使得内核可以通过初始页表中的单个节描述符来
映射此数据块。
@@ -84,13 +84,23 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
必要性: 强制
-已解压的内核映像包含一个 32 字节的头,内容如下:
+已解压的内核映像包含一个 64 字节的头,内容如下:
- u32 magic = 0x14000008; /* 跳转到 stext, 小端 */
- u32 res0 = 0; /* 保留 */
+ u32 code0; /* 可执行代码 */
+ u32 code1; /* 可执行代码 */
u64 text_offset; /* 映像装载偏移 */
+ u64 res0 = 0; /* 保留 */
u64 res1 = 0; /* 保留 */
u64 res2 = 0; /* 保留 */
+ u64 res3 = 0; /* 保留 */
+ u64 res4 = 0; /* 保留 */
+ u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */
+ u32 res5 = 0; /* 保留 */
+
+
+映像头注释:
+
+- code0/code1 负责跳转到 stext.
映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM
的起始地址必须是以 2MB 对齐的。
@@ -118,9 +128,9 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
外部高速缓存(如果存在)必须配置并禁用。
- 架构计时器
- CNTFRQ 必须设定为计时器的频率。
- 如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的 EL1PCTEN (bit 0)
- 必须置位。
+ CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU
+ 都一致的值。如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的
+ EL1PCTEN (bit 0) 必须置位。
- 一致性
通过内核启动的所有 CPU 在内核入口地址上必须处于相同的一致性域中。
@@ -131,23 +141,40 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件
在一个更高的异常级别下初始化,以防止在 未知 状态下运行。
+以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的
+必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。
+
引导装载程序必须在每个 CPU 处于以下状态时跳入内核入口:
- 主 CPU 必须直接跳入内核映像的第一条指令。通过此 CPU 传递的设备树
- 数据块必须在每个 CPU 节点中包含以下内容:
-
- 1、‘enable-method’属性。目前,此字段支持的值仅为字符串“spin-table”。
-
- 2、‘cpu-release-addr’标识一个 64-bit、初始化为零的内存位置。
+ 数据块必须在每个 CPU 节点中包含一个 ‘enable-method’ 属性,所
+ 支持的 enable-method 请见下文。
引导装载程序必须生成这些设备树属性,并在跳入内核入口之前将其插入
数据块。
-- 任何辅助 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递
+- enable-method 为 “spin-table” 的 CPU 必须在它们的 CPU
+ 节点中包含一个 ‘cpu-release-addr’ 属性。这个属性标识了一个
+ 64 位自然对齐且初始化为零的内存位置。
+
+ 这些 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递
给内核)中自旋于内核之外,轮询它们的 cpu-release-addr 位置(必须
包含在保留区中)。可通过插入 wfe 指令来降低忙循环开销,而主 CPU 将
发出 sev 指令。当对 cpu-release-addr 所指位置的读取操作返回非零值
- 时,CPU 必须直接跳入此值所指向的地址。
+ 时,CPU 必须跳入此值所指向的地址。此值为一个单独的 64 位小端值,
+ 因此 CPU 须在跳转前将所读取的值转换为其本身的端模式。
+
+- enable-method 为 “psci” 的 CPU 保持在内核外(比如,在
+ memory 节点中描述为内核空间的内存区外,或在通过设备树 /memreserve/
+ 域中描述为内核保留区的空间中)。内核将会发起在 ARM 文档(编号
+ ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的
+ CPU_ON 调用来将 CPU 带入内核。
+
+ *译者注:到文档翻译时,此文档已更新为 ARM DEN 0022B。
+
+ 设备树必须包含一个 ‘psci’ 节点,请参考以下文档:
+ Documentation/devicetree/bindings/arm/psci.txt
+
- 辅助 CPU 通用寄存器设置
x0 = 0 (保留,将来可能使用)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH]Documentation:Update Documentation/zh_CN/arm64/booting.txt
2014-01-28 12:28 [PATCH]Documentation:Update Documentation/zh_CN/arm64/booting.txt Fu Wei
@ 2014-01-28 13:38 ` jiaweiwei
0 siblings, 0 replies; 15+ messages in thread
From: jiaweiwei @ 2014-01-28 13:38 UTC (permalink / raw)
To: Fu Wei
Cc: Harry Wei, Will Deacon, Greg-Kroah-Hartman, LKML, Linux Doc ML,
Fu Wei, Mark Salter, Roy Franz, Mark Rutland
2014-01-28 Fu Wei <wefu@redhat.com>:
> This is a update of Chinese documentation: Documentation/zh_CN/arm64/booting.txt
>
> It is based on the modifications of Documentation/arm64/booting.txt in submission:
> "4d5e0b15", "4370eec0", "4fcd6e14".
>
> Update maintainer's Email address.
>
> Signed-off-by: Fu Wei <wefu@redhat.com>
>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-04-28 14:00 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 13:45 [PATCH] Documentation:Update Documentation/zh_CN/arm64/booting.txt wefu
2016-04-21 16:42 ` Will Deacon
2016-04-28 13:16 ` Jonathan Corbet
2016-04-28 14:00 ` Fu Wei
2016-04-28 13:56 ` Fu Wei
-- strict thread matches above, loose matches on Subject: below --
2016-02-16 8:41 wefu
2016-02-16 8:51 ` Weiwei Jia
2016-02-16 10:10 ` Will Deacon
2016-02-16 12:48 ` Jonathan Corbet
2016-02-17 21:07 ` Jonathan Corbet
[not found] <=wefu@redhat.com>
2015-03-24 9:37 ` wefu
2015-03-24 9:42 ` harryxiyou
2015-03-26 17:14 ` Jonathan Corbet
2014-01-28 12:28 [PATCH]Documentation:Update Documentation/zh_CN/arm64/booting.txt Fu Wei
2014-01-28 13:38 ` jiaweiwei
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).