0001 ===================
0002 Legacy instructions
0003 ===================
0004
0005 The arm64 port of the Linux kernel provides infrastructure to support
0006 emulation of instructions which have been deprecated, or obsoleted in
0007 the architecture. The infrastructure code uses undefined instruction
0008 hooks to support emulation. Where available it also allows turning on
0009 the instruction execution in hardware.
0010
0011 The emulation mode can be controlled by writing to sysctl nodes
0012 (/proc/sys/abi). The following explains the different execution
0013 behaviours and the corresponding values of the sysctl nodes -
0014
0015 * Undef
0016 Value: 0
0017
0018 Generates undefined instruction abort. Default for instructions that
0019 have been obsoleted in the architecture, e.g., SWP
0020
0021 * Emulate
0022 Value: 1
0023
0024 Uses software emulation. To aid migration of software, in this mode
0025 usage of emulated instruction is traced as well as rate limited
0026 warnings are issued. This is the default for deprecated
0027 instructions, .e.g., CP15 barriers
0028
0029 * Hardware Execution
0030 Value: 2
0031
0032 Although marked as deprecated, some implementations may support the
0033 enabling/disabling of hardware support for the execution of these
0034 instructions. Using hardware execution generally provides better
0035 performance, but at the loss of ability to gather runtime statistics
0036 about the use of the deprecated instructions.
0037
0038 The default mode depends on the status of the instruction in the
0039 architecture. Deprecated instructions should default to emulation
0040 while obsolete instructions must be undefined by default.
0041
0042 Note: Instruction emulation may not be possible in all cases. See
0043 individual instruction notes for further information.
0044
0045 Supported legacy instructions
0046 -----------------------------
0047 * SWP{B}
0048
0049 :Node: /proc/sys/abi/swp
0050 :Status: Obsolete
0051 :Default: Undef (0)
0052
0053 * CP15 Barriers
0054
0055 :Node: /proc/sys/abi/cp15_barrier
0056 :Status: Deprecated
0057 :Default: Emulate (1)
0058
0059 * SETEND
0060
0061 :Node: /proc/sys/abi/setend
0062 :Status: Deprecated
0063 :Default: Emulate (1)*
0064
0065 Note: All the cpus on the system must have mixed endian support at EL0
0066 for this feature to be enabled. If a new CPU - which doesn't support mixed
0067 endian - is hotplugged in after this feature has been enabled, there could
0068 be unexpected results in the application.