aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/arm64
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2014-11-18 06:41:24 -0500
committerWill Deacon <will.deacon@arm.com>2014-11-20 11:33:53 -0500
commit587064b610c703f259317d00dc37bf6d40f4fc74 (patch)
tree4170a2e03c6d046c45811f22ab662b988d73ae48 /Documentation/arm64
parent0be0e44c182c4f13df13903fd1377671d157d7b7 (diff)
arm64: Add framework for legacy instruction emulation
Typically, providing support for legacy instructions requires emulating the behaviour of instructions whose encodings have become undefined. If the instructions haven't been removed from the architecture, there maybe an option in the implementation to turn on/off the support for these instructions. Create common infrastructure to support legacy instruction emulation. In addition to emulation, also provide an option to support hardware execution when supported. The default execution mode (one of undef, emulate, hw exeuction) is dependent on the state of the instruction (deprecated or obsolete) in the architecture and can specified at the time of registering the instruction handlers. The runtime state of the emulation can be controlled by writing to individual nodes in sysctl. The expected default behaviour is documented as part of this patch. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation/arm64')
-rw-r--r--Documentation/arm64/legacy_instructions.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/arm64/legacy_instructions.txt b/Documentation/arm64/legacy_instructions.txt
new file mode 100644
index 000000000000..49d4867c0c09
--- /dev/null
+++ b/Documentation/arm64/legacy_instructions.txt
@@ -0,0 +1,33 @@
1The arm64 port of the Linux kernel provides infrastructure to support
2emulation of instructions which have been deprecated, or obsoleted in
3the architecture. The infrastructure code uses undefined instruction
4hooks to support emulation. Where available it also allows turning on
5the instruction execution in hardware.
6
7The emulation mode can be controlled by writing to sysctl nodes
8(/proc/sys/abi). The following explains the different execution
9behaviours and the corresponding values of the sysctl nodes -
10
11* Undef
12 Value: 0
13 Generates undefined instruction abort. Default for instructions that
14 have been obsoleted in the architecture, e.g., SWP
15
16* Emulate
17 Value: 1
18 Uses software emulation. To aid migration of software, in this mode
19 usage of emulated instruction is traced as well as rate limited
20 warnings are issued. This is the default for deprecated
21 instructions, .e.g., CP15 barriers
22
23* Hardware Execution
24 Value: 2
25 Although marked as deprecated, some implementations may support the
26 enabling/disabling of hardware support for the execution of these
27 instructions. Using hardware execution generally provides better
28 performance, but at the loss of ability to gather runtime statistics
29 about the use of the deprecated instructions.
30
31The default mode depends on the status of the instruction in the
32architecture. Deprecated instructions should default to emulation
33while obsolete instructions must be undefined by default.