1*e4624435SJonathan CorbetChinese translated version of Documentation/arch/arm64/legacy_instructions.rst 2*e4624435SJonathan Corbet 3*e4624435SJonathan CorbetIf you have any comment or update to the content, please contact the 4*e4624435SJonathan Corbetoriginal document maintainer directly. However, if you have a problem 5*e4624435SJonathan Corbetcommunicating in English you can also ask the Chinese maintainer for 6*e4624435SJonathan Corbethelp. Contact the Chinese maintainer if this translation is outdated 7*e4624435SJonathan Corbetor if there is a problem with the translation. 8*e4624435SJonathan Corbet 9*e4624435SJonathan CorbetMaintainer: Punit Agrawal <punit.agrawal@arm.com> 10*e4624435SJonathan Corbet Suzuki K. Poulose <suzuki.poulose@arm.com> 11*e4624435SJonathan CorbetChinese maintainer: Fu Wei <wefu@redhat.com> 12*e4624435SJonathan Corbet--------------------------------------------------------------------- 13*e4624435SJonathan CorbetDocumentation/arch/arm64/legacy_instructions.rst 的中文翻译 14*e4624435SJonathan Corbet 15*e4624435SJonathan Corbet如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 16*e4624435SJonathan Corbet交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 17*e4624435SJonathan Corbet译存在问题,请联系中文版维护者。 18*e4624435SJonathan Corbet 19*e4624435SJonathan Corbet本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 20*e4624435SJonathan Corbet 21*e4624435SJonathan Corbet英文版维护者: Punit Agrawal <punit.agrawal@arm.com> 22*e4624435SJonathan Corbet Suzuki K. Poulose <suzuki.poulose@arm.com> 23*e4624435SJonathan Corbet中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> 24*e4624435SJonathan Corbet中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> 25*e4624435SJonathan Corbet中文版校译者: 傅炜 Fu Wei <wefu@redhat.com> 26*e4624435SJonathan Corbet 27*e4624435SJonathan Corbet以下为正文 28*e4624435SJonathan Corbet--------------------------------------------------------------------- 29*e4624435SJonathan CorbetLinux 内核在 arm64 上的移植提供了一个基础框架,以支持构架中正在被淘汰或已废弃指令的模拟执行。 30*e4624435SJonathan Corbet这个基础框架的代码使用未定义指令钩子(hooks)来支持模拟。如果指令存在,它也允许在硬件中启用该指令。 31*e4624435SJonathan Corbet 32*e4624435SJonathan Corbet模拟模式可通过写 sysctl 节点(/proc/sys/abi)来控制。 33*e4624435SJonathan Corbet不同的执行方式及 sysctl 节点的相应值,解释如下: 34*e4624435SJonathan Corbet 35*e4624435SJonathan Corbet* Undef(未定义) 36*e4624435SJonathan Corbet 值: 0 37*e4624435SJonathan Corbet 产生未定义指令终止异常。它是那些构架中已废弃的指令,如 SWP,的默认处理方式。 38*e4624435SJonathan Corbet 39*e4624435SJonathan Corbet* Emulate(模拟) 40*e4624435SJonathan Corbet 值: 1 41*e4624435SJonathan Corbet 使用软件模拟方式。为解决软件迁移问题,这种模拟指令模式的使用是被跟踪的,并会发出速率限制警告。 42*e4624435SJonathan Corbet 它是那些构架中正在被淘汰的指令,如 CP15 barriers(隔离指令),的默认处理方式。 43*e4624435SJonathan Corbet 44*e4624435SJonathan Corbet* Hardware Execution(硬件执行) 45*e4624435SJonathan Corbet 值: 2 46*e4624435SJonathan Corbet 虽然标记为正在被淘汰,但一些实现可能提供硬件执行这些指令的使能/禁用操作。 47*e4624435SJonathan Corbet 使用硬件执行一般会有更好的性能,但将无法收集运行时对正被淘汰指令的使用统计数据。 48*e4624435SJonathan Corbet 49*e4624435SJonathan Corbet默认执行模式依赖于指令在构架中状态。正在被淘汰的指令应该以模拟(Emulate)作为默认模式, 50*e4624435SJonathan Corbet而已废弃的指令必须默认使用未定义(Undef)模式 51*e4624435SJonathan Corbet 52*e4624435SJonathan Corbet注意:指令模拟可能无法应对所有情况。更多详情请参考单独的指令注释。 53*e4624435SJonathan Corbet 54*e4624435SJonathan Corbet受支持的遗留指令 55*e4624435SJonathan Corbet------------- 56*e4624435SJonathan Corbet* SWP{B} 57*e4624435SJonathan Corbet节点: /proc/sys/abi/swp 58*e4624435SJonathan Corbet状态: 已废弃 59*e4624435SJonathan Corbet默认执行方式: Undef (0) 60*e4624435SJonathan Corbet 61*e4624435SJonathan Corbet* CP15 Barriers 62*e4624435SJonathan Corbet节点: /proc/sys/abi/cp15_barrier 63*e4624435SJonathan Corbet状态: 正被淘汰,不推荐使用 64*e4624435SJonathan Corbet默认执行方式: Emulate (1) 65*e4624435SJonathan Corbet 66*e4624435SJonathan Corbet* SETEND 67*e4624435SJonathan Corbet节点: /proc/sys/abi/setend 68*e4624435SJonathan Corbet状态: 正被淘汰,不推荐使用 69*e4624435SJonathan Corbet默认执行方式: Emulate (1)* 70*e4624435SJonathan Corbet注:为了使能这个特性,系统中的所有 CPU 必须在 EL0 支持混合字节序。 71*e4624435SJonathan Corbet如果一个新的 CPU (不支持混合字节序) 在使能这个特性后被热插入系统, 72*e4624435SJonathan Corbet在应用中可能会出现不可预期的结果。 73