legacy_instructions.rst 2.2 KB

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