18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2012 ARM Ltd.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#ifndef __ASM_BRK_IMM_H
78c2ecf20Sopenharmony_ci#define __ASM_BRK_IMM_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/*
108c2ecf20Sopenharmony_ci * #imm16 values used for BRK instruction generation
118c2ecf20Sopenharmony_ci * 0x004: for installing kprobes
128c2ecf20Sopenharmony_ci * 0x005: for installing uprobes
138c2ecf20Sopenharmony_ci * 0x006: for kprobe software single-step
148c2ecf20Sopenharmony_ci * Allowed values for kgdb are 0x400 - 0x7ff
158c2ecf20Sopenharmony_ci * 0x100: for triggering a fault on purpose (reserved)
168c2ecf20Sopenharmony_ci * 0x400: for dynamic BRK instruction
178c2ecf20Sopenharmony_ci * 0x401: for compile time BRK instruction
188c2ecf20Sopenharmony_ci * 0x800: kernel-mode BUG() and WARN() traps
198c2ecf20Sopenharmony_ci * 0x9xx: tag-based KASAN trap (allowed values 0x900 - 0x9ff)
208c2ecf20Sopenharmony_ci */
218c2ecf20Sopenharmony_ci#define KPROBES_BRK_IMM			0x004
228c2ecf20Sopenharmony_ci#define UPROBES_BRK_IMM			0x005
238c2ecf20Sopenharmony_ci#define KPROBES_BRK_SS_IMM		0x006
248c2ecf20Sopenharmony_ci#define FAULT_BRK_IMM			0x100
258c2ecf20Sopenharmony_ci#define KGDB_DYN_DBG_BRK_IMM		0x400
268c2ecf20Sopenharmony_ci#define KGDB_COMPILED_DBG_BRK_IMM	0x401
278c2ecf20Sopenharmony_ci#define BUG_BRK_IMM			0x800
288c2ecf20Sopenharmony_ci#define KASAN_BRK_IMM			0x900
298c2ecf20Sopenharmony_ci#define KASAN_BRK_MASK			0x0ff
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif
32