Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * intel_pt_insn_decoder.h: Intel Processor Trace support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  * Copyright (c) 2013-2014, Intel Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #ifndef INCLUDE__INTEL_PT_INSN_DECODER_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #define INCLUDE__INTEL_PT_INSN_DECODER_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <stddef.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <stdint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define INTEL_PT_INSN_DESC_MAX		32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define INTEL_PT_INSN_BUF_SZ		16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) enum intel_pt_insn_op {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	INTEL_PT_OP_OTHER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	INTEL_PT_OP_CALL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	INTEL_PT_OP_RET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	INTEL_PT_OP_JCC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	INTEL_PT_OP_JMP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	INTEL_PT_OP_LOOP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	INTEL_PT_OP_IRET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	INTEL_PT_OP_INT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	INTEL_PT_OP_SYSCALL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	INTEL_PT_OP_SYSRET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) enum intel_pt_insn_branch {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	INTEL_PT_BR_NO_BRANCH,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	INTEL_PT_BR_INDIRECT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	INTEL_PT_BR_CONDITIONAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	INTEL_PT_BR_UNCONDITIONAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) struct intel_pt_insn {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	enum intel_pt_insn_op		op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	enum intel_pt_insn_branch	branch;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	int				length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	int32_t				rel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	unsigned char			buf[INTEL_PT_INSN_BUF_SZ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int intel_pt_get_insn(const unsigned char *buf, size_t len, int x86_64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 		      struct intel_pt_insn *intel_pt_insn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) const char *intel_pt_insn_name(enum intel_pt_insn_op op);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) int intel_pt_insn_desc(const struct intel_pt_insn *intel_pt_insn, char *buf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 		       size_t buf_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) int intel_pt_insn_type(enum intel_pt_insn_op op);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #endif