xref: /OK3568_Linux_fs/kernel/arch/arm64/include/asm/brk-imm.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (C) 2012 ARM Ltd.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifndef __ASM_BRK_IMM_H
7*4882a593Smuzhiyun #define __ASM_BRK_IMM_H
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun /*
10*4882a593Smuzhiyun  * #imm16 values used for BRK instruction generation
11*4882a593Smuzhiyun  * 0x004: for installing kprobes
12*4882a593Smuzhiyun  * 0x005: for installing uprobes
13*4882a593Smuzhiyun  * 0x006: for kprobe software single-step
14*4882a593Smuzhiyun  * Allowed values for kgdb are 0x400 - 0x7ff
15*4882a593Smuzhiyun  * 0x100: for triggering a fault on purpose (reserved)
16*4882a593Smuzhiyun  * 0x400: for dynamic BRK instruction
17*4882a593Smuzhiyun  * 0x401: for compile time BRK instruction
18*4882a593Smuzhiyun  * 0x800: kernel-mode BUG() and WARN() traps
19*4882a593Smuzhiyun  * 0x9xx: tag-based KASAN trap (allowed values 0x900 - 0x9ff)
20*4882a593Smuzhiyun  */
21*4882a593Smuzhiyun #define KPROBES_BRK_IMM			0x004
22*4882a593Smuzhiyun #define UPROBES_BRK_IMM			0x005
23*4882a593Smuzhiyun #define KPROBES_BRK_SS_IMM		0x006
24*4882a593Smuzhiyun #define FAULT_BRK_IMM			0x100
25*4882a593Smuzhiyun #define KGDB_DYN_DBG_BRK_IMM		0x400
26*4882a593Smuzhiyun #define KGDB_COMPILED_DBG_BRK_IMM	0x401
27*4882a593Smuzhiyun #define BUG_BRK_IMM			0x800
28*4882a593Smuzhiyun #define KASAN_BRK_IMM			0x900
29*4882a593Smuzhiyun #define KASAN_BRK_MASK			0x0ff
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif
32