pf_in.h 708 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Fault Injection Test harness (FI)
  4. * Copyright (C) Intel Crop.
  5. */
  6. #ifndef __PF_H_
  7. #define __PF_H_
  8. enum reason_type {
  9. NOT_ME, /* page fault is not in regions */
  10. NOTHING, /* access others point in regions */
  11. REG_READ, /* read from addr to reg */
  12. REG_WRITE, /* write from reg to addr */
  13. IMM_WRITE, /* write from imm to addr */
  14. OTHERS /* Other instructions can not intercept */
  15. };
  16. enum reason_type get_ins_type(unsigned long ins_addr);
  17. unsigned int get_ins_mem_width(unsigned long ins_addr);
  18. unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs);
  19. unsigned long get_ins_imm_val(unsigned long ins_addr);
  20. #endif /* __PF_H_ */