All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] docs/zh_CN: add parisc Chinese documents
@ 2021-05-07 10:07 Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 1/3] docs/zh_CN: add parisc index translation Yanteng Si
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Yanteng Si @ 2021-05-07 10:07 UTC (permalink / raw)
  To: corbet
  Cc: Yanteng Si, alexs, chenhuacai, jiaxun.yang, linux-doc,
	realpuyuwang, bobwxc, siyanteng01, huangjianghui

v1 -> v2:

* Some bad translations have been modified as suggested by Xiangcheng.Thank you for your review.
https://lore.kernel.org/linux-doc/cover.1619665430.git.siyanteng@loongson.cn/T/#t

* Update [PATCH 1/3].
Because zh_CN/inxdex.rst has been refactored by Xiangcheng Wu.

* Pick Xiangcheng Wu's review-by tag for [patch 1/3]

v1:

This set translates Documentation/parisc/* into Chinese.

Yanteng Si (3):
  docs/zh_CN: add parisc index translation
  docs/zh_CN: add parisc debugging.rst translation
  docs/zh_CN: add parisc registers.rst translation

 Documentation/translations/zh_CN/index.rst    |   2 +-
 .../translations/zh_CN/parisc/debugging.rst   |  42 +++++
 .../translations/zh_CN/parisc/index.rst       |  28 ++++
 .../translations/zh_CN/parisc/registers.rst   | 153 ++++++++++++++++++
 4 files changed, 224 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/parisc/debugging.rst
 create mode 100644 Documentation/translations/zh_CN/parisc/index.rst
 create mode 100644 Documentation/translations/zh_CN/parisc/registers.rst

-- 
2.27.0


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

* [PATCH v2 1/3] docs/zh_CN: add parisc index translation
  2021-05-07 10:07 [PATCH v2 0/3] docs/zh_CN: add parisc Chinese documents Yanteng Si
@ 2021-05-07 10:07 ` Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation Yanteng Si
  2 siblings, 0 replies; 7+ messages in thread
From: Yanteng Si @ 2021-05-07 10:07 UTC (permalink / raw)
  To: corbet
  Cc: Yanteng Si, alexs, chenhuacai, jiaxun.yang, linux-doc,
	realpuyuwang, bobwxc, siyanteng01, huangjianghui

This path translates Documentation/parisc/index.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Reviewed-by: Wu XiangCheng <bobwxc@email.cn>
---
 Documentation/translations/zh_CN/index.rst    |  2 +-
 .../translations/zh_CN/parisc/index.rst       | 24 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/parisc/index.rst

diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst
index d56d6b7092e6..420c0a809357 100644
--- a/Documentation/translations/zh_CN/index.rst
+++ b/Documentation/translations/zh_CN/index.rst
@@ -153,6 +153,7 @@ TODOList:
    arm64/index
    riscv/index
    openrisc/index
+   parisc/index
 
 TODOList:
 
@@ -160,7 +161,6 @@ TODOList:
 * ia64/index
 * m68k/index
 * nios2/index
-* parisc/index
 * powerpc/index
 * s390/index
 * sh/index
diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
new file mode 100644
index 000000000000..ef232d46b1ba
--- /dev/null
+++ b/Documentation/translations/zh_CN/parisc/index.rst
@@ -0,0 +1,24 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/parisc/index.rst
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_parisc_index:
+
+====================
+PA-RISC体系架构
+====================
+
+Todolist:
+
+   debugging
+   registers
+   features
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
-- 
2.27.0


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

* [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation
  2021-05-07 10:07 [PATCH v2 0/3] docs/zh_CN: add parisc Chinese documents Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 1/3] docs/zh_CN: add parisc index translation Yanteng Si
@ 2021-05-07 10:07 ` Yanteng Si
  2021-05-07 14:49   ` Wu X.C.
  2021-05-07 10:07 ` [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation Yanteng Si
  2 siblings, 1 reply; 7+ messages in thread
From: Yanteng Si @ 2021-05-07 10:07 UTC (permalink / raw)
  To: corbet
  Cc: Yanteng Si, alexs, chenhuacai, jiaxun.yang, linux-doc,
	realpuyuwang, bobwxc, siyanteng01, huangjianghui

This translates Documentation/parisc/debugging.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/parisc/debugging.rst   | 42 +++++++++++++++++++
 .../translations/zh_CN/parisc/index.rst       |  6 ++-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/parisc/debugging.rst

diff --git a/Documentation/translations/zh_CN/parisc/debugging.rst b/Documentation/translations/zh_CN/parisc/debugging.rst
new file mode 100644
index 000000000000..c21beb986e15
--- /dev/null
+++ b/Documentation/translations/zh_CN/parisc/debugging.rst
@@ -0,0 +1,42 @@
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/parisc/debugging.rst
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_parisc_debugging:
+
+=================
+调试PA-RISC
+=================
+
+好吧,这里有一些关于调试linux/parisc的较底层部分的信息。
+
+
+1. 绝对地址
+=====================
+
+很多汇编代码目前运行在实模式下,这意味着会使用绝对地址,而不是像内核其他
+部分那样使用虚拟地址。要将绝对地址转换为虚拟地址,你可以在System.map中查
+找,添加__PAGE_OFFSET(目前是0x10000000)。
+
+
+2. HPMCs
+========
+
+当实模式的代码试图访问不存在的内存时,会出现HPMC(high priority machine
+check)而不是内核oops。若要调试HPMC,请尝试找到系统响应程序/请求程序地址。
+系统请求程序地址应该与(某)处理器的HPA(I/O范围内的高地址)相匹配;系统响应程
+序地址是实模式代码试图访问的地址。
+
+系统响应程序地址的典型值是大于__PAGE_OFFSET (0x10000000)的地址,这意味着
+在实模式试图访问它之前,虚拟地址没有被翻译成物理地址。
+
+
+3. 有趣的Q位
+============
+
+某些非常关键的代码必须清除PSW中的Q位。当Q位被清除时,CPU不会更新中断处理
+程序所读取的寄存器,以找出机器被中断的位置——所以如果你在清除Q位的指令和再
+次设置Q位的RFI之间遇到中断,你不知道它到底发生在哪里。如果你幸运的话,IAOQ
+会指向清除Q位的指令,如果你不幸运的话,它会指向任何地方。通常Q位的问题会
+表现为无法解释的系统挂起或物理内存越界。
diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
index ef232d46b1ba..b913d664e735 100644
--- a/Documentation/translations/zh_CN/parisc/index.rst
+++ b/Documentation/translations/zh_CN/parisc/index.rst
@@ -10,9 +10,13 @@
 PA-RISC体系架构
 ====================
 
-Todolist:
+.. toctree::
+   :maxdepth: 2
 
    debugging
+
+Todolist:
+
    registers
    features
 
-- 
2.27.0


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

* [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation
  2021-05-07 10:07 [PATCH v2 0/3] docs/zh_CN: add parisc Chinese documents Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 1/3] docs/zh_CN: add parisc index translation Yanteng Si
  2021-05-07 10:07 ` [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation Yanteng Si
@ 2021-05-07 10:07 ` Yanteng Si
  2021-05-08  5:31   ` Wu X.C.
  2 siblings, 1 reply; 7+ messages in thread
From: Yanteng Si @ 2021-05-07 10:07 UTC (permalink / raw)
  To: corbet
  Cc: Yanteng Si, alexs, chenhuacai, jiaxun.yang, linux-doc,
	realpuyuwang, bobwxc, siyanteng01, huangjianghui

This patch translates Documentation/parisc/registers.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/parisc/index.rst       |   2 +-
 .../translations/zh_CN/parisc/registers.rst   | 153 ++++++++++++++++++
 2 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/parisc/registers.rst

diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
index b913d664e735..a47454ebe32e 100644
--- a/Documentation/translations/zh_CN/parisc/index.rst
+++ b/Documentation/translations/zh_CN/parisc/index.rst
@@ -14,10 +14,10 @@ PA-RISC体系架构
    :maxdepth: 2
 
    debugging
+   registers
 
 Todolist:
 
-   registers
    features
 
 .. only::  subproject and html
diff --git a/Documentation/translations/zh_CN/parisc/registers.rst b/Documentation/translations/zh_CN/parisc/registers.rst
new file mode 100644
index 000000000000..ecae1b079aec
--- /dev/null
+++ b/Documentation/translations/zh_CN/parisc/registers.rst
@@ -0,0 +1,153 @@
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/parisc/registers.rst
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_parisc_registers:
+
+=========================
+Linux/PA-RISC的寄存器用法
+=========================
+
+[ 用星号表示目前尚未实现的计划用途。 ]
+
+ABI约定的通用寄存器
+===================
+
+控制寄存器
+----------
+
+============================    =================================
+CR 0 (恢复计数器)               用于ptrace
+CR 1-CR 7(无定义)               未使用
+CR 8 (Protection ID)            每进程值*
+CR 9, 12, 13 (PIDS)             未使用
+CR10 (CCR)                      FPU延迟保存*
+CR11                            按照ABI的规定(SAR)
+CR14 (中断向量)                 初始化为 fault_vector
+CR15 (EIEM)                     所有位初始化为1*
+CR16 (间隔计时器)               读取周期数/写入开始时间间隔计时器
+CR17-CR22                       中断参数
+CR19                            中断指令寄存器
+CR20                            中断空间寄存器
+CR21                            中断偏移量寄存器
+CR22                            中断 PSW
+CR23 (EIRR)                     读取未决中断/写入清除位
+CR24 (TR 0)                     内核空间页目录指针
+CR25 (TR 1)                     用户空间页目录指针
+CR26 (TR 2)                     不使用
+CR27 (TR 3)                     线程描述符指针
+CR28 (TR 4)                     不使用
+CR29 (TR 5)                     不使用
+CR30 (TR 6)                     当前 / 0
+CR31 (TR 7)                     临时寄存器,在不同地方使用
+============================    =================================
+
+空间寄存器(内核模式)
+----------------------
+
+========                        ==============================
+SR0                             临时空间寄存器
+SR4-SR7                         设置为0
+SR1                             临时空间寄存器
+SR2                             内核不应该破坏它
+SR3                             用于用户空间访问(当前进程)
+========                        ==============================
+
+空间寄存器(用户模式)
+----------------------
+
+========                        ============================
+SR0                             临时空间寄存器
+SR1                             临时空间寄存器
+SR2                             保存Linux gateway page的空间
+SR3                             在内核中保存用户地址空间的值
+SR4-SR7                         定义了用户/内核的短地址空间
+========                        ============================
+
+
+处理器状态字
+------------
+
+======================          ================================================
+W (64位地址)                  0
+E (小尾端)                    0
+S (安全间隔计时器)            0
+T (产生分支陷阱)              0
+H (高特权级陷阱)              0
+L (低特权级陷阱)              0
+N (撤销下一条指令)            被C代码使用
+X (数据存储中断禁用)          0
+B (产生分支)                  被C代码使用
+C (代码地址转译)              1, 在执行实模式代码时为0
+V (除法步长校正)              被C代码使用
+M (HPMC 掩码)                 0, 在执行HPMC操作*时为1
+C/B (进/借 位)                被C代码使用
+O (有序引用)                  1*
+F (性能监视器)                0
+R (回收计数器陷阱)            0
+Q (收集中断状态)              1 (在rfi之前的代码中为0)
+P (保护标识符)                1*
+D (数据地址转译)              1, 在执行实模式代码时为0
+I (外部中断掩码)              由cli()/sti()宏使用。
+======================          ================================================
+
+“隐形”寄存器(影子寄存器)
+---------------------------
+
+=============                   ===================
+PSW W 默认值                    0
+PSW E 默认值                    0
+影子寄存器                      被中断处理代码使用
+TOC启用位                       1
+=============                   ===================
+
+----------------------------------------------------------
+
+PA-RISC架构定义了7个寄存器作为“影子寄存器”。这些寄存器在
+RETURN FROM INTERRUPTION AND RESTORE指令中使用,通过消
+除中断处理程序中对一般寄存器(GR)的保存和恢复的需要来减
+少状态保存和恢复时间。影子寄存器是GRs 1, 8, 9, 16, 17,
+24和25。
+
+-------------------------------------------------------------------------
+
+寄存器使用说明,最初由约翰-马文John Marvin提供,并由Randolph Chung提供一些补充说明。
+
+对于通用寄存器:
+
+r1,r2,r19-r26,r28,r29 & r31可以在不保存它们的情况下被使用。当然,如果你
+关心它们,在调用另一个程序之前,你也需要保存它们。上面的一些寄存器确实
+有特殊的含义,你应该注意一下:
+
+    r1:
+       addil指令是硬性规定将其结果放在r1中,所以如果你使用这条指令要
+       注意这点。
+
+    r2:
+       这就是返回指针。一般来说,你不想使用它,因为你需要这个指针来返
+       回给你的调用者。然而,它与这组寄存器组合在一起,因为调用者不能
+       依赖你返回时的值是相同的,也就是说,你可以将r2复制到另一个寄存
+       器,并在作废r2后通过该寄存器返回,这应该不会给调用程序带来问题。
+
+    r19-r22:
+       这些通常被认为是临时寄存器。
+       请注意,在64位中它们是arg7-arg4。
+
+    r23-r26:
+       这些是arg3-arg0,也就是说,如果你不再关心传入的值,你可以使用
+       它们。
+
+    r28,r29:
+       这俩是ret0和ret1。它们是你传入返回值的地方。r28是主返回值。当返回
+       小结构体时,r29也可以用来将数据传回给调用程序。
+
+    r30:
+       栈指针
+
+    r31:
+       ble指令将返回指针放在这里。
+
+
+       r3-r18,r27,r30需要被保存和恢复。r3-r18只是一般用途的寄存器。
+       r27是数据指针,用来使对全局变量的引用更容易。r30是栈指针。
-- 
2.27.0


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

* Re: [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation
  2021-05-07 10:07 ` [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation Yanteng Si
@ 2021-05-07 14:49   ` Wu X.C.
  0 siblings, 0 replies; 7+ messages in thread
From: Wu X.C. @ 2021-05-07 14:49 UTC (permalink / raw)
  To: Yanteng Si
  Cc: corbet, alexs, chenhuacai, jiaxun.yang, linux-doc, realpuyuwang,
	siyanteng01, huangjianghui

On Fri, May 07, 2021 at 06:07:04PM +0800, Yanteng Si wrote:
> This translates Documentation/parisc/debugging.rst into Chinese.
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>

Reviewed-by: Wu XiangCheng <bobwxc@email.cn>

> ---
>  .../translations/zh_CN/parisc/debugging.rst   | 42 +++++++++++++++++++
>  .../translations/zh_CN/parisc/index.rst       |  6 ++-
>  2 files changed, 47 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/translations/zh_CN/parisc/debugging.rst
> 
> diff --git a/Documentation/translations/zh_CN/parisc/debugging.rst b/Documentation/translations/zh_CN/parisc/debugging.rst
> new file mode 100644
> index 000000000000..c21beb986e15
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/parisc/debugging.rst
> @@ -0,0 +1,42 @@
> +.. include:: ../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/parisc/debugging.rst
> +:Translator: Yanteng Si <siyanteng@loongson.cn>
> +
> +.. _cn_parisc_debugging:
> +
> +=================
> +调试PA-RISC
> +=================
> +
> +好吧,这里有一些关于调试linux/parisc的较底层部分的信息。
> +
> +
> +1. 绝对地址
> +=====================
> +
> +很多汇编代码目前运行在实模式下,这意味着会使用绝对地址,而不是像内核其他
> +部分那样使用虚拟地址。要将绝对地址转换为虚拟地址,你可以在System.map中查
> +找,添加__PAGE_OFFSET(目前是0x10000000)。
> +
> +
> +2. HPMCs
> +========
> +
> +当实模式的代码试图访问不存在的内存时,会出现HPMC(high priority machine
> +check)而不是内核oops。若要调试HPMC,请尝试找到系统响应程序/请求程序地址。
> +系统请求程序地址应该与(某)处理器的HPA(I/O范围内的高地址)相匹配;系统响应程
> +序地址是实模式代码试图访问的地址。
> +
> +系统响应程序地址的典型值是大于__PAGE_OFFSET (0x10000000)的地址,这意味着
> +在实模式试图访问它之前,虚拟地址没有被翻译成物理地址。
> +
> +
> +3. 有趣的Q位
> +============
> +
> +某些非常关键的代码必须清除PSW中的Q位。当Q位被清除时,CPU不会更新中断处理
> +程序所读取的寄存器,以找出机器被中断的位置——所以如果你在清除Q位的指令和再
> +次设置Q位的RFI之间遇到中断,你不知道它到底发生在哪里。如果你幸运的话,IAOQ
> +会指向清除Q位的指令,如果你不幸运的话,它会指向任何地方。通常Q位的问题会
> +表现为无法解释的系统挂起或物理内存越界。
> diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
> index ef232d46b1ba..b913d664e735 100644
> --- a/Documentation/translations/zh_CN/parisc/index.rst
> +++ b/Documentation/translations/zh_CN/parisc/index.rst
> @@ -10,9 +10,13 @@
>  PA-RISC体系架构
>  ====================
>  
> -Todolist:
> +.. toctree::
> +   :maxdepth: 2
>  
>     debugging
> +
> +Todolist:
> +
>     registers
>     features
>  
> -- 
> 2.27.0


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

* Re: [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation
  2021-05-07 10:07 ` [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation Yanteng Si
@ 2021-05-08  5:31   ` Wu X.C.
  2021-05-08 15:33     ` yanteng si
  0 siblings, 1 reply; 7+ messages in thread
From: Wu X.C. @ 2021-05-08  5:31 UTC (permalink / raw)
  To: Yanteng Si
  Cc: corbet, alexs, chenhuacai, jiaxun.yang, linux-doc, realpuyuwang,
	siyanteng01, huangjianghui

On Fri, May 07, 2021 at 06:07:05PM +0800, Yanteng Si wrote:
> This patch translates Documentation/parisc/registers.rst into Chinese.
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  .../translations/zh_CN/parisc/index.rst       |   2 +-
>  .../translations/zh_CN/parisc/registers.rst   | 153 ++++++++++++++++++
>  2 files changed, 154 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/translations/zh_CN/parisc/registers.rst
> 
> diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
> index b913d664e735..a47454ebe32e 100644
> --- a/Documentation/translations/zh_CN/parisc/index.rst
> +++ b/Documentation/translations/zh_CN/parisc/index.rst
> @@ -14,10 +14,10 @@ PA-RISC体系架构
>     :maxdepth: 2
>  
>     debugging
> +   registers
>  
>  Todolist:
>  
> -   registers
>     features
>  
>  .. only::  subproject and html
> diff --git a/Documentation/translations/zh_CN/parisc/registers.rst b/Documentation/translations/zh_CN/parisc/registers.rst
> new file mode 100644
> index 000000000000..ecae1b079aec
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/parisc/registers.rst
> @@ -0,0 +1,153 @@
> +.. include:: ../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/parisc/registers.rst
> +:Translator: Yanteng Si <siyanteng@loongson.cn>
> +
> +.. _cn_parisc_registers:
> +
> +=========================
> +Linux/PA-RISC的寄存器用法
> +=========================
> +
> +[ 用星号表示目前尚未实现的计划用途。 ]
> +
> +ABI约定的通用寄存器
> +===================
> +
> +控制寄存器
> +----------
> +
> +============================    =================================
> +CR 0 (恢复计数器)               用于ptrace
> +CR 1-CR 7(无定义)               未使用
> +CR 8 (Protection ID)            每进程值*
> +CR 9, 12, 13 (PIDS)             未使用
> +CR10 (CCR)                      FPU延迟保存*
> +CR11                            按照ABI的规定(SAR)
> +CR14 (中断向量)                 初始化为 fault_vector
> +CR15 (EIEM)                     所有位初始化为1*
> +CR16 (间隔计时器)               读取周期数/写入开始时间间隔计时器
> +CR17-CR22                       中断参数
> +CR19                            中断指令寄存器
> +CR20                            中断空间寄存器
> +CR21                            中断偏移量寄存器
> +CR22                            中断 PSW
> +CR23 (EIRR)                     读取未决中断/写入清除位
> +CR24 (TR 0)                     内核空间页目录指针
> +CR25 (TR 1)                     用户空间页目录指针
> +CR26 (TR 2)                     不使用
> +CR27 (TR 3)                     线程描述符指针
> +CR28 (TR 4)                     不使用
> +CR29 (TR 5)                     不使用
> +CR30 (TR 6)                     当前 / 0
> +CR31 (TR 7)                     临时寄存器,在不同地方使用
> +============================    =================================
> +
> +空间寄存器(内核模式)
> +----------------------
> +
> +========                        ==============================
> +SR0                             临时空间寄存器
> +SR4-SR7                         设置为0
> +SR1                             临时空间寄存器
> +SR2                             内核不应该破坏它
> +SR3                             用于用户空间访问(当前进程)
> +========                        ==============================
> +
> +空间寄存器(用户模式)
> +----------------------
> +
> +========                        ============================
> +SR0                             临时空间寄存器
> +SR1                             临时空间寄存器
> +SR2                             保存Linux gateway page的空间
> +SR3                             在内核中保存用户地址空间的值
> +SR4-SR7                         定义了用户/内核的短地址空间
> +========                        ============================
> +
> +
> +处理器状态字
> +------------
> +
> +======================          ================================================
> +W (64位地址)                  0
> +E (小尾端)                    0
> +S (安全间隔计时器)            0
> +T (产生分支陷阱)              0
> +H (高特权级陷阱)              0
> +L (低特权级陷阱)              0
> +N (撤销下一条指令)            被C代码使用
> +X (数据存储中断禁用)          0
> +B (产生分支)                  被C代码使用
> +C (代码地址转译)              1, 在执行实模式代码时为0
> +V (除法步长校正)              被C代码使用
> +M (HPMC 掩码)                 0, 在执行HPMC操作*时为1
> +C/B (进/借 位)                被C代码使用
> +O (有序引用)                  1*
> +F (性能监视器)                0
> +R (回收计数器陷阱)            0
> +Q (收集中断状态)              1 (在rfi之前的代码中为0)
> +P (保护标识符)                1*
> +D (数据地址转译)              1, 在执行实模式代码时为0
> +I (外部中断掩码)              由cli()/sti()宏使用。
> +======================          ================================================
> +
> +“隐形”寄存器(影子寄存器)
> +---------------------------
> +
> +=============                   ===================
> +PSW W 默认值                    0
> +PSW E 默认值                    0
> +影子寄存器                      被中断处理代码使用
> +TOC启用位                       1
> +=============                   ===================
> +
> +----------------------------------------------------------
> +
> +PA-RISC架构定义了7个寄存器作为“影子寄存器”。这些寄存器在
> +RETURN FROM INTERRUPTION AND RESTORE指令中使用,通过消
> +除中断处理程序中对一般寄存器(GR)的保存和恢复的需要来减
> +少状态保存和恢复时间。影子寄存器是GRs 1, 8, 9, 16, 17,
> +24和25。
> +
> +-------------------------------------------------------------------------
> +
> +寄存器使用说明,最初由约翰-马文John Marvin提供,并由Randolph Chung提供一些补充说明。
                         ^^^^^^^^^

> +
> +对于通用寄存器:
> +
> +r1,r2,r19-r26,r28,r29 & r31可以在不保存它们的情况下被使用。当然,如果你
> +关心它们,在调用另一个程序之前,你也需要保存它们。上面的一些寄存器确实
> +有特殊的含义,你应该注意一下:
> +
> +    r1:
> +       addil指令是硬性规定将其结果放在r1中,所以如果你使用这条指令要
> +       注意这点。
> +
> +    r2:
> +       这就是返回指针。一般来说,你不想使用它,因为你需要这个指针来返
> +       回给你的调用者。然而,它与这组寄存器组合在一起,因为调用者不能
> +       依赖你返回时的值是相同的,也就是说,你可以将r2复制到另一个寄存
> +       器,并在作废r2后通过该寄存器返回,这应该不会给调用程序带来问题。
> +
> +    r19-r22:
> +       这些通常被认为是临时寄存器。
> +       请注意,在64位中它们是arg7-arg4。
> +
> +    r23-r26:
> +       这些是arg3-arg0,也就是说,如果你不再关心传入的值,你可以使用
> +       它们。
> +
> +    r28,r29:
> +       这俩是ret0和ret1。它们是你传入返回值的地方。r28是主返回值。当返回
> +       小结构体时,r29也可以用来将数据传回给调用程序。
> +
> +    r30:
> +       栈指针
> +
> +    r31:
> +       ble指令将返回指针放在这里。
> +
> +

I've specifically reminded you that there's no need to change the indentation
of the next paragraph 😂.

> +       r3-r18,r27,r30需要被保存和恢复。r3-r18只是一般用途的寄存器。
> +       r27是数据指针,用来使对全局变量的引用更容易。r30是栈指针。
> -- 
> 2.27.0

Reviewed-by: Wu XiangCheng <bobwxc@email.cn>

Thanks,
Wu X.C


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

* Re: [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation
  2021-05-08  5:31   ` Wu X.C.
@ 2021-05-08 15:33     ` yanteng si
  0 siblings, 0 replies; 7+ messages in thread
From: yanteng si @ 2021-05-08 15:33 UTC (permalink / raw)
  To: Wu X.C.
  Cc: Yanteng Si, Jonathan Corbet, Alex Shi, Huacai Chen, Jiaxun Yang,
	linux-doc, Puyu Wang, huangjianghui

Wu X.C. <bobwxc@email.cn> 于2021年5月8日周六 下午1:31写道:
>
> On Fri, May 07, 2021 at 06:07:05PM +0800, Yanteng Si wrote:
> > This patch translates Documentation/parisc/registers.rst into Chinese.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  .../translations/zh_CN/parisc/index.rst       |   2 +-
> >  .../translations/zh_CN/parisc/registers.rst   | 153 ++++++++++++++++++
> >  2 files changed, 154 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/translations/zh_CN/parisc/registers.rst
> >
> > diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
> > index b913d664e735..a47454ebe32e 100644
> > --- a/Documentation/translations/zh_CN/parisc/index.rst
> > +++ b/Documentation/translations/zh_CN/parisc/index.rst
> > @@ -14,10 +14,10 @@ PA-RISC体系架构
> >     :maxdepth: 2
> >
> >     debugging
> > +   registers
> >
> >  Todolist:
> >
> > -   registers
> >     features
> >
> >  .. only::  subproject and html
> > diff --git a/Documentation/translations/zh_CN/parisc/registers.rst b/Documentation/translations/zh_CN/parisc/registers.rst
> > new file mode 100644
> > index 000000000000..ecae1b079aec
> > --- /dev/null
> > +++ b/Documentation/translations/zh_CN/parisc/registers.rst
> > @@ -0,0 +1,153 @@
> > +.. include:: ../disclaimer-zh_CN.rst
> > +
> > +:Original: Documentation/parisc/registers.rst
> > +:Translator: Yanteng Si <siyanteng@loongson.cn>
> > +
> > +.. _cn_parisc_registers:
> > +
> > +=========================
> > +Linux/PA-RISC的寄存器用法
> > +=========================
> > +
> > +[ 用星号表示目前尚未实现的计划用途。 ]
> > +
> > +ABI约定的通用寄存器
> > +===================
> > +
> > +控制寄存器
> > +----------
> > +
> > +============================    =================================
> > +CR 0 (恢复计数器)               用于ptrace
> > +CR 1-CR 7(无定义)               未使用
> > +CR 8 (Protection ID)            每进程值*
> > +CR 9, 12, 13 (PIDS)             未使用
> > +CR10 (CCR)                      FPU延迟保存*
> > +CR11                            按照ABI的规定(SAR)
> > +CR14 (中断向量)                 初始化为 fault_vector
> > +CR15 (EIEM)                     所有位初始化为1*
> > +CR16 (间隔计时器)               读取周期数/写入开始时间间隔计时器
> > +CR17-CR22                       中断参数
> > +CR19                            中断指令寄存器
> > +CR20                            中断空间寄存器
> > +CR21                            中断偏移量寄存器
> > +CR22                            中断 PSW
> > +CR23 (EIRR)                     读取未决中断/写入清除位
> > +CR24 (TR 0)                     内核空间页目录指针
> > +CR25 (TR 1)                     用户空间页目录指针
> > +CR26 (TR 2)                     不使用
> > +CR27 (TR 3)                     线程描述符指针
> > +CR28 (TR 4)                     不使用
> > +CR29 (TR 5)                     不使用
> > +CR30 (TR 6)                     当前 / 0
> > +CR31 (TR 7)                     临时寄存器,在不同地方使用
> > +============================    =================================
> > +
> > +空间寄存器(内核模式)
> > +----------------------
> > +
> > +========                        ==============================
> > +SR0                             临时空间寄存器
> > +SR4-SR7                         设置为0
> > +SR1                             临时空间寄存器
> > +SR2                             内核不应该破坏它
> > +SR3                             用于用户空间访问(当前进程)
> > +========                        ==============================
> > +
> > +空间寄存器(用户模式)
> > +----------------------
> > +
> > +========                        ============================
> > +SR0                             临时空间寄存器
> > +SR1                             临时空间寄存器
> > +SR2                             保存Linux gateway page的空间
> > +SR3                             在内核中保存用户地址空间的值
> > +SR4-SR7                         定义了用户/内核的短地址空间
> > +========                        ============================
> > +
> > +
> > +处理器状态字
> > +------------
> > +
> > +======================          ================================================
> > +W (64位地址)                  0
> > +E (小尾端)                    0
> > +S (安全间隔计时器)            0
> > +T (产生分支陷阱)              0
> > +H (高特权级陷阱)              0
> > +L (低特权级陷阱)              0
> > +N (撤销下一条指令)            被C代码使用
> > +X (数据存储中断禁用)          0
> > +B (产生分支)                  被C代码使用
> > +C (代码地址转译)              1, 在执行实模式代码时为0
> > +V (除法步长校正)              被C代码使用
> > +M (HPMC 掩码)                 0, 在执行HPMC操作*时为1
> > +C/B (进/借 位)                被C代码使用
> > +O (有序引用)                  1*
> > +F (性能监视器)                0
> > +R (回收计数器陷阱)            0
> > +Q (收集中断状态)              1 (在rfi之前的代码中为0)
> > +P (保护标识符)                1*
> > +D (数据地址转译)              1, 在执行实模式代码时为0
> > +I (外部中断掩码)              由cli()/sti()宏使用。
> > +======================          ================================================
> > +
> > +“隐形”寄存器(影子寄存器)
> > +---------------------------
> > +
> > +=============                   ===================
> > +PSW W 默认值                    0
> > +PSW E 默认值                    0
> > +影子寄存器                      被中断处理代码使用
> > +TOC启用位                       1
> > +=============                   ===================
> > +
> > +----------------------------------------------------------
> > +
> > +PA-RISC架构定义了7个寄存器作为“影子寄存器”。这些寄存器在
> > +RETURN FROM INTERRUPTION AND RESTORE指令中使用,通过消
> > +除中断处理程序中对一般寄存器(GR)的保存和恢复的需要来减
> > +少状态保存和恢复时间。影子寄存器是GRs 1, 8, 9, 16, 17,
> > +24和25。
> > +
> > +-------------------------------------------------------------------------
> > +
> > +寄存器使用说明,最初由约翰-马文John Marvin提供,并由Randolph Chung提供一些补充说明。
>                          ^^^^^^^^^
> del 约翰-马文
> > +
> > +对于通用寄存器:
> > +
> > +r1,r2,r19-r26,r28,r29 & r31可以在不保存它们的情况下被使用。当然,如果你
> > +关心它们,在调用另一个程序之前,你也需要保存它们。上面的一些寄存器确实
> > +有特殊的含义,你应该注意一下:
> > +
> > +    r1:
> > +       addil指令是硬性规定将其结果放在r1中,所以如果你使用这条指令要
> > +       注意这点。
> > +
> > +    r2:
> > +       这就是返回指针。一般来说,你不想使用它,因为你需要这个指针来返
> > +       回给你的调用者。然而,它与这组寄存器组合在一起,因为调用者不能
> > +       依赖你返回时的值是相同的,也就是说,你可以将r2复制到另一个寄存
> > +       器,并在作废r2后通过该寄存器返回,这应该不会给调用程序带来问题。
> > +
> > +    r19-r22:
> > +       这些通常被认为是临时寄存器。
> > +       请注意,在64位中它们是arg7-arg4。
> > +
> > +    r23-r26:
> > +       这些是arg3-arg0,也就是说,如果你不再关心传入的值,你可以使用
> > +       它们。
> > +
> > +    r28,r29:
> > +       这俩是ret0和ret1。它们是你传入返回值的地方。r28是主返回值。当返回
> > +       小结构体时,r29也可以用来将数据传回给调用程序。
> > +
> > +    r30:
> > +       栈指针
> > +
> > +    r31:
> > +       ble指令将返回指针放在这里。
> > +
> > +
>
> I've specifically reminded you that there's no need to change the indentation
> of the next paragraph .

~>_<~
>
>
> > +       r3-r18,r27,r30需要被保存和恢复。r3-r18只是一般用途的寄存器。
> > +       r27是数据指针,用来使对全局变量的引用更容易。r30是栈指针。
> > --
> > 2.27.0
>
> Reviewed-by: Wu XiangCheng <bobwxc@email.cn>

Thank you for your review!

Thanks,
Yanteng
>
>
> Thanks,
> Wu X.C
>

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

end of thread, other threads:[~2021-05-08 15:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 10:07 [PATCH v2 0/3] docs/zh_CN: add parisc Chinese documents Yanteng Si
2021-05-07 10:07 ` [PATCH v2 1/3] docs/zh_CN: add parisc index translation Yanteng Si
2021-05-07 10:07 ` [PATCH v2 2/3] docs/zh_CN: add parisc debugging.rst translation Yanteng Si
2021-05-07 14:49   ` Wu X.C.
2021-05-07 10:07 ` [PATCH v2 3/3] docs/zh_CN: add parisc registers.rst translation Yanteng Si
2021-05-08  5:31   ` Wu X.C.
2021-05-08 15:33     ` yanteng si

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.