decode-arm.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * arch/arm/probes/decode-arm.h
  3. *
  4. * Copyright 2013 Linaro Ltd.
  5. * Written by: David A. Long
  6. *
  7. * The code contained herein is licensed under the GNU General Public
  8. * License. You may obtain a copy of the GNU General Public License
  9. * Version 2 or later at the following locations:
  10. *
  11. * http://www.opensource.org/licenses/gpl-license.html
  12. * http://www.gnu.org/copyleft/gpl.html
  13. */
  14. #ifndef _ARM_KERNEL_PROBES_ARM_H
  15. #define _ARM_KERNEL_PROBES_ARM_H
  16. #include "decode.h"
  17. enum probes_arm_action {
  18. PROBES_PRELOAD_IMM,
  19. PROBES_PRELOAD_REG,
  20. PROBES_BRANCH_IMM,
  21. PROBES_BRANCH_REG,
  22. PROBES_MRS,
  23. PROBES_CLZ,
  24. PROBES_SATURATING_ARITHMETIC,
  25. PROBES_MUL1,
  26. PROBES_MUL2,
  27. PROBES_SWP,
  28. PROBES_LDRSTRD,
  29. PROBES_LOAD,
  30. PROBES_STORE,
  31. PROBES_LOAD_EXTRA,
  32. PROBES_STORE_EXTRA,
  33. PROBES_MOV_IP_SP,
  34. PROBES_DATA_PROCESSING_REG,
  35. PROBES_DATA_PROCESSING_IMM,
  36. PROBES_MOV_HALFWORD,
  37. PROBES_SEV,
  38. PROBES_WFE,
  39. PROBES_SATURATE,
  40. PROBES_REV,
  41. PROBES_MMI,
  42. PROBES_PACK,
  43. PROBES_EXTEND,
  44. PROBES_EXTEND_ADD,
  45. PROBES_MUL_ADD_LONG,
  46. PROBES_MUL_ADD,
  47. PROBES_BITFIELD,
  48. PROBES_BRANCH,
  49. PROBES_LDMSTM,
  50. NUM_PROBES_ARM_ACTIONS
  51. };
  52. void __kprobes simulate_bbl(probes_opcode_t opcode,
  53. struct arch_probes_insn *asi, struct pt_regs *regs);
  54. void __kprobes simulate_blx1(probes_opcode_t opcode,
  55. struct arch_probes_insn *asi, struct pt_regs *regs);
  56. void __kprobes simulate_blx2bx(probes_opcode_t opcode,
  57. struct arch_probes_insn *asi, struct pt_regs *regs);
  58. void __kprobes simulate_mrs(probes_opcode_t opcode,
  59. struct arch_probes_insn *asi, struct pt_regs *regs);
  60. void __kprobes simulate_mov_ipsp(probes_opcode_t opcode,
  61. struct arch_probes_insn *asi, struct pt_regs *regs);
  62. extern const union decode_item probes_decode_arm_table[];
  63. enum probes_insn arm_probes_decode_insn(probes_opcode_t,
  64. struct arch_probes_insn *, bool emulate,
  65. const union decode_action *actions,
  66. const struct decode_checker *checkers[]);
  67. #endif