blob: e2a13dce0e13d0e867c4229d7727f0c0e6051a19 [file] [log] [blame]
Thomas Gleixner1a59d1b82019-05-27 08:55:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Pekka Paalanen8b7d89d2008-05-12 21:20:56 +02002/*
3 * Fault Injection Test harness (FI)
4 * Copyright (C) Intel Crop.
Pekka Paalanen8b7d89d2008-05-12 21:20:56 +02005 */
6
7#ifndef __PF_H_
8#define __PF_H_
9
10enum reason_type {
11 NOT_ME, /* page fault is not in regions */
12 NOTHING, /* access others point in regions */
13 REG_READ, /* read from addr to reg */
14 REG_WRITE, /* write from reg to addr */
15 IMM_WRITE, /* write from imm to addr */
16 OTHERS /* Other instructions can not intercept */
17};
18
19enum reason_type get_ins_type(unsigned long ins_addr);
20unsigned int get_ins_mem_width(unsigned long ins_addr);
21unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs);
22unsigned long get_ins_imm_val(unsigned long ins_addr);
23
24#endif /* __PF_H_ */