2019-06-12 11:52:38 -06:00
|
|
|
===================
|
|
|
|
Legacy instructions
|
|
|
|
===================
|
|
|
|
|
2014-11-18 04:41:24 -07:00
|
|
|
The arm64 port of the Linux kernel provides infrastructure to support
|
|
|
|
emulation of instructions which have been deprecated, or obsoleted in
|
|
|
|
the architecture. The infrastructure code uses undefined instruction
|
|
|
|
hooks to support emulation. Where available it also allows turning on
|
|
|
|
the instruction execution in hardware.
|
|
|
|
|
|
|
|
The emulation mode can be controlled by writing to sysctl nodes
|
|
|
|
(/proc/sys/abi). The following explains the different execution
|
|
|
|
behaviours and the corresponding values of the sysctl nodes -
|
|
|
|
|
|
|
|
* Undef
|
2019-06-12 11:52:38 -06:00
|
|
|
Value: 0
|
|
|
|
|
2014-11-18 04:41:24 -07:00
|
|
|
Generates undefined instruction abort. Default for instructions that
|
|
|
|
have been obsoleted in the architecture, e.g., SWP
|
|
|
|
|
|
|
|
* Emulate
|
2019-06-12 11:52:38 -06:00
|
|
|
Value: 1
|
|
|
|
|
2014-11-18 04:41:24 -07:00
|
|
|
Uses software emulation. To aid migration of software, in this mode
|
|
|
|
usage of emulated instruction is traced as well as rate limited
|
|
|
|
warnings are issued. This is the default for deprecated
|
|
|
|
instructions, .e.g., CP15 barriers
|
|
|
|
|
|
|
|
* Hardware Execution
|
2019-06-12 11:52:38 -06:00
|
|
|
Value: 2
|
|
|
|
|
2014-11-18 04:41:24 -07:00
|
|
|
Although marked as deprecated, some implementations may support the
|
|
|
|
enabling/disabling of hardware support for the execution of these
|
|
|
|
instructions. Using hardware execution generally provides better
|
|
|
|
performance, but at the loss of ability to gather runtime statistics
|
|
|
|
about the use of the deprecated instructions.
|
|
|
|
|
|
|
|
The default mode depends on the status of the instruction in the
|
|
|
|
architecture. Deprecated instructions should default to emulation
|
|
|
|
while obsolete instructions must be undefined by default.
|
2014-11-18 04:41:25 -07:00
|
|
|
|
2015-01-21 05:43:11 -07:00
|
|
|
Note: Instruction emulation may not be possible in all cases. See
|
|
|
|
individual instruction notes for further information.
|
|
|
|
|
2014-11-18 04:41:25 -07:00
|
|
|
Supported legacy instructions
|
|
|
|
-----------------------------
|
|
|
|
* SWP{B}
|
2019-06-12 11:52:38 -06:00
|
|
|
|
|
|
|
:Node: /proc/sys/abi/swp
|
|
|
|
:Status: Obsolete
|
|
|
|
:Default: Undef (0)
|
2014-11-18 04:41:26 -07:00
|
|
|
|
|
|
|
* CP15 Barriers
|
2019-06-12 11:52:38 -06:00
|
|
|
|
|
|
|
:Node: /proc/sys/abi/cp15_barrier
|
|
|
|
:Status: Deprecated
|
|
|
|
:Default: Emulate (1)
|
2015-01-21 05:43:11 -07:00
|
|
|
|
|
|
|
* SETEND
|
2019-06-12 11:52:38 -06:00
|
|
|
|
|
|
|
:Node: /proc/sys/abi/setend
|
|
|
|
:Status: Deprecated
|
|
|
|
:Default: Emulate (1)*
|
|
|
|
|
|
|
|
Note: All the cpus on the system must have mixed endian support at EL0
|
|
|
|
for this feature to be enabled. If a new CPU - which doesn't support mixed
|
|
|
|
endian - is hotplugged in after this feature has been enabled, there could
|
|
|
|
be unexpected results in the application.
|