xref: /openbmc/linux/arch/csky/include/asm/uprobes.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*8f6bb793SGuo Ren /* SPDX-License-Identifier: GPL-2.0-only */
2*8f6bb793SGuo Ren 
3*8f6bb793SGuo Ren #ifndef __ASM_CSKY_UPROBES_H
4*8f6bb793SGuo Ren #define __ASM_CSKY_UPROBES_H
5*8f6bb793SGuo Ren 
6*8f6bb793SGuo Ren #include <asm/probes.h>
7*8f6bb793SGuo Ren 
8*8f6bb793SGuo Ren #define MAX_UINSN_BYTES		4
9*8f6bb793SGuo Ren 
10*8f6bb793SGuo Ren #define UPROBE_SWBP_INSN	USR_BKPT
11*8f6bb793SGuo Ren #define UPROBE_SWBP_INSN_SIZE	2
12*8f6bb793SGuo Ren #define UPROBE_XOL_SLOT_BYTES	MAX_UINSN_BYTES
13*8f6bb793SGuo Ren 
14*8f6bb793SGuo Ren typedef u32 uprobe_opcode_t;
15*8f6bb793SGuo Ren 
16*8f6bb793SGuo Ren struct arch_uprobe_task {
17*8f6bb793SGuo Ren 	unsigned long   saved_trap_no;
18*8f6bb793SGuo Ren };
19*8f6bb793SGuo Ren 
20*8f6bb793SGuo Ren struct arch_uprobe {
21*8f6bb793SGuo Ren 	union {
22*8f6bb793SGuo Ren 		u8 insn[MAX_UINSN_BYTES];
23*8f6bb793SGuo Ren 		u8 ixol[MAX_UINSN_BYTES];
24*8f6bb793SGuo Ren 	};
25*8f6bb793SGuo Ren 	struct arch_probe_insn api;
26*8f6bb793SGuo Ren 	unsigned long insn_size;
27*8f6bb793SGuo Ren 	bool simulate;
28*8f6bb793SGuo Ren };
29*8f6bb793SGuo Ren 
30*8f6bb793SGuo Ren int uprobe_breakpoint_handler(struct pt_regs *regs);
31*8f6bb793SGuo Ren int uprobe_single_step_handler(struct pt_regs *regs);
32*8f6bb793SGuo Ren 
33*8f6bb793SGuo Ren #endif /* __ASM_CSKY_UPROBES_H */
34