/*1* Fault Injection Test harness (FI)2* Copyright (C) Intel Crop.3*4* This program is free software; you can redistribute it and/or5* modify it under the terms of the GNU General Public License6* as published by the Free Software Foundation; either version 27* of the License, or (at your option) any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License15* along with this program; if not, write to the Free Software16* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,17* USA.18*19*/2021#ifndef __PF_H_22#define __PF_H_2324enum reason_type {25NOT_ME, /* page fault is not in regions */26NOTHING, /* access others point in regions */27REG_READ, /* read from addr to reg */28REG_WRITE, /* write from reg to addr */29IMM_WRITE, /* write from imm to addr */30OTHERS /* Other instructions can not intercept */31};3233enum reason_type get_ins_type(unsigned long ins_addr);34unsigned int get_ins_mem_width(unsigned long ins_addr);35unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs);36unsigned long get_ins_imm_val(unsigned long ins_addr);3738#endif /* __PF_H_ */394041