arm中的Hypervisor模式是什么?
What is the Hypervisor mode in arm?
arch/arm/kernel/head.S中的宏safe_svcmode_maskall
定义在arch/arm/include/assembler.h中,即
.macro safe_svcmode_maskall reg:req
#if __LINUX_ARM_ARCH__ >= 6 && !defined(CONFIG_CPU_V7M)
mrs \reg , cpsr
eor \reg, \reg, #HYP_MODE
tst \reg, #MODE_MASK
bic \reg , \reg , #MODE_MASK
......
我发现有一个HYP_MODE,通过一些简单的介绍得知它是hypervisormode.But我在armv7架构参考中没有得到它的详细介绍manual.Actually
没发现manual.It里面的词cannot equal to svc mode,因为svc mode在代码的上下文中也有提到。
此外,我注意到 'reg' 后面有一个 ':req',这是一个 parameter.I 我知道 ':req' 意味着 'reg' 不能 empty.But 我在 gnu arm 汇编器手册中找不到 ':req' 的定义。
可能很简单question.But我想学习如何在官方手册中找到这些答案。(我仍然相信答案在这些manual.Maybe我没有选择相应的版本)
最后一题
But I can't find the definition of ':req' in gnu arm assembler manual.
You can qualify the macro argument to indicate whether all invocations must specify a non-blank value (through ‘:req’), or whether it takes all of the remaining arguments (through ‘:vararg’). You can supply a default value for any macro argument by following the name with ‘=deflt’.
以及示例,
.macro m p1:req, p2=0, p3:vararg
Begin the definition of a macro called m, with at least three arguments. The first argument must always have a value specified, but not the second, which instead has a default value. The third formal will get assigned all remaining arguments specified at invocation time.
第一题
I found there is a HYP_MODE and learned through some brief introduction that it is hypervisor mode.But I failed to get its detailed introduction in armv7 architecture reference manual.Actually I did't find the word in the manual.It can't be equal to svc mode,because svc mode is also mentioned in the context of the code.
在某些 CPU 上有 ARMV7A(不是 ARM7M)的管理程序模式,但不是全部。
参见:Hypervisor mode and ARM Virtualization extensions。
如果扩展名不存在,在ARM7A上修改这个位还是可以的。
arch/arm/kernel/head.S中的宏safe_svcmode_maskall
定义在arch/arm/include/assembler.h中,即
.macro safe_svcmode_maskall reg:req
#if __LINUX_ARM_ARCH__ >= 6 && !defined(CONFIG_CPU_V7M)
mrs \reg , cpsr
eor \reg, \reg, #HYP_MODE
tst \reg, #MODE_MASK
bic \reg , \reg , #MODE_MASK
......
我发现有一个HYP_MODE,通过一些简单的介绍得知它是hypervisormode.But我在armv7架构参考中没有得到它的详细介绍manual.Actually 没发现manual.It里面的词cannot equal to svc mode,因为svc mode在代码的上下文中也有提到。
此外,我注意到 'reg' 后面有一个 ':req',这是一个 parameter.I 我知道 ':req' 意味着 'reg' 不能 empty.But 我在 gnu arm 汇编器手册中找不到 ':req' 的定义。
可能很简单question.But我想学习如何在官方手册中找到这些答案。(我仍然相信答案在这些manual.Maybe我没有选择相应的版本)
最后一题
But I can't find the definition of ':req' in gnu arm assembler manual.
You can qualify the macro argument to indicate whether all invocations must specify a non-blank value (through ‘:req’), or whether it takes all of the remaining arguments (through ‘:vararg’). You can supply a default value for any macro argument by following the name with ‘=deflt’.
以及示例,
.macro m p1:req, p2=0, p3:vararg
Begin the definition of a macro called m, with at least three arguments. The first argument must always have a value specified, but not the second, which instead has a default value. The third formal will get assigned all remaining arguments specified at invocation time.
第一题
I found there is a HYP_MODE and learned through some brief introduction that it is hypervisor mode.But I failed to get its detailed introduction in armv7 architecture reference manual.Actually I did't find the word in the manual.It can't be equal to svc mode,because svc mode is also mentioned in the context of the code.
在某些 CPU 上有 ARMV7A(不是 ARM7M)的管理程序模式,但不是全部。
参见:Hypervisor mode and ARM Virtualization extensions。
如果扩展名不存在,在ARM7A上修改这个位还是可以的。