xref: /openbmc/linux/arch/x86/mm/pf_in.h (revision c4f7ac64)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *  Fault Injection Test harness (FI)
4  *  Copyright (C) Intel Crop.
5  */
6 
7 #ifndef __PF_H_
8 #define __PF_H_
9 
10 enum 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 
19 enum reason_type get_ins_type(unsigned long ins_addr);
20 unsigned int get_ins_mem_width(unsigned long ins_addr);
21 unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs);
22 unsigned long get_ins_imm_val(unsigned long ins_addr);
23 
24 #endif /* __PF_H_ */
25