Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  */
0006 #ifndef __ASM_UPROBES_H
0007 #define __ASM_UPROBES_H
0008 
0009 #include <linux/notifier.h>
0010 #include <linux/types.h>
0011 
0012 #include <asm/break.h>
0013 #include <asm/inst.h>
0014 
0015 /*
0016  * We want this to be defined as union mips_instruction but that makes the
0017  * generic code blow up.
0018  */
0019 typedef u32 uprobe_opcode_t;
0020 
0021 /*
0022  * Classic MIPS (note this implementation doesn't consider microMIPS yet)
0023  * instructions are always 4 bytes but in order to deal with branches and
0024  * their delay slots, we treat instructions as having 8 bytes maximum.
0025  */
0026 #define MAX_UINSN_BYTES         8
0027 #define UPROBE_XOL_SLOT_BYTES       128 /* Max. cache line size */
0028 
0029 #define UPROBE_BRK_UPROBE       0x000d000d  /* break 13 */
0030 #define UPROBE_BRK_UPROBE_XOL       0x000e000d  /* break 14 */
0031 
0032 #define UPROBE_SWBP_INSN        UPROBE_BRK_UPROBE
0033 #define UPROBE_SWBP_INSN_SIZE       4
0034 
0035 struct arch_uprobe {
0036     unsigned long   resume_epc;
0037     u32 insn[2];
0038     u32 ixol[2];
0039 };
0040 
0041 struct arch_uprobe_task {
0042     unsigned long saved_trap_nr;
0043 };
0044 
0045 #endif /* __ASM_UPROBES_H */