169bb0585SMark Rutland /* SPDX-License-Identifier: GPL-2.0-only */ 269bb0585SMark Rutland 369bb0585SMark Rutland #ifndef __ASM_INSN_DEF_H 469bb0585SMark Rutland #define __ASM_INSN_DEF_H 569bb0585SMark Rutland 6*97e58e39SHou Tao #include <asm/brk-imm.h> 7*97e58e39SHou Tao 869bb0585SMark Rutland /* A64 instructions are always 32 bits. */ 969bb0585SMark Rutland #define AARCH64_INSN_SIZE 4 1069bb0585SMark Rutland 11*97e58e39SHou Tao /* 12*97e58e39SHou Tao * BRK instruction encoding 13*97e58e39SHou Tao * The #imm16 value should be placed at bits[20:5] within BRK ins 14*97e58e39SHou Tao */ 15*97e58e39SHou Tao #define AARCH64_BREAK_MON 0xd4200000 16*97e58e39SHou Tao 17*97e58e39SHou Tao /* 18*97e58e39SHou Tao * BRK instruction for provoking a fault on purpose 19*97e58e39SHou Tao * Unlike kgdb, #imm16 value with unallocated handler is used for faulting. 20*97e58e39SHou Tao */ 21*97e58e39SHou Tao #define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5)) 22*97e58e39SHou Tao 2369bb0585SMark Rutland #endif /* __ASM_INSN_DEF_H */ 24