decode-arm.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * arch/arm/probes/decode-arm.h
  4. *
  5. * Copyright 2013 Linaro Ltd.
  6. * Written by: David A. Long
  7. */
  8. #ifndef _ARM_KERNEL_PROBES_ARM_H
  9. #define _ARM_KERNEL_PROBES_ARM_H
  10. #include "decode.h"
  11. enum probes_arm_action {
  12. PROBES_PRELOAD_IMM,
  13. PROBES_PRELOAD_REG,
  14. PROBES_BRANCH_IMM,
  15. PROBES_BRANCH_REG,
  16. PROBES_MRS,
  17. PROBES_CLZ,
  18. PROBES_SATURATING_ARITHMETIC,
  19. PROBES_MUL1,
  20. PROBES_MUL2,
  21. PROBES_SWP,
  22. PROBES_LDRSTRD,
  23. PROBES_LOAD,
  24. PROBES_STORE,
  25. PROBES_LOAD_EXTRA,
  26. PROBES_STORE_EXTRA,
  27. PROBES_MOV_IP_SP,
  28. PROBES_DATA_PROCESSING_REG,
  29. PROBES_DATA_PROCESSING_IMM,
  30. PROBES_MOV_HALFWORD,
  31. PROBES_SEV,
  32. PROBES_WFE,
  33. PROBES_SATURATE,
  34. PROBES_REV,
  35. PROBES_MMI,
  36. PROBES_PACK,
  37. PROBES_EXTEND,
  38. PROBES_EXTEND_ADD,
  39. PROBES_MUL_ADD_LONG,
  40. PROBES_MUL_ADD,
  41. PROBES_BITFIELD,
  42. PROBES_BRANCH,
  43. PROBES_LDMSTM,
  44. NUM_PROBES_ARM_ACTIONS
  45. };
  46. void __kprobes simulate_bbl(probes_opcode_t opcode,
  47. struct arch_probes_insn *asi, struct pt_regs *regs);
  48. void __kprobes simulate_blx1(probes_opcode_t opcode,
  49. struct arch_probes_insn *asi, struct pt_regs *regs);
  50. void __kprobes simulate_blx2bx(probes_opcode_t opcode,
  51. struct arch_probes_insn *asi, struct pt_regs *regs);
  52. void __kprobes simulate_mrs(probes_opcode_t opcode,
  53. struct arch_probes_insn *asi, struct pt_regs *regs);
  54. void __kprobes simulate_mov_ipsp(probes_opcode_t opcode,
  55. struct arch_probes_insn *asi, struct pt_regs *regs);
  56. extern const union decode_item probes_decode_arm_table[];
  57. enum probes_insn arm_probes_decode_insn(probes_opcode_t,
  58. struct arch_probes_insn *, bool emulate,
  59. const union decode_action *actions,
  60. const struct decode_checker *checkers[]);
  61. #endif