6 #define MMIO_VERSION 0x04
8 /* mm_io_header.type */
9 #define MMIO_OPCODE_MASK 0xff
10 #define MMIO_OPCODE_SHIFT 0
11 #define MMIO_WIDTH_MASK 0xff00
12 #define MMIO_WIDTH_SHIFT 8
13 #define MMIO_MAGIC (0x6f000000 | (MMIO_VERSION<<16))
14 #define MMIO_MAGIC_MASK 0xffff0000
16 enum mm_io_opcode { /* payload type: */
17 MMIO_READ = 0x1, /* struct mm_io_rw */
18 MMIO_WRITE = 0x2, /* struct mm_io_rw */
19 MMIO_PROBE = 0x3, /* struct mm_io_map */
20 MMIO_UNPROBE = 0x4, /* struct mm_io_map */
21 MMIO_MARKER = 0x5, /* raw char data */
22 MMIO_UNKNOWN_OP = 0x6, /* struct mm_io_rw */
27 __u32 sec; /* timestamp */
29 __u32 pid; /* PID of the process, or 0 for kernel core */
30 __u16 data_len; /* length of the following payload */
34 __u64 address; /* virtual address of register */
36 __u64 pc; /* optional program counter */
40 __u64 phys; /* base address in PCI space */
41 __u64 addr; /* base virtual address */
42 __u64 len; /* mapping size */
43 __u64 pc; /* optional program counter */
48 * These structures are used to allow a single relay_write()
49 * call to write a full packet.
52 struct mm_io_header_rw {
53 struct mm_io_header header;
55 } __attribute__((packed));
57 struct mm_io_header_map {
58 struct mm_io_header header;
60 } __attribute__((packed));
62 #endif /* MMIOTRACE_H */