xref: /linux/arch/arm64/include/asm/brk-imm.h (revision 453b7740ebfda2d84be7fb583c54f0c91c592869)
1f98deee9SArd Biesheuvel /*
2f98deee9SArd Biesheuvel  * Copyright (C) 2012 ARM Ltd.
3f98deee9SArd Biesheuvel  *
4f98deee9SArd Biesheuvel  * This program is free software; you can redistribute it and/or modify
5f98deee9SArd Biesheuvel  * it under the terms of the GNU General Public License version 2 as
6f98deee9SArd Biesheuvel  * published by the Free Software Foundation.
7f98deee9SArd Biesheuvel  */
8f98deee9SArd Biesheuvel 
9f98deee9SArd Biesheuvel #ifndef __ASM_BRK_IMM_H
10f98deee9SArd Biesheuvel #define __ASM_BRK_IMM_H
11f98deee9SArd Biesheuvel 
12f98deee9SArd Biesheuvel /*
13f98deee9SArd Biesheuvel  * #imm16 values used for BRK instruction generation
14*453b7740SWill Deacon  * 0x004: for installing kprobes
15*453b7740SWill Deacon  * 0x005: for installing uprobes
16f98deee9SArd Biesheuvel  * Allowed values for kgdb are 0x400 - 0x7ff
17f98deee9SArd Biesheuvel  * 0x100: for triggering a fault on purpose (reserved)
18f98deee9SArd Biesheuvel  * 0x400: for dynamic BRK instruction
19f98deee9SArd Biesheuvel  * 0x401: for compile time BRK instruction
20f98deee9SArd Biesheuvel  * 0x800: kernel-mode BUG() and WARN() traps
2141eea9cdSAndrey Konovalov  * 0x9xx: tag-based KASAN trap (allowed values 0x900 - 0x9ff)
22f98deee9SArd Biesheuvel  */
23*453b7740SWill Deacon #define KPROBES_BRK_IMM			0x004
24*453b7740SWill Deacon #define UPROBES_BRK_IMM			0x005
25f98deee9SArd Biesheuvel #define FAULT_BRK_IMM			0x100
26f98deee9SArd Biesheuvel #define KGDB_DYN_DBG_BRK_IMM		0x400
27f98deee9SArd Biesheuvel #define KGDB_COMPILED_DBG_BRK_IMM	0x401
28f98deee9SArd Biesheuvel #define BUG_BRK_IMM			0x800
2941eea9cdSAndrey Konovalov #define KASAN_BRK_IMM			0x900
3026a04d84SWill Deacon #define KASAN_BRK_MASK			0x0ff
31f98deee9SArd Biesheuvel 
32f98deee9SArd Biesheuvel #endif
33