xref: /freebsd/sys/cddl/dev/kinst/riscv/kinst_isa.h (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 /*
2  * SPDX-License-Identifier: CDDL 1.0
3  *
4  * Copyright (c) 2023 The FreeBSD Foundation
5  *
6  * This software was developed by Christos Margiolis <christos@FreeBSD.org>
7  * under sponsorship from the FreeBSD Foundation.
8  */
9 
10 #ifndef _KINST_ISA_H_
11 #define _KINST_ISA_H_
12 
13 #include <machine/riscvreg.h>
14 #include <machine/encoding.h>
15 
16 #define KINST_PATCHVAL		MATCH_EBREAK
17 #define KINST_C_PATCHVAL	MATCH_C_EBREAK
18 
19 /*
20  * The trampoline contains [instruction, [nop padding], ebreak].
21  */
22 #define KINST_TRAMP_SIZE	8
23 
24 typedef uint32_t kinst_patchval_t;
25 
26 struct kinst_probe_md {
27 	int	instlen;	/* original instr len */
28 	bool	emulate;	/* emulate in sw */
29 };
30 
31 #endif /* _KINST_ISA_H_ */
32