legacy_instructions.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. The arm64 port of the Linux kernel provides infrastructure to support
  2. emulation of instructions which have been deprecated, or obsoleted in
  3. the architecture. The infrastructure code uses undefined instruction
  4. hooks to support emulation. Where available it also allows turning on
  5. the instruction execution in hardware.
  6. The emulation mode can be controlled by writing to sysctl nodes
  7. (/proc/sys/abi). The following explains the different execution
  8. behaviours and the corresponding values of the sysctl nodes -
  9. * Undef
  10. Value: 0
  11. Generates undefined instruction abort. Default for instructions that
  12. have been obsoleted in the architecture, e.g., SWP
  13. * Emulate
  14. Value: 1
  15. Uses software emulation. To aid migration of software, in this mode
  16. usage of emulated instruction is traced as well as rate limited
  17. warnings are issued. This is the default for deprecated
  18. instructions, .e.g., CP15 barriers
  19. * Hardware Execution
  20. Value: 2
  21. Although marked as deprecated, some implementations may support the
  22. enabling/disabling of hardware support for the execution of these
  23. instructions. Using hardware execution generally provides better
  24. performance, but at the loss of ability to gather runtime statistics
  25. about the use of the deprecated instructions.
  26. The default mode depends on the status of the instruction in the
  27. architecture. Deprecated instructions should default to emulation
  28. while obsolete instructions must be undefined by default.
  29. Note: Instruction emulation may not be possible in all cases. See
  30. individual instruction notes for further information.
  31. Supported legacy instructions
  32. -----------------------------
  33. * SWP{B}
  34. Node: /proc/sys/abi/swp
  35. Status: Obsolete
  36. Default: Undef (0)
  37. * CP15 Barriers
  38. Node: /proc/sys/abi/cp15_barrier
  39. Status: Deprecated
  40. Default: Emulate (1)
  41. * SETEND
  42. Node: /proc/sys/abi/setend
  43. Status: Deprecated
  44. Default: Emulate (1)*
  45. Note: All the cpus on the system must have mixed endian support at EL0
  46. for this feature to be enabled. If a new CPU - which doesn't support mixed
  47. endian - is hotplugged in after this feature has been enabled, there could
  48. be unexpected results in the application.