2 * intel_pt_pkt_decoder.h: Intel Processor Trace support
3 * Copyright (c) 2013-2014, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 #ifndef INCLUDE__INTEL_PT_PKT_DECODER_H__
17 #define INCLUDE__INTEL_PT_PKT_DECODER_H__
22 #define INTEL_PT_PKT_DESC_MAX 256
24 #define INTEL_PT_NEED_MORE_BYTES -1
25 #define INTEL_PT_BAD_PACKET -2
27 #define INTEL_PT_PSB_STR "\002\202\002\202\002\202\002\202" \
28 "\002\202\002\202\002\202\002\202"
29 #define INTEL_PT_PSB_LEN 16
31 #define INTEL_PT_PKT_MAX_SZ 16
33 enum intel_pt_pkt_type
{
65 enum intel_pt_pkt_type type
;
70 const char *intel_pt_pkt_name(enum intel_pt_pkt_type
);
72 int intel_pt_get_packet(const unsigned char *buf
, size_t len
,
73 struct intel_pt_pkt
*packet
);
75 int intel_pt_pkt_desc(const struct intel_pt_pkt
*packet
, char *buf
, size_t len
);