7 * If you change anything here, you must bump MMIO_VERSION.
8 * This is the relay data format for user space.
10 #define MMIO_VERSION 0x04
12 /* mm_io_header.type */
13 #define MMIO_OPCODE_MASK 0xff
14 #define MMIO_OPCODE_SHIFT 0
15 #define MMIO_WIDTH_MASK 0xff00
16 #define MMIO_WIDTH_SHIFT 8
17 #define MMIO_MAGIC (0x6f000000 | (MMIO_VERSION<<16))
18 #define MMIO_MAGIC_MASK 0xffff0000
20 enum mm_io_opcode { /* payload type: */
21 MMIO_READ = 0x1, /* struct mm_io_rw */
22 MMIO_WRITE = 0x2, /* struct mm_io_rw */
23 MMIO_PROBE = 0x3, /* struct mm_io_map */
24 MMIO_UNPROBE = 0x4, /* struct mm_io_map */
25 MMIO_MARKER = 0x5, /* raw char data */
26 MMIO_UNKNOWN_OP = 0x6, /* struct mm_io_rw */
30 __u32 type; /* see MMIO_* macros above */
31 __u32 sec; /* timestamp */
33 __u32 pid; /* PID of the process, or 0 for kernel core */
34 __u16 data_len; /* length of the following payload */
38 __u64 address; /* virtual address of register */
40 __u64 pc; /* optional program counter */
44 __u64 phys; /* base address in PCI space */
45 __u64 addr; /* base virtual address */
46 __u64 len; /* mapping size */
47 __u64 pc; /* optional program counter */
52 * These structures are used to allow a single relay_write()
53 * call to write a full packet.
56 struct mm_io_header_rw {
57 struct mm_io_header header;
59 } __attribute__((packed));
61 struct mm_io_header_map {
62 struct mm_io_header header;
64 } __attribute__((packed));
66 #endif /* MMIOTRACE_H */